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

973 lines
26 KiB

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