center.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view class="jpmain ">
  3. <componentLogin ref="refLogin" @findByOpenId="findByOpenId"></componentLogin>
  4. <view class="gradient-header">
  5. <view class="jpback">
  6. </view>
  7. </view>
  8. <view class="body">
  9. <view class="page-top" @click="gotoUrl('pages/index/main/information')" >
  10. <view class="name">
  11. <view class="photo">
  12. <img class="img" :src="userInfo.headImg" v-if="userInfo.headImg" alt="">
  13. </view>
  14. <view class="text">
  15. <view class="text1">{{userInfo.nickName}}</view>
  16. <view class="text2">{{userInfo.phone}}</view>
  17. </view>
  18. </view>
  19. <view class="value">
  20. <u-icon name="arrow-right" size="24" color="#fff"></u-icon>
  21. </view>
  22. </view>
  23. <view class="page">
  24. <view class="page-main">
  25. <view class="item" v-if="userInfoPlus&&userInfoPlus.myAllList" >
  26. <view class="name">{{userInfoPlus.myAllList.length}}</view>
  27. <view class="value">车位</view>
  28. </view>
  29. <view class="item2">
  30. </view>
  31. <view class="item" v-if="userInfoPlus&&userInfoPlus.whiteList">
  32. <view class="name">{{userInfoPlus.whiteList.length}}</view>
  33. <view class="value">白名单</view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="page">
  38. <view class="page-content">
  39. <view class="item" @click="gotoUrl('pages/mylock/myLock')" >
  40. <view class="title">
  41. <img class="img" src="@/assets/img/center/icon1.png" alt="">
  42. 我的地锁
  43. </view>
  44. <view class="goto">
  45. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  46. </view>
  47. </view>
  48. <view class="item" v-if="0">
  49. <view class="title">
  50. <img class="img" src="@/assets/img/center/icon1.png" alt="">
  51. 我的地锁
  52. </view>
  53. <view class="goto">
  54. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import * as API from '@/apis/pagejs/index.js'
  64. import componentLogin from '@/components/componentLogin.vue';
  65. export default {
  66. components: {
  67. componentLogin,
  68. },
  69. data() {
  70. return {
  71. userInfo:{},
  72. userInfoPlus:{
  73. whiteList:[],
  74. myAllList:[]
  75. }
  76. }
  77. },
  78. onLoad() {
  79. this.userInfo = this.jphelp.getPersonInfo()
  80. this.userInfoPlus=this.jphelp.getPersonInfoPlus()
  81. },
  82. onReady() {
  83. },
  84. onShow() {
  85. this.$refs.refLogin.findByOpenId()
  86. },
  87. methods: {
  88. findByOpenId(res){
  89. this.userInfo = this.jphelp.getPersonInfo()
  90. this.userInfoPlus=this.jphelp.getPersonInfoPlus()
  91. }
  92. }
  93. }
  94. </script>
  95. <style>
  96. page {
  97. background-color: rgba(242, 244, 246, 1);
  98. }
  99. </style>
  100. <style scoped lang="scss">
  101. /* styles.css */
  102. .body {
  103. padding: 32rpx;
  104. }
  105. .gradient-header {
  106. height: 0px;
  107. }
  108. .jpback {
  109. height: 268rpx;
  110. background: linear-gradient(180deg, rgba(22, 119, 255, 1) 20%, rgba(121, 177, 255, 1) 100%);
  111. }
  112. .page-top {
  113. color: #fff;
  114. display: flex;
  115. justify-content: space-between;
  116. margin: 48rpx 0;
  117. .name {
  118. display: flex;
  119. align-items: flex-end;
  120. .photo {
  121. border-radius: 50px;
  122. background-color: rgba(229, 229, 229, 1);
  123. height: 100rpx;
  124. width: 100rpx;
  125. overflow: hidden;
  126. .img {
  127. width: 100%;
  128. height: 100%;
  129. }
  130. }
  131. .text {
  132. margin-left: 24rpx;
  133. .text1 {
  134. font-weight: bold;
  135. font-size: 40rpx;
  136. }
  137. .text2 {
  138. font-size: 32rpx;
  139. }
  140. }
  141. }
  142. .value {
  143. margin-top: 24rpx;
  144. font-size: 40rpx;
  145. font-weight: bold;
  146. color: #333333;
  147. }
  148. }
  149. .page {
  150. border-radius: 16rpx;
  151. background-color: rgba(255, 255, 255, 1);
  152. color: rgba(16, 16, 16, 1);
  153. padding:0 32rpx;
  154. margin-bottom: 32rpx;
  155. font-size: 32rpx;
  156. color: rgb(16, 16, 16);
  157. .page-main {
  158. display: flex;
  159. justify-content: space-around;
  160. align-items: center;
  161. padding:24rpx;
  162. .item {
  163. .name {
  164. font-size: 56rpx;
  165. color: #333333;
  166. font-weight: bold;
  167. }
  168. .value {
  169. color: rgba(146, 146, 176, 1);
  170. font-size: 32rpx;
  171. }
  172. display: flex;
  173. flex-direction: column;
  174. align-items: center;
  175. }
  176. .item2 {
  177. border-right: 1px solid rgba(187, 187, 187, 0.43);
  178. height: 70rpx;
  179. }
  180. }
  181. .page-content {
  182. .item:not(:last-child) {
  183. border-bottom:1px solid rgba(232,232,232,1);
  184. }
  185. .item {
  186. padding: 32rpx 0;
  187. display: flex;
  188. justify-content: space-between;
  189. align-items: center;
  190. .title {
  191. display: flex;
  192. justify-content: space-between;
  193. display: flex;
  194. align-items: center;
  195. color: rgba(51,51,51,1);
  196. .img {
  197. width: 32rpx;
  198. height: 32rpx;
  199. margin-right: 16rpx;
  200. }
  201. }
  202. }
  203. }
  204. }
  205. </style>