爱简收旧衣按件回收前端代码仓库
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.

817 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
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.unitPrice }}/</text>
  68. <text class="count">x{{ item.quantity }}</text>
  69. <text class="amount">{{ item.unitPrice * item.quantity }}</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. const total = this.selectedItems.reduce((sum, item) => sum + (item.unitPrice * item.quantity), 0)
  231. return `${(total * 0.92).toFixed(2)}~${(total * 1.1).toFixed(2)}`
  232. },
  233. canSubmit() {
  234. return this.agreed && this.selectedItems.length > 0 && this.selectedTime && this.displayAddress
  235. },
  236. displayAddress() {
  237. if (this.selectedAddress) {
  238. // 拼接 address 和 addressDetails
  239. return (this.selectedAddress.address || '') + (this.selectedAddress.addressDetails ? ' ' + this.selectedAddress.addressDetails : '')
  240. }
  241. return ''
  242. }
  243. },
  244. methods: {
  245. async onRefresh() {
  246. // 模拟刷新数据
  247. await new Promise(resolve => setTimeout(resolve, 1000))
  248. uni.stopPullRefresh()
  249. },
  250. goBack() {
  251. uni.navigateBack()
  252. },
  253. showMoreMenu() {
  254. uni.showModal({ title: '更多', content: '这里可以放更多操作' })
  255. },
  256. showScan() {
  257. uni.showModal({ title: '扫码', content: '这里可以实现扫码功能' })
  258. },
  259. selectAddress() {
  260. uni.navigateTo({ url: '/pages/subcomponent/select?mode=select' })
  261. },
  262. openTimePicker() {
  263. this.showTimePicker = true
  264. },
  265. closeTimePicker() {
  266. this.showTimePicker = false
  267. },
  268. selectDateTab(index) {
  269. this.currentDateTab = index
  270. },
  271. selectTimeSlot(index) {
  272. this.selectedTimeSlot = index
  273. },
  274. confirmTime() {
  275. const tab = this.dateTabs[this.currentDateTab]
  276. const dateObj = tab.date
  277. const timeStr = this.timeSlots[this.selectedTimeSlot] // 例如 '11:00~13:00'
  278. const startTime = timeStr.split('~')[0] // '11:00'
  279. const yyyy = dateObj.getFullYear()
  280. const mm = (dateObj.getMonth() + 1).toString().padStart(2, '0')
  281. const dd = dateObj.getDate().toString().padStart(2, '0')
  282. this.selectedTime = `${yyyy}-${mm}-${dd} ${startTime}:00`
  283. this.closeTimePicker()
  284. },
  285. resetPicker() {
  286. this.currentDateTab = 0
  287. this.selectedTimeSlot = 0
  288. },
  289. toggleAgreement() {
  290. this.agreed = !this.agreed
  291. },
  292. showServiceAgreement() {
  293. uni.showModal({ title: '回收服务协议', content: '这里展示回收服务协议内容' })
  294. },
  295. showPrivacyPolicy() {
  296. uni.showModal({ title: '隐私政策', content: '这里展示隐私政策内容' })
  297. },
  298. submitOrder() {
  299. if (!this.agreed) {
  300. uni.showToast({ title: '请先同意服务协议', icon: 'none' })
  301. return
  302. }
  303. if (!this.displayAddress || this.displayAddress === '请选择取件地址') {
  304. uni.showToast({ title: '请选择取件地址', icon: 'none' })
  305. return
  306. }
  307. if (!this.selectedTime) {
  308. uni.showToast({ title: '请选择上门时间', icon: 'none' })
  309. return
  310. }
  311. if (this.selectedItems.length === 0) {
  312. uni.showToast({ title: '请选择回收物品', icon: 'none' })
  313. return
  314. }
  315. const list = this.selectedItems.map(item => {
  316. const orderItem = {
  317. shopId: item.id,
  318. num: item.quantity
  319. };
  320. // 如果有品牌ID,添加到订单项中
  321. if (item.brandId) {
  322. orderItem.pinId = item.brandId;
  323. } else if (item.pinId) {
  324. orderItem.pinId = item.pinId;
  325. }
  326. return orderItem;
  327. });
  328. console.log({
  329. addressId: this.addressId,
  330. strTime: this.selectedTime,
  331. list: list
  332. },'createOrder');
  333. // 校验通过,提交
  334. uni.showLoading({ title: '提交中...' })
  335. this.$api('createOrder', {
  336. addressId: this.addressId,
  337. strTime: this.selectedTime,
  338. list: JSON.stringify(list)
  339. }, (res) => {
  340. if (res && res.success) {
  341. console.log(res,'createOrder-res');
  342. uni.showToast({ title: '预约成功', icon: 'success' })
  343. uni.redirectTo({
  344. url: `/pages/subcomponent/detail?id=${res.result.id}`
  345. })
  346. }
  347. })
  348. // setTimeout(() => {
  349. // uni.hideLoading()
  350. // uni.showToast({ title: '预约成功', icon: 'success' })
  351. // setTimeout(() => {
  352. // uni.navigateBack()
  353. // }, 1500)
  354. // }, 1000)
  355. },
  356. toggleExpandOrder() {
  357. this.showAllItems = !this.showAllItems
  358. },
  359. async getAddressList() {
  360. const res = await this.$api('getAddressList', {});
  361. if (res && res.code === 200 && res.result && res.result.records) {
  362. const defaultAddr = res.result.records.find(item => item.defaultFlag === 'Y');
  363. if (defaultAddr) {
  364. this.selectedAddress = defaultAddr;
  365. this.address = defaultAddr.address;
  366. this.addressId = defaultAddr.id;
  367. // 兼容 addressDetails
  368. if (defaultAddr.addressDetails) this.selectedAddress.addressDetails = defaultAddr.addressDetails
  369. } else {
  370. this.selectedAddress = null;
  371. this.address = '';
  372. }
  373. }
  374. },
  375. generateDateTabs() {
  376. const weekMap = ['日', '一', '二', '三', '四', '五', '六']
  377. const result = []
  378. const today = new Date()
  379. for (let i = 0; i < 6; i++) {
  380. const d = new Date(today)
  381. d.setDate(today.getDate() + i)
  382. const mm = (d.getMonth() + 1).toString().padStart(2, '0')
  383. const dd = d.getDate().toString().padStart(2, '0')
  384. let label = ''
  385. if (i === 0) label = `今天 ${mm}-${dd}`
  386. else if (i === 1) label = `明天 ${mm}-${dd}`
  387. else if (i === 2) label = `后天 ${mm}-${dd}`
  388. else label = `${weekMap[d.getDay()]} ${mm}-${dd}`
  389. result.push({ label, date: new Date(d) })
  390. }
  391. return result
  392. },
  393. getAreaList() {
  394. this.$api('getAreaList', {}, (res) => {
  395. if (res.code == 200 && Array.isArray(res.result)) {
  396. // 按sort升序排序
  397. const sorted = res.result.slice().sort((a, b) => a.sort - b.sort)
  398. this.steps = sorted.map(item => ({
  399. icon: item.image,
  400. text: item.title
  401. }))
  402. }
  403. })
  404. }
  405. }
  406. }
  407. </script>
  408. <style lang="scss" scoped>
  409. .pickup-container {
  410. min-height: 100vh;
  411. background: #f8f8f8;
  412. }
  413. .nav-bar {
  414. position: fixed;
  415. top: 0;
  416. left: 0;
  417. right: 0;
  418. z-index: 999;
  419. display: flex;
  420. align-items: center;
  421. background: #fff;
  422. padding: 0 30rpx;
  423. .back {
  424. padding: 20rpx;
  425. margin-left: -20rpx;
  426. }
  427. .title {
  428. flex: 1;
  429. text-align: center;
  430. font-size: 34rpx;
  431. font-weight: 500;
  432. color: #222;
  433. }
  434. .right-btns {
  435. display: flex;
  436. gap: 30rpx;
  437. .more, .scan {
  438. font-size: 40rpx;
  439. color: #333;
  440. }
  441. }
  442. }
  443. .content {
  444. padding: 20rpx;
  445. }
  446. .card {
  447. background: linear-gradient(to bottom,#fff3db 0%,#fffefb 40%);
  448. border-radius: 20rpx;
  449. margin-bottom: 20rpx;
  450. overflow: hidden;
  451. box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.03);
  452. }
  453. .process-card {
  454. background: #fff;
  455. border-radius: 24rpx;
  456. box-shadow: 0 8rpx 32rpx rgba(255, 149, 0, 0.08);
  457. padding: 0 0 20rpx 0;
  458. }
  459. .process-steps {
  460. display: flex;
  461. justify-content: space-between;
  462. align-items: flex-start;
  463. padding: 0 30rpx 30rpx;
  464. .process-step-card {
  465. background: #FFF8ED;
  466. border-radius: 24rpx;
  467. min-width: 140rpx;
  468. min-height: 180rpx;
  469. display: flex;
  470. flex-direction: column;
  471. align-items: center;
  472. margin-right: 24rpx;
  473. position: relative;
  474. .step-icon {
  475. width: 64rpx;
  476. height: 64rpx;
  477. margin: 24rpx 0 18rpx 0;
  478. }
  479. .step-bottom-bar {
  480. position: absolute;
  481. left: 0;
  482. right: 0;
  483. bottom: 0;
  484. height: 56rpx;
  485. background: #FFB74D;
  486. border-radius: 0 0 24rpx 24rpx;
  487. display: flex;
  488. align-items: center;
  489. justify-content: center;
  490. .step-num-bar {
  491. display: flex;
  492. flex-direction: row;
  493. align-items: center;
  494. margin-top: 8rpx;
  495. .num-main {
  496. width: 32rpx;
  497. height: 32rpx;
  498. border-radius: 50%;
  499. background: #fff;
  500. color: #FFB74D;
  501. font-size: 22rpx;
  502. display: flex;
  503. align-items: center;
  504. justify-content: center;
  505. font-weight: 600;
  506. margin-right: 10rpx;
  507. }
  508. .text-main {
  509. color: #fff;
  510. font-size: 26rpx;
  511. font-weight: 500;
  512. }
  513. }
  514. }
  515. .step-label-gray {
  516. position: absolute;
  517. left: 0;
  518. right: 0;
  519. bottom: 0;
  520. height: 56rpx;
  521. background: #FFF8ED;
  522. border-radius: 0 0 24rpx 24rpx;
  523. display: flex;
  524. align-items: center;
  525. justify-content: center;
  526. .num-gray {
  527. width: 32rpx;
  528. height: 32rpx;
  529. border-radius: 50%;
  530. background: #eee;
  531. color: #bbb;
  532. font-size: 22rpx;
  533. display: flex;
  534. align-items: center;
  535. justify-content: center;
  536. font-weight: 600;
  537. margin-right: 10rpx;
  538. }
  539. .text-gray {
  540. color: #bbb;
  541. font-size: 26rpx;
  542. font-weight: 500;
  543. }
  544. }
  545. }
  546. .process-step-card:last-child {
  547. margin-right: 0;
  548. }
  549. }
  550. .divider {
  551. height: 1rpx;
  552. background: rgba(0, 0, 0, 0.05);
  553. margin: 0 30rpx;
  554. }
  555. .pickup-info {
  556. padding: 0 30rpx;
  557. .info-item {
  558. padding: 30rpx 0;
  559. border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
  560. &:last-child { border-bottom: none; }
  561. .label {
  562. font-size: 28rpx;
  563. color: #333;
  564. margin-bottom: 16rpx;
  565. display: block;
  566. }
  567. .value {
  568. display: flex;
  569. justify-content: space-between;
  570. align-items: center;
  571. .text {
  572. flex: 1;
  573. font-size: 28rpx;
  574. color: #333;
  575. overflow: hidden;
  576. text-overflow: ellipsis;
  577. white-space: nowrap;
  578. }
  579. .text.placeholder { color: #ccc; }
  580. .arrow {
  581. color: #999;
  582. font-size: 28rpx;
  583. margin-left: 10rpx;
  584. }
  585. }
  586. }
  587. }
  588. .order-card {
  589. background: #fff;
  590. border-radius: 24rpx;
  591. box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.04);
  592. margin-bottom: 20rpx;
  593. .order-items {
  594. padding: 0 30rpx;
  595. .order-item {
  596. display: flex;
  597. align-items: flex-start;
  598. padding: 30rpx 0;
  599. border-bottom: 1rpx solid #f5f5f5;
  600. &:last-child { border-bottom: none; }
  601. .item-left {
  602. position: relative;
  603. margin-right: 20rpx;
  604. image {
  605. width: 80rpx;
  606. height: 80rpx;
  607. border-radius: 8rpx;
  608. }
  609. .brand-logo {
  610. position: absolute;
  611. bottom: -8rpx;
  612. right: -8rpx;
  613. width: 32rpx;
  614. height: 32rpx;
  615. border-radius: 50%;
  616. border: 2rpx solid #fff;
  617. background: #fff;
  618. }
  619. }
  620. .item-info {
  621. flex: 1;
  622. .name-brand-row {
  623. display: flex;
  624. align-items: center;
  625. flex-wrap: wrap;
  626. margin-bottom: 4rpx;
  627. .name {
  628. font-size: 30rpx;
  629. color: #333;
  630. font-weight: 500;
  631. margin-right: 12rpx;
  632. }
  633. .brand-tag {
  634. background: #FFE8CC;
  635. color: #FF9500;
  636. font-size: 20rpx;
  637. padding: 4rpx 8rpx;
  638. border-radius: 8rpx;
  639. border: 1rpx solid #FFD4A0;
  640. }
  641. }
  642. .desc { font-size: 24rpx; color: #999; margin: 4rpx 0 8rpx 0; }
  643. .price-row {
  644. display: flex;
  645. align-items: center;
  646. .price { color: #FF9500; font-size: 26rpx; margin-right: 10rpx; }
  647. .count { color: #999; font-size: 24rpx; margin-right: 10rpx; }
  648. .amount { color: #333; font-size: 28rpx; margin-left: auto; }
  649. }
  650. }
  651. }
  652. }
  653. .expand-btn {
  654. text-align: center;
  655. color: #999;
  656. font-size: 24rpx;
  657. padding: 10rpx 0;
  658. .arrow { font-size: 20rpx; }
  659. }
  660. }
  661. .agreement-bar {
  662. display: flex;
  663. align-items: center;
  664. background: #fffbe6;
  665. padding: 20rpx 30rpx;
  666. font-size: 24rpx;
  667. .checkbox {
  668. width: 32rpx; height: 32rpx; border-radius: 50%; border: 2rpx solid #FFB74D;
  669. margin-right: 10rpx; display: flex; align-items: center; justify-content: center;
  670. background: #fff;
  671. &.active { background: #FFB74D; color: #fff; }
  672. }
  673. .link { color: #FFB74D; }
  674. }
  675. .bottom-bar {
  676. display: flex;
  677. align-items: center;
  678. justify-content: space-between;
  679. background: #fff;
  680. padding: 20rpx 30rpx calc(40rpx + env(safe-area-inset-bottom));
  681. .summary { color: #666; font-size: 26rpx; }
  682. .amount { color: #FF9500; font-size: 32rpx; font-weight: bold; margin-left: 10rpx; }
  683. .main-btn {
  684. background: #FFB74D;
  685. color: #fff;
  686. font-size: 28rpx;
  687. border-radius: 40rpx;
  688. padding: 0 40rpx;
  689. width: 60%;
  690. height: 80rpx;
  691. display: flex;
  692. justify-content: center;
  693. &[disabled] { opacity: 0.5; }
  694. }
  695. }
  696. .order-desc {
  697. color: #999;
  698. font-size: 22rpx;
  699. padding: 0 30rpx 20rpx 30rpx;
  700. line-height: 1.7;
  701. }
  702. .time-picker {
  703. position: fixed;
  704. left: 0;
  705. right: 0;
  706. top: 0;
  707. bottom: 0;
  708. z-index: 1000;
  709. .mask {
  710. position: absolute;
  711. left: 0;
  712. right: 0;
  713. top: 0;
  714. bottom: 0;
  715. background: rgba(0, 0, 0, 0.5);
  716. }
  717. .picker-content {
  718. position: absolute;
  719. left: 0;
  720. right: 0;
  721. bottom: 0;
  722. background: #fff;
  723. border-radius: 20rpx 20rpx 0 0;
  724. padding-bottom: env(safe-area-inset-bottom);
  725. .picker-header {
  726. padding: 30rpx 0 0 0;
  727. display: flex;
  728. align-items: center;
  729. border-bottom: 1rpx solid #eee;
  730. .reset {
  731. color: #bbb;
  732. font-size: 28rpx;
  733. margin-left: 30rpx;
  734. }
  735. .title {
  736. flex: 1;
  737. text-align: center;
  738. font-size: 32rpx;
  739. font-weight: 500;
  740. color: #222;
  741. margin-right: 60rpx;
  742. }
  743. }
  744. .picker-section {
  745. padding: 30rpx 30rpx 0 30rpx;
  746. .section-title {
  747. font-size: 28rpx;
  748. color: #222;
  749. margin-bottom: 20rpx;
  750. }
  751. .date-btns, .time-btns {
  752. display: flex;
  753. flex-wrap: wrap;
  754. gap: 20rpx 20rpx;
  755. }
  756. .date-btn, .time-btn {
  757. width: 200rpx;
  758. height: 70rpx;
  759. background: #f5f5f5;
  760. color: #999;
  761. border-radius: 18rpx;
  762. display: flex;
  763. align-items: center;
  764. justify-content: center;
  765. font-size: 28rpx;
  766. border: 2rpx solid transparent;
  767. margin-bottom: 10rpx;
  768. }
  769. .date-btn.active, .time-btn.active {
  770. background: #fff;
  771. color: #FFB74D;
  772. border: 2rpx solid #FFB74D;
  773. font-weight: 500;
  774. }
  775. }
  776. .confirm-btn {
  777. margin: 40rpx 30rpx 30rpx 30rpx;
  778. height: 90rpx;
  779. background: linear-gradient(90deg, #FFB74D 0%, #FF9500 100%);
  780. color: #fff;
  781. font-size: 32rpx;
  782. border-radius: 45rpx;
  783. display: flex;
  784. align-items: center;
  785. justify-content: center;
  786. box-shadow: 0 4rpx 16rpx rgba(255, 149, 0, 0.08);
  787. }
  788. }
  789. }
  790. .process-title {
  791. font-size: 32rpx;
  792. font-weight: bold;
  793. background: linear-gradient(to bottom,#fff3db 0%,#fffefb 40%);
  794. color: #222;
  795. text-align: left;
  796. padding: 36rpx 0 24rpx 30rpx;
  797. letter-spacing: 1rpx;
  798. }
  799. </style>