chooseCar.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023
  1. <template>
  2. <view class="container">
  3. <!-- 信息区域 -->
  4. <view class="body">
  5. <!-- 车辆信息区域 -->
  6. <view class="carMsg">
  7. <view class="carMsg_time">{{info.s_date}} {{info.ci_time}}</view>
  8. <view class="carMsg_number">车牌:{{info.car_number}}</view>
  9. <view class="carMsg_volume">容量:{{info.contain}}座</view>
  10. <image class="carMsg_line" src="@/static/images/chooseCar/line.png" mode="aspectFill" />
  11. <view class="carMsg_start">{{getRouteParts(info.route_end).prefix}}</view>
  12. <view class="carMsg_end">{{getRouteParts(info.route_end).suffix}}</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,index) in selectedPassengers" :key="index" class="list_item active" @click="toggleCheck(item)">
  22. {{item.username}}
  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,index) in selectedPassengers" :key="index" class="choose_item">
  31. <wd-icon name="minus-circle" color="#FF8205" size="22" @click="toggleCheck(item)" />
  32. <view class="item_msg">
  33. <view class="msg_top">{{item.username}}</view>
  34. <view class="msg_bottom">身份证 {{item.sfzh}}</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">{{info.price}}</text>
  69. </view>
  70. <view class="box_btn" @click="handlePay">立即购买</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">发车前{{guizea1}}小时以上,免收手续费;</view>
  81. <view class="text">发车前{{guizea2}}小时以上{{guizea3}}小时以内,收取{{guizea4}}%手续费;</view>
  82. <view class="text">发车前{{guizea5}}小时以内,收取{{guizea6}}%手续费;</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. <scroll-view
  101. scroll-y
  102. class="scroll-container"
  103. @scrolltolower="loadNextPage"
  104. >
  105. <view class="body_list">
  106. <!-- 每一个乘客区域 -->
  107. <view v-for="(item,index) in dataList" :key="index" class="list_item">
  108. <view class="item_left">
  109. <wd-icon name="edit-outline" color="#ABA6A6" size="17" @click="handleUp(item)" />
  110. <view class="left_msg">
  111. <view class="msg_name">{{item.username}}</view>
  112. <view class="msg_idcard">身份证 {{item.sfzh}}</view>
  113. <view class="msg_phone">手机号 {{item.mobile}}</view>
  114. </view>
  115. </view>
  116. <view class="item_right">
  117. <radio color="#FF8205" :checked="item.isCheck" @click="toggleCheck(item)" />
  118. </view>
  119. </view>
  120. </view>
  121. <!-- 加载状态提示 -->
  122. <view v-if="isLoading" class="loading">加载中...</view>
  123. </scroll-view>
  124. <view class="body_btn" @click="handleConfirm">确认</view>
  125. </view>
  126. </view>
  127. </wd-popup>
  128. <!-- 选择付款方式弹窗区域 -->
  129. <wd-popup v-model="popShow_pay" position="bottom" safe-area-inset-bottom :close-on-click-modal="false">
  130. <view class="pop_pay">
  131. <view class="pay_title">选择付款方式</view>
  132. <view class="pay_close" @click="handleClose">
  133. <wd-icon name="close-bold" color="#ABA6A6" size="22"></wd-icon>
  134. </view>
  135. <!-- 支付方式列表区域 -->
  136. <view class="pay_list">
  137. <!-- 每一个支付方式区域 -->
  138. <view class="list_item" v-for="(item, index) in payList" :key="index">
  139. <view class="item_left">
  140. <image class="img" :src="item.icon" mode="aspectFill"></image>
  141. {{ item.text }}
  142. </view>
  143. <view class="item_right">
  144. <radio style="scale: 0.8" color="#FF8205" :checked="item.isCheck" @click="togglePay(item)" />
  145. </view>
  146. </view>
  147. </view>
  148. <!-- 立即付款按钮区域 -->
  149. <view class="pay_btn" @click="payTime">立即付款</view>
  150. </view>
  151. </wd-popup>
  152. </template>
  153. <script setup>
  154. import { onLoad } from '@dcloudio/uni-app'
  155. import { ref,computed } from 'vue'
  156. import { myRequest } from '@/utils/api.ts'
  157. import debounce from 'lodash/debounce'
  158. const userInfo = uni.getStorageSync('carUserInfo')
  159. const popShow_rule = ref(false)
  160. const popShow_common = ref(false)
  161. const info = ref({})
  162. // 每页多少条
  163. const pageSize = ref(8)
  164. // 当前页
  165. const currentPage = ref(1)
  166. // 总条数
  167. const total = ref(0)
  168. // 常用旅客数组数据
  169. const dataList = ref([])
  170. //加载中状态
  171. const isLoading = ref(false)
  172. //是否还有更多数据
  173. const hasMore = ref(true)
  174. // 已选乘车人列表
  175. const selectedPassengers = ref([]);
  176. // 联系手机号
  177. const phoneValue = ref('');
  178. // 付款方式弹窗显示隐藏控制
  179. const popShow_pay = ref(false)
  180. // 支付方式列表
  181. const payList = ref([
  182. {
  183. text: '微信支付',
  184. icon: '/static/images/pay/wx.png',
  185. isCheck: false
  186. },
  187. {
  188. text: '电子交通卡支付',
  189. icon: '/static/images/pay/card.png',
  190. isCheck: false
  191. }
  192. ])
  193. // 选中的支付方式
  194. const selectedPay = ref(null);
  195. //退改规则
  196. const guizea1 = ref(0)
  197. const guizea2 = ref(0)
  198. const guizea3 = ref(0)
  199. const guizea4 = ref(0)
  200. const guizea5 = ref(0)
  201. const guizea6 = ref(0)
  202. // 存储支付参数
  203. const payParams = ref({
  204. timeStamp: '',
  205. nonceStr: '',
  206. signType: '',
  207. paySign: '',
  208. appId:'',
  209. // prepay_id:'',
  210. package:'',
  211. });
  212. // 截取箭头前后的文字
  213. const getRouteParts = (str) => {
  214. if (str && typeof str === 'string') {
  215. const parts = str.split('→');
  216. return {
  217. prefix: parts[0] || '', // 箭头前的文字
  218. suffix: parts[1] || '' // 箭头后的文字
  219. };
  220. }
  221. return { prefix: '', suffix: '' };
  222. };
  223. onLoad((options) => {
  224. if (options.info) {
  225. info.value = JSON.parse(decodeURIComponent(options.info))
  226. console.log(info.value)
  227. }
  228. })
  229. function handleRule() {
  230. popShow_rule.value = true
  231. getTuigai()
  232. }
  233. function handleCloseRule() {
  234. popShow_rule.value = false
  235. }
  236. //退改规则
  237. async function getTuigai() {
  238. const res = await myRequest({
  239. url: '/carBook/cnqueryHb.action',
  240. data: {
  241. }
  242. })
  243. if(res.code==200){
  244. guizea1.value=res.data.refundRule.a1.start
  245. guizea2.value=res.data.refundRule.a2.start
  246. guizea3.value=res.data.refundRule.a2.end
  247. guizea4.value=(res.data.refundRule.a2.fee)*100
  248. guizea5.value=res.data.refundRule.a3.end
  249. guizea6.value=(res.data.refundRule.a3.fee)*100
  250. }else{
  251. uni.showToast({
  252. title: res.message,
  253. icon: 'none'
  254. });
  255. }
  256. }
  257. function handleMore() {
  258. popShow_common.value = true
  259. getCommonData()
  260. }
  261. // 获取常用旅客列表数据
  262. const getCommonData = async () => {
  263. if (isLoading.value || !hasMore.value) return;
  264. isLoading.value = true;
  265. let data = {
  266. page: currentPage.value,
  267. rows: pageSize.value,
  268. mobile: userInfo.mobile
  269. }
  270. try {
  271. const res = await myRequest({
  272. url: '/ctUserlist.action',
  273. data
  274. });
  275. if (res.code === 200) {
  276. // 对返回的每一条数据添加 isCheck: false
  277. const formattedRows = res.rows.map(item => ({
  278. ...item, // 保留原有数据
  279. isCheck: false // 新增 isCheck 参数,默认 false
  280. }));
  281. // 🔴 同步已勾选状态:对比 selectedPassengers,标记匹配项的 isCheck 为 true
  282. formattedRows.forEach(row => {
  283. const isSelected = selectedPassengers.value.some(p => p.id === row.id);
  284. if (isSelected) {
  285. row.isCheck = true;
  286. }
  287. });
  288. if (currentPage.value === 1) {
  289. dataList.value = formattedRows;
  290. } else {
  291. dataList.value.push(...formattedRows);
  292. }
  293. total.value = res.total
  294. } else {
  295. // 接口返回非200状态时的提示(可选)
  296. uni.showToast({ title: '数据获取失败', icon: 'none' });
  297. }
  298. } catch (err) {
  299. console.error('请求异常', err);
  300. uni.showToast({ title: '网络异常', icon: 'none' });
  301. } finally {
  302. isLoading.value = false; // 无论成功失败,都关闭加载状态
  303. }
  304. }
  305. // 乘客触底触发加载下一页
  306. function loadNextPage() {
  307. if (dataList.value.length < total.value) {
  308. currentPage.value++
  309. getCommonData()
  310. } else {
  311. uni.showToast({
  312. title: '没有更多数据了',
  313. icon: 'none'
  314. })
  315. }
  316. }
  317. // 勾选/取消勾选逻辑
  318. const toggleCheck = (item) => {
  319. item.isCheck = !item.isCheck;
  320. if (item.isCheck) {
  321. selectedPassengers.value.push(item);
  322. } else {
  323. selectedPassengers.value = selectedPassengers.value.filter(p => p.id !== item.id);
  324. }
  325. };
  326. function handleCloseCommon() {
  327. popShow_common.value = false
  328. }
  329. function handleConfirm() {
  330. popShow_common.value = false
  331. }
  332. function handleAdd() {
  333. uni.navigateTo({
  334. url: '/pages/handlePeople/handlePeople'
  335. })
  336. }
  337. function handleUp(item){
  338. let info = encodeURIComponent(JSON.stringify(item))
  339. uni.navigateTo({
  340. url: `/pages/handlePeople/handlePeople?info=${info}`
  341. })
  342. }
  343. // 点击支付按钮回调
  344. const handlePay = () => {
  345. popShow_pay.value = true
  346. }
  347. // 点击弹窗关闭按钮回调
  348. const handleClose = () => {
  349. popShow_pay.value = false
  350. }
  351. // 切换支付方式(单选逻辑)
  352. const togglePay = (item) => {
  353. // 先重置所有支付方式为未选中
  354. payList.value.forEach(pay => {
  355. pay.isCheck = false;
  356. });
  357. // 标记当前点击的支付方式为选中
  358. item.isCheck = true;
  359. selectedPay.value = item; // 同步选中的支付方式
  360. };
  361. //立即支付
  362. const payTime = () => {
  363. if (!selectedPay.value) {
  364. uni.showModal({
  365. content:'请选择支付方式'
  366. })
  367. return;
  368. }
  369. if(selectedPay.value.text=='微信支付'){
  370. payWei()
  371. }else if(selectedPay.value.text=='电子交通卡支付'){
  372. jiaotongka()
  373. }
  374. }
  375. //交通卡支付
  376. const jiaotongka = async () => {
  377. // 计算属性:判断是否为空
  378. const isPassengerEmpty = computed(() => selectedPassengers.value.length === 0);
  379. if (isPassengerEmpty.value) {
  380. uni.showToast({
  381. title: '请选择乘车人',
  382. icon: 'none'
  383. });
  384. return;
  385. }
  386. // 计算属性:将id拼接为逗号分隔的字符串
  387. const userListStr = computed(() => {
  388. return selectedPassengers.value.map(item => item.id).join(',');
  389. });
  390. const res = await myRequest({
  391. url: '/cardorder.action',
  392. method: 'POST', // 明确指定请求方法为POST
  393. data: {
  394. userId: userInfo.id,
  395. schedueId: info.value.id,
  396. userList: userListStr.value,
  397. payAmount: info.value.price,
  398. carNumber: info.value.car_number,
  399. contain: info.value.contain,
  400. ciDate: info.value.s_date,
  401. ciTime: info.value.ci_time,
  402. route: info.value.route,
  403. routeEnd: info.value.route_end,
  404. }
  405. })
  406. if(res.code==200){
  407. uni.showToast({
  408. title: res.message,
  409. icon: 'none'
  410. });
  411. }else{
  412. uni.showToast({
  413. title: res.message,
  414. icon: 'none'
  415. });
  416. }
  417. }
  418. //微信支付
  419. const payWei = async () => {
  420. // 计算属性:判断是否为空
  421. const isPassengerEmpty = computed(() => selectedPassengers.value.length === 0);
  422. if (isPassengerEmpty.value) {
  423. uni.showToast({
  424. title: '请选择乘车人',
  425. icon: 'none'
  426. });
  427. return;
  428. }
  429. // 计算属性:将id拼接为逗号分隔的字符串
  430. const userListStr = computed(() => {
  431. return selectedPassengers.value.map(item => item.id).join(',');
  432. });
  433. const res = await myRequest({
  434. url: '/tApporder_pay.action',
  435. method: 'POST', // 明确指定请求方法为POST
  436. data: {
  437. userId: userInfo.id,
  438. schedueId: info.value.id,
  439. userList: userListStr.value,
  440. payAmount: info.value.price,
  441. carNumber: info.value.car_number,
  442. contain: info.value.contain,
  443. ciDate: info.value.s_date,
  444. ciTime: info.value.ci_time,
  445. route: info.value.route,
  446. routeEnd: info.value.route_end,
  447. }
  448. })
  449. if(res.code==200){
  450. // payParams.value = res.data; // 存储微信支付所需参数
  451. payParams.value = {
  452. timeStamp: res.data.timeStamp,
  453. nonceStr: res.data.nonceStr,
  454. package: 'prepay_id=' + res.data.prepay_id,
  455. signType: res.data.signType,
  456. paySign: res.data.paySign,
  457. // prepay_id:res.data.prepay_id
  458. };
  459. invokeWechatPay(); // 调起支付
  460. }
  461. }
  462. // 调起微信支付
  463. const invokeWechatPay = () => {
  464. console.log(payParams.value,'支付')
  465. uni.requestPayment({
  466. ...payParams.value,
  467. success: (res) => {
  468. uni.showToast({ title: '支付成功' });
  469. setTimeout(function() {
  470. uni.switchTab({
  471. url:'/pages/order/order'
  472. })
  473. }, 1000)
  474. // 支付成功后逻辑(如跳转到订单详情)
  475. },
  476. fail: (err) => {
  477. uni.showToast({ title: '支付失败', icon: 'none' });
  478. console.error('支付失败', err);
  479. }
  480. });
  481. };
  482. </script>
  483. <style lang="scss" scoped>
  484. .container {
  485. display: flex;
  486. height: 100vh;
  487. color: #001713;
  488. .body {
  489. width: 100%;
  490. height: calc(100vh - 244rpx);
  491. overflow-y: auto;
  492. .carMsg {
  493. position: relative;
  494. box-sizing: border-box;
  495. padding: 0 55rpx;
  496. margin: 20rpx auto 0;
  497. width: 720rpx;
  498. height: 320rpx;
  499. font-size: 32rpx;
  500. color: #001713;
  501. background: url(@/static/images/chooseCar/box.png);
  502. background-size: 100% 100%;
  503. .carMsg_time {
  504. position: absolute;
  505. top: 36rpx;
  506. font-size: 36rpx;
  507. color: #001713;
  508. }
  509. .carMsg_number {
  510. position: absolute;
  511. top: 44rpx;
  512. right: 55rpx;
  513. font-size: 24rpx;
  514. color: #f86818;
  515. }
  516. .carMsg_volume {
  517. position: absolute;
  518. top: 86rpx;
  519. right: 55rpx;
  520. font-size: 24rpx;
  521. color: #f86818;
  522. }
  523. .carMsg_line {
  524. position: absolute;
  525. top: 128rpx;
  526. left: 55rpx;
  527. width: 14rpx;
  528. height: 88rpx;
  529. }
  530. .carMsg_start {
  531. position: absolute;
  532. top: 106rpx;
  533. left: 95rpx;
  534. width: 460rpx;
  535. }
  536. .carMsg_end {
  537. position: absolute;
  538. top: 185rpx;
  539. left: 95rpx;
  540. width: 460rpx;
  541. }
  542. .carMsg_bottom {
  543. position: absolute;
  544. top: 236rpx;
  545. left: 46rpx;
  546. display: flex;
  547. align-items: center;
  548. width: 630rpx;
  549. height: 66rpx;
  550. border-top: 2rpx dotted #e6e6e6;
  551. .bottom_box {
  552. display: flex;
  553. justify-content: center;
  554. align-items: center;
  555. width: 128rpx;
  556. height: 42rpx;
  557. font-size: 24rpx;
  558. color: #ff8205;
  559. border-radius: 8rpx;
  560. background-color: #fff2e5;
  561. }
  562. }
  563. }
  564. .peopleMsg {
  565. box-sizing: border-box;
  566. padding: 30rpx 30rpx 0;
  567. margin: auto;
  568. width: 670rpx;
  569. font-size: 28rpx;
  570. box-shadow: 0px 3px 6px #ccc;
  571. background-color: #fff;
  572. .peopleMsg_title {
  573. margin-bottom: 20rpx;
  574. font-size: 36rpx;
  575. }
  576. .peopleMsg_list {
  577. display: flex;
  578. flex-wrap: wrap;
  579. align-items: center;
  580. .list_item {
  581. position: relative;
  582. display: flex;
  583. justify-content: center;
  584. align-items: center;
  585. margin-right: 30rpx;
  586. margin-bottom: 26rpx;
  587. padding: 0 24rpx;
  588. height: 68rpx;
  589. color: #aba6a6;
  590. border-radius: 8rpx;
  591. border: 2rpx solid #aba6a6;
  592. .item_active {
  593. position: absolute;
  594. bottom: -20rpx;
  595. right: -20rpx;
  596. display: flex;
  597. align-items: center;
  598. justify-content: center;
  599. width: 60rpx;
  600. height: 60rpx;
  601. background-image: url(@/static/images/chooseCar/active.png);
  602. background-size: 100% 100%;
  603. }
  604. }
  605. .active {
  606. color: #ff8205;
  607. border: 2rpx solid #ff8205;
  608. }
  609. .list_more {
  610. display: flex;
  611. justify-content: center;
  612. align-items: center;
  613. margin-bottom: 26rpx;
  614. width: 132rpx;
  615. height: 68rpx;
  616. color: #ff8205;
  617. border-radius: 8rpx;
  618. border: 2rpx solid #aba6a6;
  619. }
  620. }
  621. .peopleMsg_choose {
  622. .choose_item {
  623. display: flex;
  624. align-items: center;
  625. .item_msg {
  626. display: flex;
  627. flex-direction: column;
  628. justify-content: space-between;
  629. margin-left: 26rpx;
  630. margin-bottom: 26rpx;
  631. height: 90rpx;
  632. .msg_top {
  633. font-size: 36rpx;
  634. }
  635. .msg_bottom {
  636. font-size: 24rpx;
  637. color: #aba6a6;
  638. }
  639. }
  640. }
  641. }
  642. .peopleMsg_foot {
  643. display: flex;
  644. align-items: center;
  645. justify-content: space-between;
  646. height: 116rpx;
  647. font-size: 36rpx;
  648. border-top: 2rpx solid #ebecf1;
  649. .foot_left {
  650. display: flex;
  651. align-items: center;
  652. .left_text {
  653. margin-left: 12rpx;
  654. }
  655. }
  656. .foot_phone {
  657. text-align: end;
  658. }
  659. }
  660. }
  661. .coupon {
  662. box-sizing: border-box;
  663. padding: 0 30rpx 30rpx;
  664. margin: 20rpx auto 50rpx;
  665. width: 670rpx;
  666. color: #001713;
  667. box-shadow: 0px 3px 6px #ccc;
  668. background-color: #fff;
  669. .coupon_title {
  670. height: 96rpx;
  671. line-height: 96rpx;
  672. font-size: 36rpx;
  673. }
  674. .coupon_box {
  675. display: flex;
  676. justify-content: space-between;
  677. align-items: center;
  678. height: 70rpx;
  679. .box_left {
  680. display: flex;
  681. align-items: center;
  682. .left_img {
  683. margin-right: 14rpx;
  684. width: 46rpx;
  685. height: 46rpx;
  686. }
  687. }
  688. .box_right {
  689. display: flex;
  690. align-items: center;
  691. font-size: 24rpx;
  692. color: #aba6a6;
  693. }
  694. }
  695. }
  696. }
  697. .foot {
  698. position: absolute;
  699. bottom: 0;
  700. box-sizing: border-box;
  701. padding: 0 30rpx;
  702. width: 100%;
  703. height: 244rpx;
  704. box-shadow: 0px -3px 6px #eee;
  705. background-color: #fff;
  706. .foot_box {
  707. display: flex;
  708. align-items: center;
  709. justify-content: space-between;
  710. margin-top: 46rpx;
  711. height: 96rpx;
  712. .box_text {
  713. color: #dc2626;
  714. font-size: 36rpx;
  715. .text {
  716. font-size: 48rpx;
  717. }
  718. }
  719. .box_btn {
  720. display: flex;
  721. align-items: center;
  722. justify-content: center;
  723. width: 272rpx;
  724. height: 96rpx;
  725. font-size: 36rpx;
  726. color: #fff;
  727. border-radius: 64rpx;
  728. background-color: #ff8205;
  729. }
  730. }
  731. }
  732. }
  733. .pop_rule {
  734. height: 568rpx;
  735. color: #001713;
  736. overflow: hidden;
  737. .rule_title {
  738. display: flex;
  739. align-items: center;
  740. justify-content: center;
  741. height: 114rpx;
  742. font-size: 36rpx;
  743. background-color: #fff2e5;
  744. }
  745. .rule_body {
  746. box-sizing: border-box;
  747. padding: 0 32rpx;
  748. .body_text {
  749. box-sizing: border-box;
  750. padding: 30rpx;
  751. margin-top: 20rpx;
  752. font-size: 24rpx;
  753. border-radius: 32rpx;
  754. background-color: #fff2e5;
  755. .text {
  756. margin-bottom: 8rpx;
  757. }
  758. }
  759. .body_btn {
  760. display: flex;
  761. align-items: center;
  762. justify-content: center;
  763. margin-top: 20rpx;
  764. height: 94rpx;
  765. font-size: 36rpx;
  766. color: #fff;
  767. border-radius: 64rpx;
  768. background-color: #ff8205;
  769. }
  770. }
  771. }
  772. .pop_common {
  773. height: 70vh;
  774. font-size: 36rpx;
  775. color: #001713;
  776. overflow: hidden;
  777. .common_title {
  778. position: relative;
  779. display: flex;
  780. align-items: center;
  781. justify-content: center;
  782. height: 100rpx;
  783. border-bottom: 20rpx solid #ff8205;
  784. .title_close {
  785. position: absolute;
  786. top: 34rpx;
  787. right: 40rpx;
  788. width: 40rpx;
  789. height: 40rpx;
  790. }
  791. }
  792. .common_body {
  793. box-sizing: border-box;
  794. padding: 0 32rpx;
  795. .body_add {
  796. margin: 25rpx 0 25rpx auto;
  797. width: 170rpx;
  798. font-size: 32rpx;
  799. color: #ff8205;
  800. }
  801. .body_list {
  802. height: calc(70vh - 396rpx);
  803. overflow-y: auto;
  804. .list_item {
  805. display: flex;
  806. align-items: center;
  807. justify-content: space-between;
  808. margin-bottom: 20rpx;
  809. height: 120rpx;
  810. .item_left {
  811. display: flex;
  812. align-items: center;
  813. height: 100%;
  814. .left_msg {
  815. display: flex;
  816. flex-direction: column;
  817. justify-content: space-between;
  818. margin-left: 20rpx;
  819. height: 100%;
  820. font-size: 24rpx;
  821. color: #aba6a6;
  822. .msg_name {
  823. font-size: 36rpx;
  824. color: #001713;
  825. }
  826. }
  827. }
  828. .item_right {
  829. }
  830. }
  831. }
  832. .scroll-container {
  833. height: calc(80vh - 396rpx - 92rpx); /* 根据实际布局计算 */
  834. }
  835. .loading, .no-more {
  836. text-align: center;
  837. padding: 5rpx 0;
  838. font-size: 22rpx;
  839. color: #999;
  840. }
  841. .body_btn {
  842. display: flex;
  843. align-items: center;
  844. justify-content: center;
  845. margin: 48rpx 0;
  846. width: 100%;
  847. height: 92rpx;
  848. color: #fff;
  849. border-radius: 48rpx;
  850. background-color: #ff8205;
  851. }
  852. }
  853. }
  854. // 选择付款方式弹窗
  855. .pop_pay {
  856. height: 566rpx;
  857. color: #001713;
  858. font-size: 28rpx;
  859. .pay_title {
  860. display: flex;
  861. align-items: center;
  862. justify-content: center;
  863. height: 80rpx;
  864. font-size: 32rpx;
  865. border-bottom: 18rpx solid #ff8205;
  866. }
  867. .pay_close {
  868. position: absolute;
  869. top: 24rpx;
  870. right: 42rpx;
  871. }
  872. .pay_list {
  873. box-sizing: border-box;
  874. padding: 55rpx 0;
  875. display: flex;
  876. flex-direction: column;
  877. justify-content: space-between;
  878. height: 265rpx;
  879. .list_item {
  880. display: flex;
  881. align-items: center;
  882. justify-content: space-between;
  883. box-sizing: border-box;
  884. padding: 0 32rpx 0 46rpx;
  885. .item_left {
  886. display: flex;
  887. align-items: center;
  888. .img {
  889. margin-right: 26rpx;
  890. width: 54rpx;
  891. height: 54rpx;
  892. }
  893. }
  894. .item_right {
  895. }
  896. }
  897. }
  898. .pay_btn {
  899. display: flex;
  900. align-items: center;
  901. justify-content: center;
  902. margin: auto;
  903. width: 720rpx;
  904. height: 94rpx;
  905. font-size: 36rpx;
  906. color: #fff;
  907. border-radius: 50rpx;
  908. background-color: #ff8205;
  909. }
  910. }
  911. </style>