爱简收旧衣按件回收前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

827 lines
24 KiB

2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
2 months ago
2 months ago
2 months ago
1 month ago
2 months ago
1 month ago
2 months ago
  1. <template>
  2. <view class="pickup-container" :style="{paddingTop: navBarHeightRpx + 'rpx'}">
  3. <!-- 顶部导航栏 -->
  4. <view class="nav-bar" :style="{height: (statusBarHeight + 88) + 'rpx', paddingTop: statusBarHeight + 'px'}">
  5. <view class="back" @tap="goBack">
  6. <uni-icons type="left" size="20"></uni-icons>
  7. </view>
  8. <text class="title">免费上门取件预约</text>
  9. </view>
  10. <!-- 内容区域 -->
  11. <view class="content">
  12. <!-- 回收流程卡片 -->
  13. <view class="card process-card">
  14. <view class="card-title process-title">回收流程</view>
  15. <view class="process-steps">
  16. <view
  17. class="process-step-card"
  18. v-for="(step, i) in steps"
  19. :key="i"
  20. >
  21. <image :src="step.icon" class="step-icon" mode="aspectFit" />
  22. <view v-if="i === 0" class="step-bottom-bar">
  23. <view class="step-num-bar">
  24. <text class="text-main">{{ step.text }}</text>
  25. </view>
  26. </view>
  27. <view v-else class="step-label-gray">
  28. <text class="text-gray">{{ step.text }}</text>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="divider"></view>
  33. <!-- 取件信息 -->
  34. <view class="pickup-info">
  35. <view class="info-item" @tap="selectAddress">
  36. <text class="label">取件地址</text>
  37. <view class="value">
  38. <text class="text" :class="{placeholder: !displayAddress}">{{ displayAddress || '请选择' }}</text>
  39. <text class="arrow">></text>
  40. </view>
  41. </view>
  42. <view class="info-item" @tap="openTimePicker">
  43. <text class="label">上门时间</text>
  44. <view class="value">
  45. <text class="text" :class="{placeholder: !selectedTime}">{{ selectedTime || '请选择' }}</text>
  46. <text class="arrow">></text>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 订单详情卡片 -->
  52. <view class="card order-card">
  53. <view class="card-title process-title">订单详情</view>
  54. <view class="order-items">
  55. <view class="order-item" v-for="(item, index) in showAllItems ? selectedItems : selectedItems.slice(0, 3)" :key="index">
  56. <view class="item-left">
  57. <image :src="item.icon" mode="aspectFit"></image>
  58. <image v-if="item.brandImage" :src="item.brandImage" class="brand-logo" mode="aspectFit"></image>
  59. </view>
  60. <view class="item-info">
  61. <view class="name-brand-row">
  62. <text class="name">{{ item.name }}</text>
  63. <text v-if="item.brandName" class="brand-tag">{{ item.brandName }}</text>
  64. </view>
  65. <!-- <view class="desc">{{ item.desc }}</view> -->
  66. <view class="price-row">
  67. <text class="price">{{ item.price || item.unitPrice }}~{{ item.maxPrice || item.unitPrice }}/</text>
  68. <text class="count">x{{ item.quantity }}</text>
  69. <text class="amount">{{ ((item.price || item.unitPrice) * item.quantity).toFixed(2) }}~{{ ((item.maxPrice || item.unitPrice) * item.quantity).toFixed(2) }}</text>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <view v-if="selectedItems.length > 3" class="expand-btn" @tap="toggleExpandOrder">
  75. <text>{{ showAllItems ? '收起' : `展开(共${selectedItems.length}件)` }}</text>
  76. <text class="arrow">{{ showAllItems ? '▲' : '▼' }}</text>
  77. </view>
  78. </view>
  79. </view>
  80. <!-- 订单说明 -->
  81. <view class="order-desc">
  82. <view>1. 当前回收快递免费上门由于快递成本较高为避免不必要的成本及资源二次浪费不属于回收品类或不符合回收标准的物品请勿寄出</view>
  83. <view>2. 已通过的回收物品将正常结算不符合回收要求的物品可选择安排取回逾期未联系将默认捐赠无法再次取回</view>
  84. <view>3. 若用户寄出大量不可回收的物品平台有权限制下次回收权限或取消下次包邮服务</view>
  85. <view>4. 对于合格率高的回收订单平台将根据实际情况给予额外回收奖励</view>
  86. </view>
  87. <!-- 底部提交栏 -->
  88. <view class="agreement-bar">
  89. <view class="checkbox" :class="{active: agreed}" @tap="toggleAgreement">
  90. <text v-if="agreed"></text>
  91. </view>
  92. <text>我已阅读并同意</text>
  93. <text class="link" @tap="showServiceAgreement">回收服务协议</text>
  94. <text></text>
  95. <text class="link" @tap="showPrivacyPolicy">隐私政策</text>
  96. </view>
  97. <view class="bottom-bar">
  98. <view class="summary">
  99. <text>已选 {{ totalCount }} 预估回收可得</text>
  100. <text class="amount">{{ totalPriceRange }}</text>
  101. </view>
  102. <button class="main-btn" @tap="submitOrder">预约上门取件</button>
  103. </view>
  104. <!-- 时间选择弹窗 -->
  105. <view class="time-picker" v-if="showTimePicker">
  106. <view class="mask" @tap="closeTimePicker"></view>
  107. <view class="picker-content">
  108. <view class="picker-header">
  109. <text class="reset" @tap="resetPicker">重置</text>
  110. <text class="title">预约上门时间</text>
  111. </view>
  112. <view class="picker-section">
  113. <view class="section-title">选择日期</view>
  114. <view class="date-btns">
  115. <view
  116. v-for="(tab, index) in dateTabs"
  117. :key="index"
  118. :class="['date-btn', {active: currentDateTab === index}]"
  119. @tap="selectDateTab(index)"
  120. >
  121. {{ tab.label }}
  122. </view>
  123. </view>
  124. </view>
  125. <view class="picker-section">
  126. <view class="section-title">选择时间</view>
  127. <view class="time-btns">
  128. <view
  129. v-for="(slot, idx) in timeSlots"
  130. :key="idx"
  131. :class="['time-btn', {active: selectedTimeSlot === idx}]"
  132. @tap="selectTimeSlot(idx)"
  133. >
  134. {{ slot }}
  135. </view>
  136. </view>
  137. </view>
  138. <view class="confirm-btn" @tap="confirmTime">确认</view>
  139. </view>
  140. </view>
  141. </view>
  142. </template>
  143. <script>
  144. import pullRefreshMixin from '@/pages/mixins/pullRefreshMixin.js'
  145. export default {
  146. mixins: [pullRefreshMixin],
  147. data() {
  148. return {
  149. statusBarHeight: 0,
  150. navBarHeight: 0, // px
  151. navBarHeightRpx: 0, // rpx
  152. fromRecycle: false,
  153. address: '',
  154. selectedAddress: null,
  155. selectedTime: '',
  156. agreed: false,
  157. selectedItems: [],
  158. showTimePicker: false,
  159. currentDateTab: 0,
  160. dateTabs: [], // 动态生成
  161. timeSlots: ['11:00~13:00', '13:00~15:00', '15:00~17:00'],
  162. selectedTimeSlot: 0,
  163. steps: [], // 改为空数组,由接口获取
  164. showAllItems: false,
  165. addressId: ''
  166. }
  167. },
  168. onShow() {
  169. // 页面显示时触发,包括从地址选择页面返回时
  170. console.log('当前选中的地址:', this.selectedAddress)
  171. if (this.selectedAddress) {
  172. // 确保地址信息被正确更新
  173. this.address = this.selectedAddress.address
  174. this.addressId = this.selectedAddress.id
  175. // 强制更新视图
  176. this.$forceUpdate()
  177. }
  178. },
  179. onLoad(options) {
  180. // 判断是否从回收页面跳转而来
  181. this.fromRecycle = options.fromRecycle === 'true'
  182. // 如果是从回收页面跳转来的,解析传递的衣物信息
  183. if (this.fromRecycle && options.items) {
  184. try {
  185. this.selectedItems = JSON.parse(decodeURIComponent(options.items))
  186. } catch (e) {
  187. console.error('解析衣物信息失败:', e)
  188. }
  189. }
  190. // 监听地址选择事件
  191. uni.$on('addressSelected', (address) => {
  192. this.selectedAddress = address
  193. this.address = address.address
  194. this.addressId = address.id
  195. // 兼容 addressDetails
  196. if (address.addressDetails) this.selectedAddress.addressDetails = address.addressDetails
  197. this.$forceUpdate()
  198. })
  199. // 监听从订单详情页面返回的事件
  200. uni.$on('clearRecycleData', () => {
  201. // 清除回收页面的订单数据
  202. uni.$emit('clearRecycleOrderData')
  203. })
  204. const sysInfo = uni.getSystemInfoSync()
  205. this.statusBarHeight = sysInfo.statusBarHeight
  206. let navBarHeight = 44
  207. try {
  208. const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
  209. navBarHeight = menuButtonInfo.bottom + menuButtonInfo.top - sysInfo.statusBarHeight
  210. } catch (e) {}
  211. this.navBarHeight = navBarHeight
  212. this.navBarHeightRpx = Math.round(navBarHeight * 750 / sysInfo.windowWidth)
  213. this.getAddressList();
  214. // 动态生成时间tab
  215. this.dateTabs = this.generateDateTabs();
  216. // 获取步骤条数据
  217. this.getAreaList();
  218. },
  219. onUnload() {
  220. // 页面卸载时移除事件监听
  221. uni.$off('addressSelected')
  222. uni.$off('clearRecycleData')
  223. },
  224. computed: {
  225. totalCount() {
  226. return this.selectedItems.reduce((sum, item) => sum + item.quantity, 0)
  227. },
  228. totalPriceRange() {
  229. if (this.selectedItems.length === 0) return '0-0'
  230. let minTotal = 0
  231. let maxTotal = 0
  232. this.selectedItems.forEach(item => {
  233. const minPrice = item.price || item.unitPrice || 0
  234. const maxPrice = item.maxPrice || item.unitPrice || 0
  235. minTotal += minPrice * item.quantity
  236. maxTotal += maxPrice * item.quantity
  237. })
  238. return `${minTotal.toFixed(2)}~${maxTotal.toFixed(2)}`
  239. },
  240. canSubmit() {
  241. return this.agreed && this.selectedItems.length > 0 && this.selectedTime && this.displayAddress
  242. },
  243. displayAddress() {
  244. if (this.selectedAddress) {
  245. // 拼接 address 和 addressDetails
  246. return (this.selectedAddress.address || '') + (this.selectedAddress.addressDetails ? ' ' + this.selectedAddress.addressDetails : '')
  247. }
  248. return ''
  249. }
  250. },
  251. methods: {
  252. async onRefresh() {
  253. // 模拟刷新数据
  254. await new Promise(resolve => setTimeout(resolve, 1000))
  255. uni.stopPullRefresh()
  256. },
  257. goBack() {
  258. uni.navigateBack()
  259. },
  260. showMoreMenu() {
  261. uni.showModal({ title: '更多', content: '这里可以放更多操作' })
  262. },
  263. showScan() {
  264. uni.showModal({ title: '扫码', content: '这里可以实现扫码功能' })
  265. },
  266. selectAddress() {
  267. uni.navigateTo({ url: '/pages/subcomponent/select?mode=select' })
  268. },
  269. openTimePicker() {
  270. this.showTimePicker = true
  271. },
  272. closeTimePicker() {
  273. this.showTimePicker = false
  274. },
  275. selectDateTab(index) {
  276. this.currentDateTab = index
  277. },
  278. selectTimeSlot(index) {
  279. this.selectedTimeSlot = index
  280. },
  281. confirmTime() {
  282. const tab = this.dateTabs[this.currentDateTab]
  283. const dateObj = tab.date
  284. const timeStr = this.timeSlots[this.selectedTimeSlot] // 例如 '11:00~13:00'
  285. const startTime = timeStr.split('~')[0] // '11:00'
  286. const yyyy = dateObj.getFullYear()
  287. const mm = (dateObj.getMonth() + 1).toString().padStart(2, '0')
  288. const dd = dateObj.getDate().toString().padStart(2, '0')
  289. this.selectedTime = `${yyyy}-${mm}-${dd} ${startTime}:00`
  290. this.closeTimePicker()
  291. },
  292. resetPicker() {
  293. this.currentDateTab = 0
  294. this.selectedTimeSlot = 0
  295. },
  296. toggleAgreement() {
  297. this.agreed = !this.agreed
  298. },
  299. showServiceAgreement() {
  300. uni.showModal({ title: '回收服务协议', content: '这里展示回收服务协议内容' })
  301. },
  302. showPrivacyPolicy() {
  303. uni.showModal({ title: '隐私政策', content: '这里展示隐私政策内容' })
  304. },
  305. submitOrder() {
  306. if (!this.agreed) {
  307. uni.showToast({ title: '请先同意服务协议', icon: 'none' })
  308. return
  309. }
  310. if (!this.displayAddress || this.displayAddress === '请选择取件地址') {
  311. uni.showToast({ title: '请选择取件地址', icon: 'none' })
  312. return
  313. }
  314. if (!this.selectedTime) {
  315. uni.showToast({ title: '请选择上门时间', icon: 'none' })
  316. return
  317. }
  318. if (this.selectedItems.length === 0) {
  319. uni.showToast({ title: '请选择回收物品', icon: 'none' })
  320. return
  321. }
  322. const list = this.selectedItems.map(item => {
  323. const orderItem = {
  324. shopId: item.id,
  325. num: item.quantity
  326. };
  327. // 如果有品牌ID,添加到订单项中
  328. if (item.brandId) {
  329. orderItem.pinId = item.brandId;
  330. } else if (item.pinId) {
  331. orderItem.pinId = item.pinId;
  332. }
  333. return orderItem;
  334. });
  335. console.log({
  336. addressId: this.addressId,
  337. strTime: this.selectedTime,
  338. list: list
  339. },'createOrder');
  340. // 校验通过,提交
  341. uni.showLoading({ title: '提交中...' })
  342. this.$api('createOrder', {
  343. addressId: this.addressId,
  344. strTime: this.selectedTime,
  345. list: JSON.stringify(list)
  346. }, (res) => {
  347. if (res && res.success) {
  348. console.log(res,'createOrder-res');
  349. uni.showToast({ title: '预约成功', icon: 'success' })
  350. uni.redirectTo({
  351. url: `/pages/subcomponent/detail?id=${res.result.id}`
  352. })
  353. }
  354. })
  355. // setTimeout(() => {
  356. // uni.hideLoading()
  357. // uni.showToast({ title: '预约成功', icon: 'success' })
  358. // setTimeout(() => {
  359. // uni.navigateBack()
  360. // }, 1500)
  361. // }, 1000)
  362. },
  363. toggleExpandOrder() {
  364. this.showAllItems = !this.showAllItems
  365. },
  366. async getAddressList() {
  367. const res = await this.$api('getAddressList', {});
  368. if (res && res.code === 200 && res.result && res.result.records) {
  369. const defaultAddr = res.result.records.find(item => item.defaultFlag === 'Y');
  370. if (defaultAddr) {
  371. this.selectedAddress = defaultAddr;
  372. this.address = defaultAddr.address;
  373. this.addressId = defaultAddr.id;
  374. // 兼容 addressDetails
  375. if (defaultAddr.addressDetails) this.selectedAddress.addressDetails = defaultAddr.addressDetails
  376. } else {
  377. this.selectedAddress = null;
  378. this.address = '';
  379. }
  380. }
  381. },
  382. generateDateTabs() {
  383. const weekMap = ['日', '一', '二', '三', '四', '五', '六']
  384. const result = []
  385. const today = new Date()
  386. for (let i = 0; i < 6; i++) {
  387. const d = new Date(today)
  388. d.setDate(today.getDate() + i)
  389. const mm = (d.getMonth() + 1).toString().padStart(2, '0')
  390. const dd = d.getDate().toString().padStart(2, '0')
  391. let label = ''
  392. if (i === 0) label = `今天 ${mm}-${dd}`
  393. else if (i === 1) label = `明天 ${mm}-${dd}`
  394. else if (i === 2) label = `后天 ${mm}-${dd}`
  395. else label = `${weekMap[d.getDay()]} ${mm}-${dd}`
  396. result.push({ label, date: new Date(d) })
  397. }
  398. return result
  399. },
  400. getAreaList() {
  401. this.$api('getAreaList', {}, (res) => {
  402. if (res.code == 200 && Array.isArray(res.result)) {
  403. // 按sort升序排序
  404. const sorted = res.result.slice().sort((a, b) => a.sort - b.sort)
  405. this.steps = sorted.map(item => ({
  406. icon: item.image,
  407. text: item.title
  408. }))
  409. }
  410. })
  411. }
  412. }
  413. }
  414. </script>
  415. <style lang="scss" scoped>
  416. .pickup-container {
  417. min-height: 100vh;
  418. background: #f8f8f8;
  419. }
  420. .nav-bar {
  421. position: fixed;
  422. top: 0;
  423. left: 0;
  424. right: 0;
  425. z-index: 999;
  426. display: flex;
  427. align-items: center;
  428. background: #fff;
  429. padding: 0 30rpx;
  430. .back {
  431. padding: 20rpx;
  432. margin-left: -20rpx;
  433. }
  434. .title {
  435. flex: 1;
  436. text-align: center;
  437. font-size: 34rpx;
  438. font-weight: 500;
  439. color: #222;
  440. }
  441. .right-btns {
  442. display: flex;
  443. gap: 30rpx;
  444. .more, .scan {
  445. font-size: 40rpx;
  446. color: #333;
  447. }
  448. }
  449. }
  450. .content {
  451. padding: 20rpx;
  452. }
  453. .card {
  454. background: linear-gradient(to bottom,#fff3db 0%,#fffefb 40%);
  455. border-radius: 20rpx;
  456. margin-bottom: 20rpx;
  457. overflow: hidden;
  458. box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.03);
  459. }
  460. .process-card {
  461. background: #fff;
  462. border-radius: 24rpx;
  463. box-shadow: 0 8rpx 32rpx rgba(255, 149, 0, 0.08);
  464. padding: 0 0 20rpx 0;
  465. }
  466. .process-steps {
  467. display: flex;
  468. justify-content: space-between;
  469. align-items: flex-start;
  470. padding: 0 30rpx 30rpx;
  471. .process-step-card {
  472. background: #FFF8ED;
  473. border-radius: 24rpx;
  474. min-width: 140rpx;
  475. min-height: 180rpx;
  476. display: flex;
  477. flex-direction: column;
  478. align-items: center;
  479. margin-right: 24rpx;
  480. position: relative;
  481. .step-icon {
  482. width: 64rpx;
  483. height: 64rpx;
  484. margin: 24rpx 0 18rpx 0;
  485. }
  486. .step-bottom-bar {
  487. position: absolute;
  488. left: 0;
  489. right: 0;
  490. bottom: 0;
  491. height: 56rpx;
  492. background: #FFB74D;
  493. border-radius: 0 0 24rpx 24rpx;
  494. display: flex;
  495. align-items: center;
  496. justify-content: center;
  497. .step-num-bar {
  498. display: flex;
  499. flex-direction: row;
  500. align-items: center;
  501. margin-top: 8rpx;
  502. .num-main {
  503. width: 32rpx;
  504. height: 32rpx;
  505. border-radius: 50%;
  506. background: #fff;
  507. color: #FFB74D;
  508. font-size: 22rpx;
  509. display: flex;
  510. align-items: center;
  511. justify-content: center;
  512. font-weight: 600;
  513. margin-right: 10rpx;
  514. }
  515. .text-main {
  516. color: #fff;
  517. font-size: 26rpx;
  518. font-weight: 500;
  519. }
  520. }
  521. }
  522. .step-label-gray {
  523. position: absolute;
  524. left: 0;
  525. right: 0;
  526. bottom: 0;
  527. height: 56rpx;
  528. background: #FFF8ED;
  529. border-radius: 0 0 24rpx 24rpx;
  530. display: flex;
  531. align-items: center;
  532. justify-content: center;
  533. .num-gray {
  534. width: 32rpx;
  535. height: 32rpx;
  536. border-radius: 50%;
  537. background: #eee;
  538. color: #bbb;
  539. font-size: 22rpx;
  540. display: flex;
  541. align-items: center;
  542. justify-content: center;
  543. font-weight: 600;
  544. margin-right: 10rpx;
  545. }
  546. .text-gray {
  547. color: #bbb;
  548. font-size: 26rpx;
  549. font-weight: 500;
  550. }
  551. }
  552. }
  553. .process-step-card:last-child {
  554. margin-right: 0;
  555. }
  556. }
  557. .divider {
  558. height: 1rpx;
  559. background: rgba(0, 0, 0, 0.05);
  560. margin: 0 30rpx;
  561. }
  562. .pickup-info {
  563. padding: 0 30rpx;
  564. .info-item {
  565. padding: 30rpx 0;
  566. border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
  567. &:last-child { border-bottom: none; }
  568. .label {
  569. font-size: 28rpx;
  570. color: #333;
  571. margin-bottom: 16rpx;
  572. display: block;
  573. }
  574. .value {
  575. display: flex;
  576. justify-content: space-between;
  577. align-items: center;
  578. .text {
  579. flex: 1;
  580. font-size: 28rpx;
  581. color: #333;
  582. overflow: hidden;
  583. text-overflow: ellipsis;
  584. white-space: nowrap;
  585. }
  586. .text.placeholder { color: #ccc; }
  587. .arrow {
  588. color: #999;
  589. font-size: 28rpx;
  590. margin-left: 10rpx;
  591. }
  592. }
  593. }
  594. }
  595. .order-card {
  596. background: #fff;
  597. border-radius: 24rpx;
  598. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.04);
  599. margin-bottom: 20rpx;
  600. .order-items {
  601. padding: 0 30rpx;
  602. .order-item {
  603. display: flex;
  604. align-items: flex-start;
  605. padding: 30rpx 0;
  606. border-bottom: 1rpx solid #f5f5f5;
  607. &:last-child { border-bottom: none; }
  608. .item-left {
  609. position: relative;
  610. margin-right: 20rpx;
  611. image {
  612. width: 80rpx;
  613. height: 80rpx;
  614. border-radius: 8rpx;
  615. }
  616. .brand-logo {
  617. position: absolute;
  618. bottom: -8rpx;
  619. right: -8rpx;
  620. width: 32rpx;
  621. height: 32rpx;
  622. border-radius: 50%;
  623. border: 2rpx solid #fff;
  624. background: #fff;
  625. }
  626. }
  627. .item-info {
  628. flex: 1;
  629. .name-brand-row {
  630. display: flex;
  631. align-items: center;
  632. flex-wrap: wrap;
  633. margin-bottom: 4rpx;
  634. .name {
  635. font-size: 30rpx;
  636. color: #333;
  637. font-weight: 500;
  638. margin-right: 12rpx;
  639. }
  640. .brand-tag {
  641. background: #FFE8CC;
  642. color: #FF9500;
  643. font-size: 20rpx;
  644. padding: 4rpx 8rpx;
  645. border-radius: 8rpx;
  646. border: 1rpx solid #FFD4A0;
  647. }
  648. }
  649. .desc { font-size: 24rpx; color: #999; margin: 4rpx 0 8rpx 0; }
  650. .price-row {
  651. display: flex;
  652. align-items: center;
  653. .price { color: #FF9500; font-size: 26rpx; margin-right: 10rpx; }
  654. .count { color: #999; font-size: 24rpx; margin-right: 10rpx; }
  655. .amount { color: #333; font-size: 28rpx; margin-left: auto; }
  656. }
  657. }
  658. }
  659. }
  660. .expand-btn {
  661. text-align: center;
  662. color: #999;
  663. font-size: 24rpx;
  664. padding: 10rpx 0;
  665. .arrow { font-size: 20rpx; }
  666. }
  667. }
  668. .agreement-bar {
  669. display: flex;
  670. align-items: center;
  671. background: #fffbe6;
  672. padding: 20rpx 30rpx;
  673. font-size: 24rpx;
  674. .checkbox {
  675. width: 32rpx; height: 32rpx; border-radius: 50%; border: 2rpx solid #FFB74D;
  676. margin-right: 10rpx; display: flex; align-items: center; justify-content: center;
  677. background: #fff;
  678. &.active { background: #FFB74D; color: #fff; }
  679. }
  680. .link { color: #FFB74D; }
  681. }
  682. .bottom-bar {
  683. display: flex;
  684. align-items: center;
  685. justify-content: space-between;
  686. background: #fff;
  687. padding: 20rpx 30rpx calc(40rpx + env(safe-area-inset-bottom));
  688. .summary { color: #666; font-size: 26rpx; }
  689. .amount { color: #FF9500; font-size: 32rpx; font-weight: bold; margin-left: 10rpx; }
  690. .main-btn {
  691. background: #FFB74D;
  692. color: #fff;
  693. font-size: 28rpx;
  694. border-radius: 40rpx;
  695. padding: 0 40rpx;
  696. width: 60%;
  697. height: 80rpx;
  698. display: flex;
  699. justify-content: center;
  700. &[disabled] { opacity: 0.5; }
  701. }
  702. }
  703. .order-desc {
  704. color: #999;
  705. font-size: 22rpx;
  706. padding: 0 30rpx 20rpx 30rpx;
  707. line-height: 1.7;
  708. }
  709. .time-picker {
  710. position: fixed;
  711. left: 0;
  712. right: 0;
  713. top: 0;
  714. bottom: 0;
  715. z-index: 1000;
  716. .mask {
  717. position: absolute;
  718. left: 0;
  719. right: 0;
  720. top: 0;
  721. bottom: 0;
  722. background: rgba(0, 0, 0, 0.5);
  723. }
  724. .picker-content {
  725. position: absolute;
  726. left: 0;
  727. right: 0;
  728. bottom: 0;
  729. background: #fff;
  730. border-radius: 20rpx 20rpx 0 0;
  731. padding-bottom: env(safe-area-inset-bottom);
  732. .picker-header {
  733. padding: 30rpx 0 0 0;
  734. display: flex;
  735. align-items: center;
  736. border-bottom: 1rpx solid #eee;
  737. .reset {
  738. color: #bbb;
  739. font-size: 28rpx;
  740. margin-left: 30rpx;
  741. }
  742. .title {
  743. flex: 1;
  744. text-align: center;
  745. font-size: 32rpx;
  746. font-weight: 500;
  747. color: #222;
  748. margin-right: 60rpx;
  749. }
  750. }
  751. .picker-section {
  752. padding: 30rpx 30rpx 0 30rpx;
  753. .section-title {
  754. font-size: 28rpx;
  755. color: #222;
  756. margin-bottom: 20rpx;
  757. }
  758. .date-btns, .time-btns {
  759. display: flex;
  760. flex-wrap: wrap;
  761. gap: 20rpx 20rpx;
  762. }
  763. .date-btn, .time-btn {
  764. width: 200rpx;
  765. height: 70rpx;
  766. background: #f5f5f5;
  767. color: #999;
  768. border-radius: 18rpx;
  769. display: flex;
  770. align-items: center;
  771. justify-content: center;
  772. font-size: 28rpx;
  773. border: 2rpx solid transparent;
  774. margin-bottom: 10rpx;
  775. }
  776. .date-btn.active, .time-btn.active {
  777. background: #fff;
  778. color: #FFB74D;
  779. border: 2rpx solid #FFB74D;
  780. font-weight: 500;
  781. }
  782. }
  783. .confirm-btn {
  784. margin: 40rpx 30rpx 30rpx 30rpx;
  785. height: 90rpx;
  786. background: linear-gradient(90deg, #FFB74D 0%, #FF9500 100%);
  787. color: #fff;
  788. font-size: 32rpx;
  789. border-radius: 45rpx;
  790. display: flex;
  791. align-items: center;
  792. justify-content: center;
  793. box-shadow: 0 4rpx 16rpx rgba(255, 149, 0, 0.08);
  794. }
  795. }
  796. }
  797. .process-title {
  798. font-size: 32rpx;
  799. font-weight: bold;
  800. background: linear-gradient(to bottom,#fff3db 0%,#fffefb 40%);
  801. color: #222;
  802. text-align: left;
  803. padding: 36rpx 0 24rpx 30rpx;
  804. letter-spacing: 1rpx;
  805. }
  806. </style>