mine.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. <template>
  2. <view>
  3. <view class="background">
  4. <!-- 个人信息 -->
  5. <!-- <view class="person-infos" @click="gotoUrl('/pages/mine/personInfos')"> -->
  6. <view class="person-infos">
  7. <view class="photo">
  8. <!-- <u-avatar class="avatar"
  9. src="@/assets/img/photo@x1.png" size="112">
  10. </u-avatar> -->
  11. <image class="img" src="@/assets/img/默认头像.png" mode=""></image>
  12. </view>
  13. <view class="else">
  14. <view class="name">
  15. {{personInfo.name}}
  16. </view>
  17. <!-- <view class="company">
  18. {{companyInfo.fullName}}
  19. </view> -->
  20. </view>
  21. </view>
  22. <!-- 地址 -->
  23. <view class="address-box">
  24. <view class="address">
  25. <view class="address-title">
  26. {{companyInfo.fullName}}
  27. </view>
  28. <view class="address-value">
  29. <u-icon name="map" v-if="companyInfo.address"></u-icon>{{companyInfo.address}}
  30. </view>
  31. </view>
  32. <view class="image">
  33. <image class="img" src="@/assets/img/mineBackground.svg" mode=""></image>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 功能 -->
  38. <view class="function-group">
  39. <view class="function-item" @click="gotoUrl('/pages/mine/filialeList')" v-if="false">
  40. <view class="icon">
  41. <image class="img" src="@/assets/img/riLine-function-line.svg" mode=""></image>
  42. </view>
  43. <view class="name">
  44. 设备列表
  45. </view>
  46. <view class="arrow">
  47. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  48. </view>
  49. </view>
  50. <view class="function-item" @click="gotoUrl('/pages/mine/message')" v-if="false">
  51. <view class="icon">
  52. <image class="img" src="@/assets/img/riLine-message-2-line.svg" mode=""></image>
  53. </view>
  54. <view class="name">
  55. 我的消息
  56. </view>
  57. <view class="arrow">
  58. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  59. </view>
  60. </view>
  61. <view class="function-item" @click="gotoUrl('/pages/mine/feedbackRecord')" v-if="false">
  62. <view class="icon">
  63. <image class="img" src="@/assets/img/riLine-feedback-line.svg" mode=""></image>
  64. </view>
  65. <view class="name">
  66. 意见反馈
  67. </view>
  68. <view class="arrow">
  69. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  70. </view>
  71. </view>
  72. <view class="function-item" @click="gotoUrl('/pages/mine/contactService')">
  73. <view class="icon">
  74. <image class="img" src="@/assets/img/riLine-customer-service-2-line.svg" mode=""></image>
  75. </view>
  76. <view class="name">
  77. 客服热线
  78. </view>
  79. <view class="arrow">
  80. <u-icon name="arrow-right" color="#b2b2b2"></u-icon>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="function-group">
  85. <view class="function-item" @click="gotoUrl('/pages/mine/setting')">
  86. <view class="icon">
  87. <image class="img" src="@/assets/img/riLine-settings-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. <energyCenterTabbar :current="2"></energyCenterTabbar>
  98. </view>
  99. </template>
  100. <script>
  101. import energyCenterTabbar from '@/components/energyCenterTabbar.vue'
  102. import * as API from '@/apis/pagejs/index.js'
  103. export default {
  104. components: {
  105. energyCenterTabbar
  106. },
  107. data() {
  108. return {
  109. personInfo: {},
  110. companyInfo: {}
  111. }
  112. },
  113. onLoad() {
  114. this.getfindByOpenId();
  115. },
  116. onShow() {
  117. },
  118. methods: {
  119. getfindByOpenId() {
  120. uni.showLoading({
  121. title: "加载中",
  122. mask: true,
  123. })
  124. API.findByOpenId({
  125. openId: this.carhelp.getOpenId()
  126. }).then((response) => {
  127. uni.hideLoading();
  128. this.personInfo = response.data.regUser;
  129. this.companyInfo = response.data.companyInfo;
  130. this.$forceUpdate()
  131. }).catch(error => {
  132. uni.showToast({
  133. title: error,
  134. icon: "none"
  135. })
  136. })
  137. },
  138. }
  139. }
  140. </script>
  141. <style lang="scss" scoped>
  142. .background {
  143. background: linear-gradient(180deg, rgba(194, 219, 255, 1) 53%, rgba(180, 211, 255, 0) 100%);
  144. padding: 72rpx 32rpx;
  145. // 个人信息
  146. .person-infos {
  147. display: flex;
  148. align-items: center;
  149. .photo {
  150. width: 112rpx;
  151. height: 112rpx;
  152. border-radius: 50px;
  153. .img {
  154. width: 100%;
  155. height: 100%;
  156. }
  157. }
  158. .else {
  159. margin-left: 24rpx;
  160. .name {
  161. color: rgb(16, 16, 16);
  162. font-size: 36rpx;
  163. }
  164. .company {
  165. color: rgba(16, 16, 16, 1);
  166. }
  167. }
  168. }
  169. // 地址
  170. .address-box {
  171. border-radius: 8px;
  172. background: linear-gradient(90deg, rgba(49, 110, 207, 1) 2%, rgba(20, 73, 159, 1) 100%);
  173. color: #fff;
  174. padding: 40rpx 32rpx;
  175. margin-top: 40rpx;
  176. display: flex;
  177. align-items: center;
  178. position: relative;
  179. .address {
  180. .address-title {
  181. font-size: 40rpx;
  182. }
  183. .address-value {
  184. font-size: 24rpx;
  185. margin-top: 8rpx;
  186. }
  187. }
  188. .image {
  189. width: 174rpx;
  190. height: 174rpx;
  191. position: absolute;
  192. right: 0;
  193. top: 20rpx;
  194. .img {
  195. width: 100%;
  196. height: 100%;
  197. }
  198. }
  199. }
  200. }
  201. // 功能
  202. .function-group {
  203. border-radius: 8px;
  204. background-color: #fff;
  205. margin: 0 32rpx 24rpx;
  206. .function-item {
  207. display: flex;
  208. align-items: center;
  209. padding: 26rpx 26rpx 26rpx 0;
  210. margin-left: 26rpx;
  211. border-bottom: 1px solid rgba(221, 221, 221, 1);
  212. .icon {
  213. width: 40rpx;
  214. height: 40rpx;
  215. .img {
  216. width: 100%;
  217. height: 100%;
  218. }
  219. }
  220. .name {
  221. color: rgba(51, 51, 51, 1);
  222. font-size: 30rpx;
  223. margin-left: 26rpx;
  224. }
  225. .arrow {
  226. margin-left: auto;
  227. }
  228. }
  229. }
  230. </style>