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

976 lines
26 KiB

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