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

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