mine.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. <template>
  2. <view>
  3. <view class="background">
  4. <!-- 个人信息 @click="gotoUrl('/pages/mine/personInfos')" -->
  5. <view class="person-infos" >
  6. <view class="photo">
  7. <image class="img" src="@/assets/img/默认头像.png" mode=""></image>
  8. </view>
  9. <view class="else">
  10. <view class="name">
  11. {{regUser.name}}
  12. </view>
  13. <view class="company">
  14. {{personInfo.fullName}}
  15. </view>
  16. </view>
  17. </view>
  18. <!-- 地址 -->
  19. <view class="address-box" >
  20. <view class="address">
  21. <view class="address-title">
  22. {{personInfo.name}}
  23. </view>
  24. <view class="address-value" >
  25. <!-- -->
  26. <u-icon name="map"></u-icon>{{personInfo.remark}}
  27. <!-- {{companyInfo.typeN}} -->
  28. </view>
  29. </view>
  30. <!-- 切换 -->
  31. <view class="change" v-if="false">
  32. 切换
  33. </view>
  34. <view class="image" >
  35. <image class="img" src="@/assets/img/mineBackground.svg" mode=""></image>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 功能 -->
  40. <view class="function-group">
  41. <view class="function-item" v-if="false" @click="gotoUrl('/pages/mine/tenantInformation')" >
  42. <view class="icon">
  43. <image class="img" src="@/assets/img/riLine-contacts-book-line.svg" mode=""></image>
  44. </view>
  45. <view class="name">
  46. 用户信息
  47. </view>
  48. <view class="arrow">
  49. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  50. </view>
  51. </view>
  52. <view class="function-item" v-if="false">
  53. <view class="icon">
  54. <image class="img" src="@/assets/img/riLine-pie-chart-line.svg" mode=""></image>
  55. </view>
  56. <view class="name">
  57. 用电监控
  58. </view>
  59. <view class="arrow">
  60. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  61. </view>
  62. </view>
  63. <view class="function-item" v-if="false">
  64. <view class="icon">
  65. <image class="img" src="@/assets/img/riLine-book-2-line.svg" mode=""></image>
  66. </view>
  67. <view class="name">
  68. 用电常识
  69. </view>
  70. <view class="arrow">
  71. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  72. </view>
  73. </view>
  74. <view class="function-item" @click="gotoUrl('/pages/invoiceManagement/invoiceManagement')" >
  75. <view class="icon">
  76. <image class="img" src="@/assets/img/iconPark-order2.svg" mode=""></image>
  77. </view>
  78. <view class="name">
  79. 发票管理
  80. </view>
  81. <view class="arrow">
  82. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  83. </view>
  84. </view>
  85. <view class="function-item" @click="gotoUrl('/pages/mine/contactService')" >
  86. <view class="icon">
  87. <image class="img" src="@/assets/img/riLine-customer-service-2-line.svg" mode=""></image>
  88. </view>
  89. <view class="name">
  90. 客服热线
  91. </view>
  92. <view class="arrow">
  93. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  94. </view>
  95. </view>
  96. </view>
  97. <view class="function-group" v-if="false">
  98. <view class="function-item">
  99. <view class="icon">
  100. <image class="img" src="@/assets/img/riLine-user-settings-line.svg" mode=""></image>
  101. </view>
  102. <view class="name">
  103. 个人信息
  104. </view>
  105. <view class="arrow">
  106. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  107. </view>
  108. </view>
  109. </view>
  110. <view class="function-group" >
  111. <view class="function-item" @click="gotoUrl('/pages/mine/setting')">
  112. <view class="icon">
  113. <image class="img" src="@/assets/img/riLine-settings-2-line.svg" mode=""></image>
  114. </view>
  115. <view class="name">
  116. 设置
  117. </view>
  118. <view class="arrow">
  119. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  120. </view>
  121. </view>
  122. </view>
  123. <Tabbar :current="2" ></Tabbar>
  124. </view>
  125. </template>
  126. <script>
  127. import * as API from '@/apis/pagejs/index.js'
  128. import * as API_user from '@/apis/pagejs/user.js'
  129. import Tabbar from '@/components/Tabbar.vue'
  130. export default {
  131. components: {
  132. Tabbar
  133. },
  134. data() {
  135. return {
  136. companyInfo:{},
  137. regUser:{},
  138. personInfo:{
  139. }
  140. }
  141. },
  142. onLoad() {
  143. this.homePage()
  144. //this.personalCenter()
  145. },
  146. methods: {
  147. personalCenter(){
  148. uni.showLoading({
  149. title: "加载中",
  150. mask: true,
  151. })
  152. API_user.personalCenter({
  153. }).then((response) => {
  154. uni.hideLoading();
  155. //this.companyInfo=response.data.companyInfo;
  156. }).catch(error => {
  157. uni.hideLoading();
  158. })
  159. },
  160. homePage(){
  161. uni.showLoading({
  162. title: "加载中",
  163. mask: true,
  164. })
  165. API.homePage({
  166. }).then((response) => {
  167. uni.hideLoading();
  168. this.companyInfo=response.data.companyInfo;
  169. this.regUser=response.data.regUser;
  170. this.personInfo=response.data.tenantInfo;
  171. }).catch(error => {
  172. uni.hideLoading();
  173. })
  174. }
  175. }
  176. }
  177. </script>
  178. <style lang="scss" scoped>
  179. .background{
  180. background: linear-gradient(180deg, rgba(194,219,255,1) 53%,rgba(180,211,255,0) 100%);
  181. padding: 72rpx 32rpx;
  182. // 个人信息
  183. .person-infos{
  184. display: flex;
  185. align-items: center;
  186. .photo{
  187. width: 112rpx;
  188. height: 112rpx;
  189. border-radius: 50px;
  190. .img{
  191. width: 100%;
  192. height: 100%;
  193. }
  194. }
  195. .else{
  196. margin-left: 24rpx;
  197. .name{
  198. color: rgb(16,16,16);
  199. font-size: 36rpx;
  200. font-weight: bold;
  201. }
  202. .company{
  203. color: rgba(16,16,16,1);
  204. }
  205. }
  206. }
  207. // 地址
  208. .address-box{
  209. border-radius: 8px;
  210. background: linear-gradient(90deg, rgba(49,110,207,1) 2%,rgba(20,73,159,1) 100%);
  211. color: #fff;
  212. padding:40rpx 32rpx;
  213. margin-top: 40rpx;
  214. display: flex;
  215. align-items: center;
  216. position: relative;
  217. .address{
  218. .address-title{
  219. font-size: 40rpx;
  220. }
  221. .address-value{
  222. font-size: 24rpx;
  223. margin-top: 8rpx;
  224. }
  225. }
  226. // 切换
  227. .change{
  228. border: 1px solid rgba(255,255,255,1);
  229. width: 128rpx;
  230. height: 64rpx;
  231. line-height: 64rpx;
  232. border-radius: 50px;
  233. color: rgba(255,255,255,1);
  234. text-align: center;
  235. margin-left: auto;
  236. }
  237. .image {
  238. width: 174rpx;
  239. height: 174rpx;
  240. position: absolute;
  241. right: 0;
  242. top: 20rpx;
  243. .img {
  244. width: 100%;
  245. height: 100%;
  246. }
  247. }
  248. }
  249. }
  250. // 功能
  251. .function-group{
  252. border-radius: 8px;
  253. background-color: #fff;
  254. margin: 0 32rpx 24rpx;
  255. .function-item{
  256. display: flex;
  257. align-items: center;
  258. padding: 26rpx 26rpx 26rpx 0;
  259. margin-left: 26rpx;
  260. border-bottom: 1px solid rgba(221,221,221,1);
  261. .icon{
  262. width: 40rpx;
  263. height: 40rpx;
  264. .img{
  265. width: 100%;
  266. height: 100%;
  267. }
  268. }
  269. .name{
  270. color: rgba(51,51,51,1);
  271. font-size: 30rpx;
  272. margin-left: 26rpx;
  273. }
  274. .arrow{
  275. margin-left: auto;
  276. }
  277. }
  278. }
  279. </style>