chooseCar.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. <template>
  2. <view class="container">
  3. <!-- 信息区域 -->
  4. <view class="body">
  5. <!-- 车辆信息区域 -->
  6. <view class="carMsg">
  7. <view class="carMsg_time">09月09日 14:50</view>
  8. <view class="carMsg_number">车牌:M06001</view>
  9. <view class="carMsg_volume">容量:60座</view>
  10. <image class="carMsg_line" src="@/static/images/chooseCar/line.png" mode="aspectFill" />
  11. <view class="carMsg_start">南昌交通学院墨轩湖校区</view>
  12. <view class="carMsg_end">南昌火车站</view>
  13. <view class="carMsg_bottom">
  14. <view class="bottom_box" @click="handleRule">退改规则</view>
  15. </view>
  16. </view>
  17. <!-- 乘客信息区域 -->
  18. <view class="peopleMsg">
  19. <view class="peopleMsg_title">乘客信息</view>
  20. <view class="peopleMsg_list">
  21. <view v-for="item in 2" :key="item" class="list_item active">
  22. 哈哈哈11111
  23. <view class="item_active">
  24. <wd-icon name="check" color="#fff" size="8" />
  25. </view>
  26. </view>
  27. <view class="list_more" @click="handleMore">+ 更多</view>
  28. </view>
  29. <view class="peopleMsg_choose">
  30. <view v-for="item in 2" :key="item" class="choose_item">
  31. <wd-icon name="minus-circle" color="#FF8205" size="22" />
  32. <view class="item_msg">
  33. <view class="msg_top">哈哈哈</view>
  34. <view class="msg_bottom">身份证 452***********2256</view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="peopleMsg_foot">
  39. <view class="foot_left">
  40. <wd-icon name="phone" color="#FF8205" size="25" />
  41. <view class="left_text">手机号</view>
  42. </view>
  43. <view class="foot_phone">
  44. <input v-model="value" :maxlength="11" placeholder-style="font-size:28rpx;color:#ABA6A6;text-align: end;" type="text" placeholder="请填写联系手机号" />
  45. </view>
  46. </view>
  47. </view>
  48. <!-- 优惠券区域 -->
  49. <view class="coupon">
  50. <view class="coupon_title">优惠</view>
  51. <view class="coupon_box">
  52. <view class="box_left">
  53. <image class="left_img" src="@/static/images/chooseCar/coupon.png" mode="aspectFill" />
  54. 优惠券
  55. </view>
  56. <view class="box_right">
  57. 暂无优惠券
  58. <wd-icon name="chevron-right" color="#ABA6A6" size="18" />
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 底部按钮区域 -->
  64. <view class="foot">
  65. <view class="foot_box">
  66. <view class="box_text">
  67. ¥
  68. <text class="text">30</text>
  69. </view>
  70. <view class="box_btn">立即购买</view>
  71. </view>
  72. </view>
  73. </view>
  74. <!-- 退改规则弹窗区域 -->
  75. <wd-popup v-model="popShow_rule" position="bottom" safe-area-inset-bottom :close-on-click-modal="false">
  76. <view class="pop_rule">
  77. <view class="rule_title">退改规则</view>
  78. <view class="rule_body">
  79. <view class="body_text">
  80. <view class="text">发车前24小时以上,免收手续费;</view>
  81. <view class="text">发车前3小时以上24小时以内,收取10%手续费;</view>
  82. <view class="text">发车前3小时以内,收取20%手续费;</view>
  83. <view class="text">发车后不退票。</view>
  84. </view>
  85. <view class="body_btn" @click="handleCloseRule">我知道了</view>
  86. </view>
  87. </view>
  88. </wd-popup>
  89. <!-- 常用旅客弹窗区域 -->
  90. <wd-popup v-model="popShow_common" position="bottom" safe-area-inset-bottom :close-on-click-modal="false">
  91. <view class="pop_common">
  92. <view class="common_title">
  93. 常用旅客
  94. <view class="title_close" @click="handleCloseCommon">
  95. <wd-icon name="close" color="#ABA6A6" size="20" />
  96. </view>
  97. </view>
  98. <view class="common_body">
  99. <view class="body_add" @click="handleAdd">+ 添加乘客</view>
  100. <view class="body_list">
  101. <!-- 每一个乘客区域 -->
  102. <view v-for="item in 6" :key="item" class="list_item">
  103. <view class="item_left">
  104. <wd-icon name="edit-outline" color="#ABA6A6" size="17" />
  105. <view class="left_msg">
  106. <view class="msg_name">啊啊啊</view>
  107. <view class="msg_idcard">身份证 452***********2256</view>
  108. <view class="msg_phone">手机号 158****5566</view>
  109. </view>
  110. </view>
  111. <view class="item_right">
  112. <radio color="#FF8205" :checked="isCheck" @click="isCheck = !isCheck" />
  113. </view>
  114. </view>
  115. </view>
  116. <view class="body_btn" @click="handleConfirm">确认</view>
  117. </view>
  118. </view>
  119. </wd-popup>
  120. </template>
  121. <script setup>
  122. import { onLoad } from '@dcloudio/uni-app'
  123. import { ref } from 'vue'
  124. import { myRequest } from '@/utils/api.ts'
  125. import debounce from 'lodash/debounce'
  126. const userInfo = uni.getStorageSync('carUserInfo')
  127. const popShow_rule = ref(false)
  128. const popShow_common = ref(false)
  129. const isCheck = ref(false)
  130. onLoad((options) => {
  131. if (options.info) {
  132. const info = JSON.parse(decodeURIComponent(options.info))
  133. console.log(info)
  134. }
  135. })
  136. function handleRule() {
  137. popShow_rule.value = true
  138. }
  139. function handleCloseRule() {
  140. popShow_rule.value = false
  141. }
  142. function handleMore() {
  143. popShow_common.value = true
  144. }
  145. function handleCloseCommon() {
  146. popShow_common.value = false
  147. }
  148. function handleConfirm() {
  149. popShow_common.value = false
  150. }
  151. function handleAdd() {
  152. uni.navigateTo({
  153. url: '/pages/handlePeople/handlePeople'
  154. })
  155. }
  156. </script>
  157. <style lang="scss" scoped>
  158. .container {
  159. display: flex;
  160. height: 100vh;
  161. color: #001713;
  162. .body {
  163. width: 100%;
  164. height: calc(100vh - 244rpx);
  165. overflow-y: auto;
  166. .carMsg {
  167. position: relative;
  168. box-sizing: border-box;
  169. padding: 0 55rpx;
  170. margin: 20rpx auto 0;
  171. width: 720rpx;
  172. height: 320rpx;
  173. font-size: 32rpx;
  174. color: #001713;
  175. background: url(@/static/images/chooseCar/box.png);
  176. background-size: 100% 100%;
  177. .carMsg_time {
  178. position: absolute;
  179. top: 36rpx;
  180. font-size: 36rpx;
  181. color: #001713;
  182. }
  183. .carMsg_number {
  184. position: absolute;
  185. top: 44rpx;
  186. right: 55rpx;
  187. font-size: 24rpx;
  188. color: #f86818;
  189. }
  190. .carMsg_volume {
  191. position: absolute;
  192. top: 86rpx;
  193. right: 55rpx;
  194. font-size: 24rpx;
  195. color: #f86818;
  196. }
  197. .carMsg_line {
  198. position: absolute;
  199. top: 128rpx;
  200. left: 55rpx;
  201. width: 14rpx;
  202. height: 88rpx;
  203. }
  204. .carMsg_start {
  205. position: absolute;
  206. top: 106rpx;
  207. left: 95rpx;
  208. width: 460rpx;
  209. }
  210. .carMsg_end {
  211. position: absolute;
  212. top: 185rpx;
  213. left: 95rpx;
  214. width: 460rpx;
  215. }
  216. .carMsg_bottom {
  217. position: absolute;
  218. top: 236rpx;
  219. left: 46rpx;
  220. display: flex;
  221. align-items: center;
  222. width: 630rpx;
  223. height: 66rpx;
  224. border-top: 2rpx dotted #e6e6e6;
  225. .bottom_box {
  226. display: flex;
  227. justify-content: center;
  228. align-items: center;
  229. width: 128rpx;
  230. height: 42rpx;
  231. font-size: 24rpx;
  232. color: #ff8205;
  233. border-radius: 8rpx;
  234. background-color: #fff2e5;
  235. }
  236. }
  237. }
  238. .peopleMsg {
  239. box-sizing: border-box;
  240. padding: 30rpx 30rpx 0;
  241. margin: auto;
  242. width: 670rpx;
  243. font-size: 28rpx;
  244. box-shadow: 0px 3px 6px #ccc;
  245. background-color: #fff;
  246. .peopleMsg_title {
  247. margin-bottom: 20rpx;
  248. font-size: 36rpx;
  249. }
  250. .peopleMsg_list {
  251. display: flex;
  252. flex-wrap: wrap;
  253. align-items: center;
  254. .list_item {
  255. position: relative;
  256. display: flex;
  257. justify-content: center;
  258. align-items: center;
  259. margin-right: 30rpx;
  260. margin-bottom: 26rpx;
  261. padding: 0 24rpx;
  262. height: 68rpx;
  263. color: #aba6a6;
  264. border-radius: 8rpx;
  265. border: 2rpx solid #aba6a6;
  266. .item_active {
  267. position: absolute;
  268. bottom: -20rpx;
  269. right: -20rpx;
  270. display: flex;
  271. align-items: center;
  272. justify-content: center;
  273. width: 60rpx;
  274. height: 60rpx;
  275. background-image: url(@/static/images/chooseCar/active.png);
  276. background-size: 100% 100%;
  277. }
  278. }
  279. .active {
  280. color: #ff8205;
  281. border: 2rpx solid #ff8205;
  282. }
  283. .list_more {
  284. display: flex;
  285. justify-content: center;
  286. align-items: center;
  287. margin-bottom: 26rpx;
  288. width: 132rpx;
  289. height: 68rpx;
  290. color: #ff8205;
  291. border-radius: 8rpx;
  292. border: 2rpx solid #aba6a6;
  293. }
  294. }
  295. .peopleMsg_choose {
  296. .choose_item {
  297. display: flex;
  298. align-items: center;
  299. .item_msg {
  300. display: flex;
  301. flex-direction: column;
  302. justify-content: space-between;
  303. margin-left: 26rpx;
  304. margin-bottom: 26rpx;
  305. height: 90rpx;
  306. .msg_top {
  307. font-size: 36rpx;
  308. }
  309. .msg_bottom {
  310. font-size: 24rpx;
  311. color: #aba6a6;
  312. }
  313. }
  314. }
  315. }
  316. .peopleMsg_foot {
  317. display: flex;
  318. align-items: center;
  319. justify-content: space-between;
  320. height: 116rpx;
  321. font-size: 36rpx;
  322. border-top: 2rpx solid #ebecf1;
  323. .foot_left {
  324. display: flex;
  325. align-items: center;
  326. .left_text {
  327. margin-left: 12rpx;
  328. }
  329. }
  330. .foot_phone {
  331. text-align: end;
  332. }
  333. }
  334. }
  335. .coupon {
  336. box-sizing: border-box;
  337. padding: 0 30rpx 30rpx;
  338. margin: 20rpx auto 50rpx;
  339. width: 670rpx;
  340. color: #001713;
  341. box-shadow: 0px 3px 6px #ccc;
  342. background-color: #fff;
  343. .coupon_title {
  344. height: 96rpx;
  345. line-height: 96rpx;
  346. font-size: 36rpx;
  347. }
  348. .coupon_box {
  349. display: flex;
  350. justify-content: space-between;
  351. align-items: center;
  352. height: 70rpx;
  353. .box_left {
  354. display: flex;
  355. align-items: center;
  356. .left_img {
  357. margin-right: 14rpx;
  358. width: 46rpx;
  359. height: 46rpx;
  360. }
  361. }
  362. .box_right {
  363. display: flex;
  364. align-items: center;
  365. font-size: 24rpx;
  366. color: #aba6a6;
  367. }
  368. }
  369. }
  370. }
  371. .foot {
  372. position: absolute;
  373. bottom: 0;
  374. box-sizing: border-box;
  375. padding: 0 30rpx;
  376. width: 100%;
  377. height: 244rpx;
  378. box-shadow: 0px -3px 6px #eee;
  379. background-color: #fff;
  380. .foot_box {
  381. display: flex;
  382. align-items: center;
  383. justify-content: space-between;
  384. margin-top: 46rpx;
  385. height: 96rpx;
  386. .box_text {
  387. color: #dc2626;
  388. font-size: 36rpx;
  389. .text {
  390. font-size: 48rpx;
  391. }
  392. }
  393. .box_btn {
  394. display: flex;
  395. align-items: center;
  396. justify-content: center;
  397. width: 272rpx;
  398. height: 96rpx;
  399. font-size: 36rpx;
  400. color: #fff;
  401. border-radius: 64rpx;
  402. background-color: #ff8205;
  403. }
  404. }
  405. }
  406. }
  407. .pop_rule {
  408. height: 568rpx;
  409. color: #001713;
  410. overflow: hidden;
  411. .rule_title {
  412. display: flex;
  413. align-items: center;
  414. justify-content: center;
  415. height: 114rpx;
  416. font-size: 36rpx;
  417. background-color: #fff2e5;
  418. }
  419. .rule_body {
  420. box-sizing: border-box;
  421. padding: 0 32rpx;
  422. .body_text {
  423. box-sizing: border-box;
  424. padding: 30rpx;
  425. margin-top: 20rpx;
  426. font-size: 24rpx;
  427. border-radius: 32rpx;
  428. background-color: #fff2e5;
  429. .text {
  430. margin-bottom: 8rpx;
  431. }
  432. }
  433. .body_btn {
  434. display: flex;
  435. align-items: center;
  436. justify-content: center;
  437. margin-top: 20rpx;
  438. height: 94rpx;
  439. font-size: 36rpx;
  440. color: #fff;
  441. border-radius: 64rpx;
  442. background-color: #ff8205;
  443. }
  444. }
  445. }
  446. .pop_common {
  447. height: 70vh;
  448. font-size: 36rpx;
  449. color: #001713;
  450. overflow: hidden;
  451. .common_title {
  452. position: relative;
  453. display: flex;
  454. align-items: center;
  455. justify-content: center;
  456. height: 100rpx;
  457. border-bottom: 20rpx solid #ff8205;
  458. .title_close {
  459. position: absolute;
  460. top: 34rpx;
  461. right: 40rpx;
  462. width: 40rpx;
  463. height: 40rpx;
  464. }
  465. }
  466. .common_body {
  467. box-sizing: border-box;
  468. padding: 0 32rpx;
  469. .body_add {
  470. margin: 25rpx 0 25rpx auto;
  471. width: 170rpx;
  472. font-size: 32rpx;
  473. color: #ff8205;
  474. }
  475. .body_list {
  476. height: calc(70vh - 396rpx);
  477. overflow-y: auto;
  478. .list_item {
  479. display: flex;
  480. align-items: center;
  481. justify-content: space-between;
  482. margin-bottom: 20rpx;
  483. height: 120rpx;
  484. .item_left {
  485. display: flex;
  486. align-items: center;
  487. height: 100%;
  488. .left_msg {
  489. display: flex;
  490. flex-direction: column;
  491. justify-content: space-between;
  492. margin-left: 20rpx;
  493. height: 100%;
  494. font-size: 24rpx;
  495. color: #aba6a6;
  496. .msg_name {
  497. font-size: 36rpx;
  498. color: #001713;
  499. }
  500. }
  501. }
  502. .item_right {
  503. }
  504. }
  505. }
  506. .body_btn {
  507. display: flex;
  508. align-items: center;
  509. justify-content: center;
  510. margin: 48rpx 0;
  511. width: 100%;
  512. height: 92rpx;
  513. color: #fff;
  514. border-radius: 48rpx;
  515. background-color: #ff8205;
  516. }
  517. }
  518. }
  519. </style>