mine.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <view>
  3. <view class="topBox">
  4. <image src="../../static/login_bgground@2x.png" style="width: 100%;height: 100%;"></image>
  5. <view class="headPhoto" @tap="seeMyInfo">
  6. <image src="../../static/login_bgground@2x.png" style="width: 122rpx;height: 122rpx;border-radius: 50%;margin:18rpx;"></image>
  7. </view>
  8. <view class="name" @tap="seeMyInfo">
  9. 星河
  10. </view>
  11. <view class="phone" @tap="seeMyInfo">15825252525</view>
  12. <!-- 车辆数 -->
  13. <view class="carBox" >
  14. <view class="leftCar" @tap="seeMyCar">
  15. <view class="num">{{carNum?carNum:0}}</view>
  16. <view class="text">汽车辆数</view>
  17. </view>
  18. <view class="rightCar" @tap="seeMyBike">
  19. <view class="num" style="width: 134rpx;">0</view>
  20. <view class="text" style="width: 134rpx;">电动车辆数</view>
  21. </view>
  22. </view>
  23. </view>
  24. <!-- 菜单栏 -->
  25. <view class="main">
  26. <view class="item" @tap="seeMyhouse">
  27. <view class="leftIcon">
  28. <image src="../../static/my_icon_house@2x.png" style="width: 38rpx;height: 40rpx;"></image>
  29. </view>
  30. <view style="display: flex;justify-content: space-between;margin-left: 32rpx;width: 100%;margin-top: 48rpx;">
  31. <view class="title">我的房屋</view>
  32. <image src="../../static/icon_more@2x.png" style="width:15rpx ;height: 28rpx;margin-top: 8rpx;"></image>
  33. </view>
  34. </view>
  35. <view class="item" @tap="visitorInfo">
  36. <view class="leftIcon">
  37. <image src="../../static/my_icon_information@2x.png" style="width:40rpx;height:35rpx;margin-top: 5rpx;"></image>
  38. </view>
  39. <view style="display: flex;justify-content: space-between;margin-left: 32rpx;width: 100%;margin-top: 48rpx;">
  40. <view class="title">访客信息</view>
  41. <image src="../../static/icon_more@2x.png" style="width:15rpx ;height: 28rpx;margin-top: 8rpx;"></image>
  42. </view>
  43. </view>
  44. <view class="item" @tap="changeFace">
  45. <view class="leftIcon">
  46. <image src="../../static/my_icon_formwork@2x.png" style="width: 38rpx;height: 40rpx;"></image>
  47. </view>
  48. <view style="display: flex;justify-content: space-between;margin-left: 32rpx;width: 100%;margin-top: 48rpx;">
  49. <view class="title">人脸模板</view>
  50. <image src="../../static/icon_more@2x.png" style="width:15rpx ;height: 28rpx;margin-top: 8rpx;"></image>
  51. </view>
  52. </view>
  53. <view class="item" @tap="seeMyFamily">
  54. <view class="leftIcon">
  55. <image src="../../static/my_icon_family@2x.png" style="width: 38rpx;height: 40rpx;"></image>
  56. </view>
  57. <view style="display: flex;justify-content: space-between;margin-left: 32rpx;width: 100%;margin-top: 48rpx;">
  58. <view class="title">我的家人</view>
  59. <image src="../../static/icon_more@2x.png" style="width:15rpx ;height: 28rpx;margin-top: 8rpx;"></image>
  60. </view>
  61. </view>
  62. <view class="item" @tap="seeMyMessage">
  63. <view class="leftIcon">
  64. <image src="../../static/myMessage.png" style="width: 38rpx;height: 40rpx;"></image>
  65. </view>
  66. <view style="display: flex;justify-content: space-between;margin-left: 32rpx;width: 100%;margin-top: 48rpx;">
  67. <view class="title">我的消息</view>
  68. <image src="../../static/icon_more@2x.png" style="width:15rpx ;height: 28rpx;margin-top: 8rpx;"></image>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <script>
  75. export default{
  76. data(){
  77. return{
  78. carNum:0,//汽车数量
  79. bikeNum:0,//自行车数量
  80. }
  81. },
  82. onShow() {
  83. this.getCarData()
  84. },
  85. onLoad() {
  86. },
  87. methods:{
  88. // 获取汽车车辆数
  89. getCarData(){
  90. uni.showLoading({
  91. mask:true,
  92. title:'加载中'
  93. })
  94. this.http.httpRequest('/wxapplet/ownercar/list','get',{
  95. cardId:uni.getStorageSync('idNumber'),
  96. pageNum:1,
  97. pageSize:10
  98. },true).then((res)=>{
  99. uni.hideLoading()
  100. console.log(res)
  101. if(res.code==0){
  102. this.carNum = res.data.rows.length
  103. }else{
  104. uni.hideLoading()
  105. }
  106. }).catch(()=>{
  107. uni.hideLoading()
  108. })
  109. },
  110. // 查看电动车
  111. seeMyBike(){
  112. uni.navigateTo({
  113. url:'./myBike'
  114. })
  115. },
  116. // 访客信息
  117. visitorInfo(){
  118. uni.navigateTo({
  119. url:"../visitor/historyList"
  120. })
  121. },
  122. // 查看个人资料
  123. seeMyInfo(){
  124. uni.navigateTo({
  125. url:"myInfo"
  126. })
  127. },
  128. // 查看我的汽车
  129. seeMyCar(){
  130. uni.navigateTo({
  131. url:"myCar"
  132. })
  133. },
  134. // 查看我的房屋
  135. seeMyhouse(){
  136. uni.navigateTo({
  137. url:"myHouse"
  138. })
  139. },
  140. //更换人脸模板
  141. changeFace(){
  142. uni.navigateTo({
  143. url:"./face"
  144. })
  145. },
  146. // 查看我的家人
  147. seeMyFamily(){
  148. uni.navigateTo({
  149. url:"./family"
  150. })
  151. },
  152. // 查看我的消息
  153. seeMyMessage(){
  154. uni.navigateTo({
  155. url:"./message"
  156. })
  157. }
  158. }
  159. }
  160. </script>
  161. <style>
  162. .leftIcon{
  163. width:38rpx;
  164. height:40rpx;
  165. margin-top: 48rpx;
  166. }
  167. .item{
  168. width: 650rpx;
  169. height: 140rpx;
  170. margin: 0 auto;
  171. border-bottom:2rpx solid rgba(245,245,245,1);
  172. display: flex;
  173. }
  174. .main{
  175. width: 100%;
  176. margin-top: 50rpx;
  177. overflow: hidden;
  178. }
  179. .carBox{
  180. width:650rpx;
  181. height:170rpx;
  182. background:rgba(255,255,255,1);
  183. box-shadow:0rpx 6rpx 20rpx rgba(0,0,0,0.12);
  184. opacity:1;
  185. border-radius:86rpx;
  186. position: absolute;
  187. left: 50rpx;
  188. bottom: -54rpx;
  189. display: flex;
  190. }
  191. .leftCar{
  192. width: 218rpx;
  193. height: 90rpx;
  194. margin-left: 108rpx;
  195. border-right:2px solid rgba(247,247,247,1); ;
  196. margin-top: 40rpx;
  197. }
  198. .rightCar{
  199. height: 90rpx;
  200. margin-top: 40rpx;
  201. margin-left: 96rpx;
  202. }
  203. .num{
  204. width: 108rpx;
  205. height:44rpx;
  206. font-size:32rpx;
  207. font-family:PingFang SC;
  208. font-weight:bold;
  209. color:rgba(51,51,51,1);
  210. text-align: center;
  211. line-height: 44rpx;
  212. }
  213. .text{
  214. height:36rpx;
  215. font-size:26rpx;
  216. font-family:PingFang SC;
  217. font-weight:400;
  218. color:rgba(51,51,51,1);
  219. }
  220. .name{
  221. height: 50rpx;
  222. font-size:36rpx;
  223. font-family:PingFang SC;
  224. font-weight:400;
  225. color:rgba(255,255,255,1);
  226. position: absolute;
  227. bottom: 216rpx;
  228. left: 220rpx;
  229. }
  230. .phone{
  231. width:168rpx;
  232. height:34rpx;
  233. font-size:24rpx;
  234. font-family:PingFang SC;
  235. font-weight:400;
  236. color:rgba(255,255,255,1);
  237. position: absolute;
  238. bottom: 176rpx;
  239. left: 220rpx;
  240. }
  241. .topBox{
  242. width: 100%;
  243. height: 430rpx;
  244. position: relative;
  245. }
  246. .headPhoto{
  247. width:160rpx;
  248. height:160rpx;
  249. border:2rpx solid rgba(255,255,255,1);
  250. border-radius:50%;
  251. opacity:1;
  252. position: absolute;
  253. left: 50rpx;
  254. bottom: 142rpx;
  255. background:#000000;
  256. }
  257. </style>