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

771 lines
22 KiB

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