Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

user.vue 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. <template>
  2. <navBar title="九州ETC" :scrollTop="scrollTop" :isBack="isBack"></navBar>
  3. <view class="wrapper">
  4. <image :src="`${$imgUrl}user/bg-user-2.png`" class="bg-head" mode="widthFix"></image>
  5. <!-- <view class="bar" :style="{ top: top, height: height, lineHeight: height }">我的-九州ETC</view> -->
  6. <view class="content" :style="{ top: margin + 'px' }">
  7. <view class="head" :style="{ marinTop: margin + 'px' }">
  8. <view class="avatar">
  9. <image :src="`${$imgUrl}user/icon-avatar.png`" :class="!state.data.opId ? 'unlogin' : ''"></image>
  10. <view v-if="!state.data.opId" class="name" @click="$util.navTo('/login/login')">
  11. <view class="nickname">登录/注册</view>
  12. </view>
  13. <view v-else class="name">
  14. <view class="nickname">林晨曦</view>
  15. <view class="user-id">
  16. <view class="phone">15885137270</view>
  17. <view @click="$util.navTo('/personal-center/setting/change-phone', true)"
  18. class="btn-change">已关联</view>
  19. </view>
  20. </view>
  21. </view>
  22. <view class="setting" @click="$util.navTo('/personal-center/setting/setting', true)">
  23. <!-- <image :src="`${$imgUrl}user/icon-setting.png`"></image> -->
  24. <text>签到</text>
  25. </view>
  26. </view>
  27. <view class="panel-box">
  28. <view class="panel">
  29. <view class="panel-item">
  30. <view class="panel-text"><text class="num">2</text><text class="txt">辆</text></view>
  31. <text class="type">车辆</text>
  32. </view>
  33. <view class="panel-item">
  34. <text class="num">5</text>
  35. <text class="type">待办</text>
  36. </view>
  37. <view class="panel-item">
  38. <view class="panel-text"><text class="num">2</text><text class="txt">张</text></view>
  39. <text class="type">卡券</text>
  40. </view>
  41. <view class="panel-item">
  42. <view class="panel-text"><text class="num">2555</text><text class="txt">分</text></view>
  43. <text class="type">积分</text>
  44. </view>
  45. </view>
  46. <view class="notice">
  47. <image :src="`${$imgUrl}user/icon-tips.png`" class="icon-notice"></image>
  48. <view class="notice-content">您有一笔成功交易,点击查看详情</view>
  49. </view>
  50. </view>
  51. <view class="rights box">
  52. <view class="right-head">
  53. <view class="tit">我的权益</view>
  54. <view class="more">
  55. <text class="more-text">查看全部</text>
  56. <image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image>
  57. </view>
  58. </view>
  59. <view class="rights-items">
  60. <view class="item">
  61. <image :src="`${$imgUrl}user/icon-car-2.png`" class="icon"></image>
  62. <text class="tit">我的通行</text>
  63. <text class="sub-tit">查询账单、轨迹</text>
  64. </view>
  65. <view class="item">
  66. <image :src="`${$imgUrl}user/icon-door.png`" class="icon"></image>
  67. <text class="tit">上门服务</text>
  68. <text class="sub-tit">8折优惠</text>
  69. </view>
  70. <view class="item">
  71. <image :src="`${$imgUrl}user/icon-obu.png`" class="icon"></image>
  72. <text class="tit">设备险</text>
  73. <text class="sub-tit">享50元更换</text>
  74. </view>
  75. <view class="item">
  76. <image :src="`${$imgUrl}user/icon-bao.png`" class="icon"></image>
  77. <text class="tit">微保驾乘险</text>
  78. <text class="sub-tit">最高享20万</text>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="order box">
  83. <view class="right-head">
  84. <view class="tit">我的订单</view>
  85. <view class="more">
  86. <text class="more-text">查看全部</text>
  87. <image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image>
  88. </view>
  89. </view>
  90. <view class="order-items">
  91. <view class="item">
  92. <image :src="`${$imgUrl}user/icon-daifahuo.png`" class="icon"></image>
  93. <text class="tit">待发货</text>
  94. </view>
  95. <view class="item">
  96. <image :src="`${$imgUrl}user/icon-daishouhuo.png`" class="icon"></image>
  97. <text class="tit">待收货</text>
  98. </view>
  99. <view class="item">
  100. <image :src="`${$imgUrl}user/icon-daijihuo.png`" class="icon"></image>
  101. <text class="tit">待激活</text>
  102. </view>
  103. <view class="item">
  104. <image :src="`${$imgUrl}user/icon-tuihuanhuo.png`" class="icon"></image>
  105. <text class="tit">退换货/退款</text>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="go-through box">
  110. <view class="right-head">
  111. <view class="tit">本月通行</view>
  112. </view>
  113. <view class="pass">
  114. <view class="total m-top">
  115. <text>总消费</text>
  116. <text>总充值</text>
  117. </view>
  118. <view class="amount m-top">
  119. <text>¥ 501,220.00</text>
  120. <text>¥ 620,227.00</text>
  121. </view>
  122. <view class="line m-top">
  123. <view class="line1" style="width: 75%;"></view>
  124. <view class="line2"></view>
  125. </view>
  126. <view class="mileage">
  127. <view class="txt">
  128. <text class="tit">通行里程</text>
  129. <text class="val">81880km</text>
  130. </view>
  131. <view class="txt">
  132. <text class="tit">通行时长</text>
  133. <text class="val">21小时30分钟</text>
  134. </view>
  135. <view class="txt">
  136. <text class="tit ">通行次数</text>
  137. <text class="val">103次</text>
  138. </view>
  139. </view>
  140. <view class="detail">查看通行轨迹</view>
  141. </view>
  142. </view>
  143. <view class="cars box">
  144. <view class="right-head">
  145. <view class="tit">我的车辆</view>
  146. <view class="more">
  147. <text class="more-text">查看全部</text>
  148. <image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image>
  149. </view>
  150. </view>
  151. <view class="car-item">
  152. <image :src="`${$imgUrl}user/icon-car.png`" class="car-pic"></image>
  153. <view class="car-info">
  154. <view class="car-no"><text class="no">贵ZSC122</text><text class="color">蓝色</text></view>
  155. <view class="card-no">卡号:52011328220202006876</view>
  156. <view class="card-no">签号:5202192509222195</view>
  157. </view>
  158. <view class="btn-unbind">解除绑定</view>
  159. </view>
  160. <view class="sub-bind">
  161. <view class="item-tit">
  162. <image :src="`${$imgUrl}user/icon-car-3.png`" class="icon icon-2"></image>
  163. <text>我要关联车辆</text>
  164. </view>
  165. <view class="right-arrow">
  166. <view class="sub-tit">增加未关联车辆</view>
  167. <image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image>
  168. </view>
  169. </view>
  170. </view>
  171. <view class="menu">
  172. <view class="item" @click="$util.navTo('/personal-center/setting/setting', true)">
  173. <view class="item-tit">
  174. <image :src="`${$imgUrl}user/icon-setting.png`" class="icon icon-2"></image>
  175. <text>设置与资料管理</text>
  176. </view>
  177. <view class="right-arrow">
  178. <view class="sub-tit">隐私、密码管理</view>
  179. <image :src="`${$imgUrl}user/icon-arrow.png`" class="arrow"></image>
  180. </view>
  181. </view>
  182. </view>
  183. </view>
  184. </view>
  185. </template>
  186. <script lang="ts" setup>
  187. import { reactive } from "vue";
  188. import { msg, navTo } from "@/utils/utils";
  189. import { onMounted, ref } from "vue";
  190. import { getItem, StorageKeys } from "@/utils/storage";
  191. import navBar from "../../components/nav-bar/nav-bar2.vue";
  192. import { onLoad, onShow, onPageScroll } from "@dcloudio/uni-app";
  193. const height = ref(null);
  194. const top = ref(null);
  195. const margin = ref(null);
  196. const mobile = ref(null);
  197. const scrollTop = ref(0);
  198. const isBack = ref(false);
  199. const state = reactive({
  200. data: {
  201. opId: "",
  202. },
  203. });
  204. onMounted(() => {
  205. const res = uni.getMenuButtonBoundingClientRect();
  206. height.value = res.height + "px";
  207. top.value = res.top + "px";
  208. margin.value = res.height + res.top;
  209. });
  210. onLoad((option : any) => {
  211. state.data.opId = getItem(StorageKeys.OpenId);
  212. mobile.value = getItem("mobile");
  213. });
  214. //监听页面滚动
  215. onPageScroll((e) => {
  216. scrollTop.value = e.scrollTop;
  217. });
  218. onShow((option : any) => {
  219. state.data.opId = getItem(StorageKeys.OpenId);
  220. });
  221. </script>
  222. <style>
  223. page {
  224. background: #eef7f7;
  225. }
  226. </style>
  227. <style scoped>
  228. .unlogin {
  229. filter: grayscale(100%);
  230. opacity: 0.7;
  231. }
  232. .wrapper {
  233. position: relative;
  234. background: #fff;
  235. }
  236. .bar {
  237. width: 100%;
  238. position: fixed;
  239. text-align: center;
  240. font-size: 32rpx;
  241. font-weight: bold;
  242. }
  243. .bg-head {
  244. width: 100%;
  245. position: absolute;
  246. z-index: -99;
  247. top: 0;
  248. left: 0;
  249. }
  250. .content {
  251. position: absolute;
  252. display: flex;
  253. flex-direction: column;
  254. width: 100%;
  255. }
  256. .head {
  257. display: flex;
  258. justify-content: space-between;
  259. align-items: center;
  260. width: 100%;
  261. box-sizing: border-box;
  262. padding: 40rpx 0 46rpx;
  263. }
  264. .head .avatar {
  265. display: flex;
  266. align-items: center;
  267. }
  268. .head .avatar image {
  269. width: 120rpx;
  270. height: 120rpx;
  271. border-radius: 80rpx;
  272. border: 12rpx solid rgba(255, 255, 255, 0.5);
  273. margin: 0 20rpx 0 30rpx;
  274. }
  275. .head .setting {
  276. display: flex;
  277. align-items: center;
  278. background: rgba(0, 179, 139, .1);
  279. border: 1px solid #fff;
  280. height: 60rpx;
  281. border-radius: 30rpx;
  282. padding: 0 34rpx;
  283. color: #fff;
  284. font-size: 28rpx;
  285. margin-right: 30rpx;
  286. }
  287. .head .setting image {
  288. width: 40rpx;
  289. height: 40rpx;
  290. margin-right: 6rpx;
  291. }
  292. .head .nickname {
  293. font-size: 36rpx;
  294. color: #000000;
  295. }
  296. .head .user-id {
  297. font-size: 26rpx;
  298. color: #000000;
  299. padding-top: 30rpx;
  300. display: flex;
  301. align-items: center;
  302. }
  303. .head .btn-change {
  304. font-size: 22rpx;
  305. height: 40rpx;
  306. padding: 0 20rpx;
  307. border: 1px solid #fff;
  308. color: #fff;
  309. box-sizing: border-box;
  310. border-radius: 20rpx;
  311. margin-left: 16rpx;
  312. background: rgba(0, 179, 139, .1);
  313. }
  314. .panel-box {
  315. display: flex;
  316. flex-direction: column;
  317. background: #fff;
  318. margin: 0 30rpx 30rpx;
  319. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  320. border-radius: 20rpx;
  321. padding: 30rpx 0;
  322. }
  323. .panel {
  324. display: flex;
  325. justify-content: space-evenly;
  326. padding: 30rpx 0;
  327. }
  328. .panel-item {
  329. display: flex;
  330. flex-direction: column;
  331. justify-content: center;
  332. align-items: center;
  333. font-size: 32rpx;
  334. }
  335. .panel-item .num {
  336. font-weight: bold;
  337. color: #454545;
  338. }
  339. .panel-item .txt {
  340. font-size: 26rpx;
  341. }
  342. .panel-item .type {
  343. color: #999;
  344. font-size: 26rpx;
  345. padding: 14rpx 0;
  346. }
  347. .panel-box .icon-notice {
  348. width: 48rpx;
  349. height: 48rpx;
  350. }
  351. .panel-box .notice {
  352. display: flex;
  353. font-size: 32rpx;
  354. margin: 0 30rpx;
  355. align-items: center;
  356. background: #f3f3f3;
  357. border-radius: 10rpx;
  358. padding: 0 14rpx;
  359. }
  360. .panel-box .notice .notice-content {
  361. height: 68rpx;
  362. line-height: 68rpx;
  363. padding: 0 12rpx;
  364. font-size: 28rpx;
  365. }
  366. .box .arrow {
  367. width: 14rpx;
  368. height: 26rpx;
  369. }
  370. .box {
  371. background: #ffffff;
  372. margin: 0 30rpx 30rpx;
  373. padding: 30rpx;
  374. border-radius: 20rpx;
  375. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  376. }
  377. .box .more {
  378. display: flex;
  379. font-size: 26rpx;
  380. color: #808080;
  381. align-items: center;
  382. }
  383. .box .more .more-text {
  384. padding-right: 12rpx;
  385. }
  386. .box .right-head {
  387. display: flex;
  388. justify-content: space-between;
  389. }
  390. .box .right-head .tit {
  391. font-size: 32rpx;
  392. /* font-weight: bold; */
  393. }
  394. .rights .rights-items {
  395. display: flex;
  396. justify-content: space-evenly;
  397. padding: 30rpx 0;
  398. }
  399. .rights .item {
  400. display: flex;
  401. flex-direction: column;
  402. align-items: center;
  403. justify-content: center;
  404. }
  405. .rights .item .tit {
  406. font-size: 26rpx;
  407. color: #333;
  408. padding: 20rpx 0 10rpx 0;
  409. }
  410. .rights .item .sub-tit {
  411. font-size: 22rpx;
  412. color: #999;
  413. }
  414. .order .order-items {
  415. display: flex;
  416. justify-content: space-evenly;
  417. padding: 30rpx 0;
  418. }
  419. .order .item {
  420. display: flex;
  421. flex-direction: column;
  422. align-items: center;
  423. justify-content: center;
  424. }
  425. .order .item .tit {
  426. font-size: 26rpx;
  427. color: #333;
  428. padding: 20rpx 0 10rpx 0;
  429. }
  430. .box .icon {
  431. width: 56rpx;
  432. height: 56rpx;
  433. }
  434. .go-through .pass {
  435. display: flex;
  436. flex-direction: column;
  437. }
  438. .go-through .total {
  439. display: flex;
  440. justify-content: space-between;
  441. font-size: 26rpx;
  442. color: #999;
  443. }
  444. .go-through .amount {
  445. display: flex;
  446. justify-content: space-between;
  447. align-items: center;
  448. font-size: 28rpx;
  449. color: #333;
  450. }
  451. .go-through .line {
  452. display: flex;
  453. }
  454. .go-through .line1 {
  455. height: 8rpx;
  456. background: #00B38B;
  457. border-radius: 4rpx;
  458. }
  459. .go-through .line2 {
  460. height: 8rpx;
  461. background: #F1F1F1;
  462. border-radius: 0 4rpx 4rpx 0;
  463. flex: 1;
  464. }
  465. .go-through .mileage {
  466. display: flex;
  467. justify-content: space-evenly;
  468. align-items: center;
  469. text-align: center;
  470. margin: 32rpx 0;
  471. }
  472. .go-through .mileage .txt {
  473. display: flex;
  474. flex-direction: column;
  475. }
  476. .go-through .mileage .tit {
  477. font-size: 26rpx;
  478. color: #999;
  479. }
  480. .go-through .mileage .val {
  481. font-size: 28rpx;
  482. color: #333;
  483. margin-top: 16rpx;
  484. }
  485. .go-through .m-top {
  486. margin-top: 16rpx;
  487. }
  488. .go-through .detail {
  489. width: 100%;
  490. text-align: center;
  491. color: #00B38B;
  492. font-size: 24rpx;
  493. border-top: 1px solid #DCDCDC;
  494. padding-top: 24rpx;
  495. }
  496. .cars .car-item {
  497. display: flex;
  498. align-items: center;
  499. padding: 36rpx 0;
  500. }
  501. .cars .car-item .btn-unbind {
  502. border: 1px solid #00B38B;
  503. border-radius: 30rpx;
  504. height: 60rpx;
  505. box-sizing: border-box;
  506. line-height: 60rpx;
  507. font-size: 24rpx;
  508. padding: 0 20rpx;
  509. background: rgba(0, 179, 139, .1);
  510. color: #00B38B;
  511. }
  512. .cars .car-pic {
  513. width: 120rpx;
  514. height: 120rpx;
  515. margin-right: 12rpx;
  516. }
  517. .cars .car-info {
  518. display: flex;
  519. flex-direction: column;
  520. flex: 1;
  521. color: #999;
  522. font-size: 22rpx;
  523. }
  524. .cars .car-no {
  525. font-size: 30rpx;
  526. color: #333;
  527. }
  528. .cars .card-no {
  529. margin-top: 14rpx;
  530. }
  531. .cars .sub-bind {
  532. display: flex;
  533. align-items: center;
  534. justify-content: space-between;
  535. border-top: 1px solid #F1F1F1;
  536. padding-top: 20rpx;
  537. }
  538. .cars .sub-bind .item-tit {
  539. display: flex;
  540. align-items: center;
  541. font-size: 26rpx;
  542. color: #333;
  543. }
  544. .cars .sub-bind .right-arrow {
  545. font-size: 22rpx;
  546. color: #ccc;
  547. display: flex;
  548. justify-content: center;
  549. align-items: center;
  550. }
  551. .cars .sub-bind .sub-tit {
  552. padding-right: 20rpx;
  553. }
  554. .menu {
  555. background: #ffffff;
  556. /* border-radius: 30rpx 30rpx 0 0; */
  557. padding: 0 30rpx;
  558. margin: 0 30rpx 30rpx;
  559. border-radius: 20rpx;
  560. box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(223, 223, 223, 0.8);
  561. }
  562. .menu .arrow {
  563. width: 14rpx;
  564. height: 26rpx;
  565. }
  566. .menu .icon {
  567. width: 48rpx;
  568. height: 48rpx;
  569. margin-right: 10rpx;
  570. }
  571. .menu .item {
  572. display: flex;
  573. justify-content: space-between;
  574. align-items: center;
  575. /* border-bottom: 1px solid #dcdcdc; */
  576. padding: 20rpx 0;
  577. }
  578. .menu .item:first-child {
  579. margin-top: 10rpx;
  580. }
  581. .menu .item-tit {
  582. display: flex;
  583. align-items: center;
  584. font-size: 26rpx;
  585. color: #333;
  586. }
  587. .menu .right-arrow {
  588. font-size: 22rpx;
  589. color: #ccc;
  590. display: flex;
  591. justify-content: center;
  592. align-items: center;
  593. }
  594. .menu .sub-tit {
  595. padding-right: 20rpx;
  596. }
  597. </style>