orderDetail.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633
  1. <template>
  2. <!-- 订单详情页面 -->
  3. <view class="content">
  4. <!-- 菜品清单 -->
  5. <view class="card">
  6. <!-- 店铺信息 -->
  7. <view class="store-info">
  8. <view class="store-info-title">{{ orderDetail.storeName || '店铺名称' }}</view>
  9. <view class="store-info-address">{{ orderDetail.storeAddress || '—' }}</view>
  10. </view>
  11. <view class="card-header">
  12. <view class="card-header-title">菜品详情</view>
  13. </view>
  14. <view class="card-content">
  15. <view class="info-food">
  16. <view v-for="(item, index) in displayFoodList" :key="item.id || index" class="food-item">
  17. <!-- 菜品图片:餐具用本地图 -->
  18. <image :src="getItemImage(item)" mode="aspectFill" class="food-item__image"></image>
  19. <!-- 菜品信息 -->
  20. <view class="food-item__info">
  21. <view class="food-item__name">{{ item.name }}</view>
  22. <view class="food-item__desc" v-if="item.tags && item.tags.length > 0">
  23. <text v-for="(tag, tagIndex) in item.tags" :key="tagIndex" class="food-item__tag"
  24. :class="tag.type">{{ tag.text }}<text v-if="tagIndex < item.tags.length - 1">,</text>
  25. </text>
  26. </view>
  27. </view>
  28. <!-- 价格和数量 -->
  29. <view class="food-item__right">
  30. <view class="food-item__price">
  31. <text class="price-main">¥{{ formatPrice(item.price) }}</text>
  32. </view>
  33. <view class="food-item__quantity">{{ item.quantity || 1 }}份</view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="card-header">
  39. <view class="card-header-title">价格明细</view>
  40. </view>
  41. <view class="card-content">
  42. <view class="info-item">
  43. <view class="info-item-label">菜品总价</view>
  44. <view class="info-item-value">¥{{ priceDetail.dishTotal }}</view>
  45. </view>
  46. <view class="info-item">
  47. <view class="info-item-label">餐具费</view>
  48. <view class="info-item-value">¥{{ priceDetail.tablewareFee }}</view>
  49. </view>
  50. <!-- 已完成订单:优惠金额(满减用 nominalValue;折扣按菜品总价与折扣率计算,与结算页选券逻辑一致) -->
  51. <view
  52. v-if="orderDetail.orderStatus === 3 && completedOrderDiscountDisplay > 0"
  53. class="info-item info-item--coupon"
  54. >
  55. <view class="info-item-label">优惠金额</view>
  56. <view class="info-item-value coupon-value">
  57. <text class="coupon-amount">-¥{{ formatPrice(completedOrderDiscountDisplay) }}</text>
  58. </view>
  59. </view>
  60. <view class="price-line">
  61. <view class="price-line-label">合计</view>
  62. <view class="price-line-value">¥{{ formatPrice(orderSummaryDisplayAmount) }}</view>
  63. </view>
  64. </view>
  65. </view>
  66. <!-- 已完成订单显示支付信息 -->
  67. <view v-if="orderDetail.orderStatus === 3" class="card">
  68. <view class="card-header">
  69. <view class="card-header-title">支付信息</view>
  70. </view>
  71. <view class="card-content">
  72. <view class="info-item">
  73. <view class="info-item-label">{{ payMethodText }}</view>
  74. <view class="info-item-value">¥{{ formatPrice(orderSummaryDisplayAmount) }}</view>
  75. </view>
  76. </view>
  77. </view>
  78. <!-- 订单卡片 -->
  79. <view class="card">
  80. <view class="card-header">
  81. <view class="card-header-title">订单信息</view>
  82. </view>
  83. <view class="card-content">
  84. <view class="info-item">
  85. <view class="info-item-label">订单编号</view>
  86. <view class="info-item-value">{{ orderDetail.orderNo || '—' }}</view>
  87. </view>
  88. <view class="info-item">
  89. <view class="info-item-label">就餐桌号</view>
  90. <view class="info-item-value">{{ orderDetail.tableNo || '—' }}</view>
  91. </view>
  92. <view class="info-item">
  93. <view class="info-item-label">用餐人数</view>
  94. <view class="info-item-value">{{ orderDetail.dinerCount != null && orderDetail.dinerCount !== '' ? orderDetail.dinerCount + '人' : '—' }}</view>
  95. </view>
  96. <view class="info-item">
  97. <view class="info-item-label">下单时间</view>
  98. <view class="info-item-value">{{ orderDetail.createTime || '—' }}</view>
  99. </view>
  100. <view class="info-item">
  101. <view class="info-item-label">联系电话</view>
  102. <view class="info-item-value">{{ orderDetail.contactPhone || '—' }}</view>
  103. </view>
  104. <view class="info-item">
  105. <view class="info-item-label">备注信息</view>
  106. <view class="info-item-value">{{ orderDetail.remark || '—' }}</view>
  107. </view>
  108. </view>
  109. </view>
  110. <!-- 底部按钮:已完成(3)不显示 -->
  111. <view v-if="orderDetail.orderStatus !== 3" class="bottom-button">
  112. <view class="bottom-button-text1 " hover-class="hover-active" @click="handleConfirmOrder">去加餐</view>
  113. <view class="bottom-button-text" hover-class="hover-active" @click="handleConfirmPay">去结算</view>
  114. </view>
  115. </view>
  116. </template>
  117. <script setup>
  118. import { onLoad } from "@dcloudio/uni-app";
  119. import { ref, computed } from "vue";
  120. import { getFileUrl } from "@/utils/file.js";
  121. import { GetOrderInfo } from "@/api/dining.js";
  122. const payType = ref('confirmOrder'); // confirmOrder 确认下单 confirmPay 确认支付
  123. /** 当前订单ID,用于「去结算」传参 */
  124. const detailOrderId = ref('');
  125. // 订单详情(店铺、订单信息)
  126. // orderStatus:0 待支付,1 已支付,2 已取消,3 已完成
  127. const orderDetail = ref({
  128. storeName: '',
  129. storeAddress: '',
  130. storeId: '',
  131. orderNo: '',
  132. tableId: '', // 桌号ID,用于跳转加餐
  133. tableNo: '', // 桌号展示(tableNumber)
  134. dinerCount: '',
  135. createTime: '',
  136. contactPhone: '',
  137. remark: '',
  138. orderStatus: null,
  139. payType: '' // 支付方式,如 wechatPayMininProgram
  140. });
  141. // 价格明细(两位小数)
  142. const priceDetail = ref({
  143. dishTotal: '0.00',
  144. tablewareFee: '0.00',
  145. couponDiscount: '0.00',
  146. discountAmount: 0,
  147. couponName: '',
  148. couponType: null,
  149. nominalValue: null,
  150. discountRate: null,
  151. total: '0.00'
  152. });
  153. // 支付方式展示:根据 payType 转为中文
  154. const payMethodText = computed(() => {
  155. const t = orderDetail.value?.payType ?? '';
  156. if (/wechat|微信/i.test(t)) return '微信支付';
  157. if (/alipay|支付宝/i.test(t)) return '支付宝';
  158. return t || '微信支付';
  159. });
  160. // 优惠券展示:满减券显示 nominalValue+元,折扣券显示 discountRate+折,否则显示 couponName 或 已使用优惠券(与 checkout 一致)
  161. const couponDisplayText = computed(() => {
  162. const p = priceDetail.value;
  163. const amount = Number(p.discountAmount ?? p.couponDiscount ?? 0) || 0;
  164. if (amount <= 0) return '—';
  165. const type = Number(p.couponType);
  166. if (type === 1 && (p.nominalValue != null && p.nominalValue !== '')) {
  167. const val = Number(p.nominalValue);
  168. return Number.isNaN(val) ? (p.couponName || '已使用优惠券') : val + '元';
  169. }
  170. if (type === 2 && (p.discountRate != null && p.discountRate !== '')) {
  171. const rate = Number(p.discountRate);
  172. return Number.isNaN(rate) ? (p.couponName || '已使用优惠券') : rate + '折';
  173. }
  174. return p.couponName || '已使用优惠券';
  175. });
  176. // 已完成订单展示用优惠金额:与 pages/checkout 选券后 discountAmount 计算一致
  177. // couponType 1 满减:取 nominalValue;2 折扣:菜品总价 × (1 - discountRate/10),discountRate 已为接口值/10
  178. const completedOrderDiscountDisplay = computed(() => {
  179. if (orderDetail.value.orderStatus !== 3) return 0;
  180. const p = priceDetail.value;
  181. const dishTotalNum = Number(p.dishTotal) || 0;
  182. const type = Number(p.couponType);
  183. if (type === 1) {
  184. if (p.nominalValue != null && p.nominalValue !== '') {
  185. const nv = Number(p.nominalValue);
  186. return Number.isNaN(nv) ? 0 : Math.max(0, nv);
  187. }
  188. return Math.max(0, Number(p.discountAmount) || 0);
  189. }
  190. if (type === 2) {
  191. if (p.discountRate == null || p.discountRate === '' || dishTotalNum <= 0) return 0;
  192. const rate = Number(p.discountRate) || 0;
  193. return Math.round(dishTotalNum * (1 - rate / 10) * 100) / 100;
  194. }
  195. return Math.max(0, Number(p.discountAmount) || 0);
  196. });
  197. // 合计 / 已完成实付展示:已完成 = 菜品总价 + 餐具费 − 优惠(与结算页 payAmount 一致);未完成 = 接口应付 total
  198. const orderSummaryDisplayAmount = computed(() => {
  199. const p = priceDetail.value;
  200. if (orderDetail.value.orderStatus === 3) {
  201. const dish = Number(p.dishTotal) || 0;
  202. const utensil = Number(p.tablewareFee) || 0;
  203. const discount = completedOrderDiscountDisplay.value;
  204. return Math.max(0, Math.round((dish + utensil - discount) * 100) / 100);
  205. }
  206. return Number(p.total) || 0;
  207. });
  208. // 菜品列表(接口订单明细)
  209. const foodList = ref([]);
  210. // 菜品详情展示:包含所有项(含餐具 id/cuisineId === -1)
  211. const displayFoodList = computed(() => foodList.value ?? []);
  212. // 取第一张图:逗号分隔取首段,数组取首项,对象取 url/path/src(与 orderInfo/index、FoodCard 一致)
  213. function firstImage(val) {
  214. if (val == null || val === '') return '';
  215. if (Array.isArray(val)) {
  216. const first = val[0];
  217. if (first != null && first !== '') {
  218. if (typeof first === 'object' && first !== null) return first.url ?? first.path ?? first.src ?? first.link ?? '';
  219. return String(first).split(/[,,]/)[0].trim();
  220. }
  221. return '';
  222. }
  223. if (typeof val === 'object') return val.url ?? val.path ?? val.src ?? val.link ?? '';
  224. const str = String(val).trim();
  225. return str ? str.split(/[,,]/)[0].trim() : '';
  226. }
  227. // 菜品图片:餐具(id/cuisineId=-1)用本地图;其他取首图并 getFileUrl
  228. function getItemImage(item) {
  229. if (Number(item?.id ?? item?.cuisineId) === -1) return '/static/utensilFee.png';
  230. const raw = item?.image ?? item?.cuisineImage ?? item?.imageUrl ?? item?.pic ?? item?.cover ?? item?.images ?? '';
  231. const url = firstImage(raw) || (typeof raw === 'string' ? raw.split(/[,,]/)[0]?.trim() : '');
  232. if (url && typeof url === 'string' && (url.startsWith('http') || url.startsWith('//'))) return url;
  233. return getFileUrl(url || 'img/icon/shop.png');
  234. }
  235. // 金额保留两位小数
  236. const formatPrice = (price) => {
  237. if (price === '' || price === null || price === undefined) return '0.00';
  238. const num = Number(price);
  239. return Number.isNaN(num) ? '0.00' : num.toFixed(2);
  240. };
  241. // 将 tags 统一为 [{ text, type }] 格式
  242. function normalizeTags(raw) {
  243. if (raw == null) return [];
  244. let arr = [];
  245. if (Array.isArray(raw)) arr = raw;
  246. else if (typeof raw === 'string') {
  247. const t = raw.trim();
  248. if (t.startsWith('[')) { try { arr = JSON.parse(t); if (!Array.isArray(arr)) arr = []; } catch { arr = t ? [t] : []; } }
  249. else arr = t ? t.split(/[,,、\s]+/).map(s => s.trim()).filter(Boolean) : [];
  250. } else if (raw && typeof raw === 'object') arr = Array.isArray(raw.list) ? raw.list : Array.isArray(raw.items) ? raw.items : [];
  251. return arr.map((it) => {
  252. if (it == null) return { text: '', type: '' };
  253. if (typeof it === 'string') return { text: it, type: '' };
  254. if (typeof it === 'number') return { text: String(it), type: '' };
  255. return { text: it.text ?? it.tagName ?? it.name ?? it.label ?? it.title ?? '', type: it.type ?? it.tagType ?? '' };
  256. }).filter((t) => t.text !== '' && t.text != null);
  257. }
  258. // 将接口订单项转为列表项(图片取首张,逗号/数组/对象与 orderInfo/index 一致)
  259. function normalizeOrderItem(item) {
  260. const rawTags = item?.tags ?? item?.tagList ?? item?.tagNames ?? item?.labels ?? item?.tag;
  261. const rawImg = item?.images ?? item?.image ?? item?.cuisineImage ?? item?.imageUrl ?? item?.pic ?? item?.cover ?? '';
  262. const imageUrl = firstImage(rawImg) || (typeof rawImg === 'string' ? rawImg.split(/[,,]/)[0]?.trim() : '') || 'img/icon/shop.png';
  263. return {
  264. id: item?.id ?? item?.cuisineId,
  265. name: item?.cuisineName ?? item?.name ?? '',
  266. price: item?.totalPrice ?? item?.unitPrice ?? item?.price ?? 0,
  267. image: imageUrl,
  268. quantity: item?.quantity ?? 1,
  269. tags: normalizeTags(rawTags)
  270. };
  271. }
  272. // 从接口数据填充 orderDetail、priceDetail、foodList
  273. function applyOrderData(data) {
  274. const raw = data?.data ?? data ?? {};
  275. const store = raw?.storeInfo ?? raw?.store ?? {};
  276. orderDetail.value = {
  277. storeName: store?.storeName ?? raw?.storeName ?? '',
  278. storeAddress: store?.storeAddress ?? store?.address ?? raw?.storeAddress ?? raw?.address ?? '',
  279. storeId: store?.storeId ?? store?.id ?? raw?.storeId ?? raw?.store_id ?? '',
  280. orderNo: raw?.orderNo ?? raw?.orderId ?? '',
  281. tableId: raw?.tableId ?? raw?.tableNumber ?? '', // 加餐跳转用
  282. tableNo: raw?.tableNumber ?? raw?.tableNo ?? raw?.tableName ?? '',
  283. dinerCount: raw?.dinerCount ?? '',
  284. createTime: raw?.createdTime ?? raw?.createTime ?? raw?.orderTime ?? '',
  285. contactPhone: raw?.contactPhone ?? raw?.phone ?? '',
  286. remark: raw?.remark ?? '',
  287. orderStatus: raw?.orderStatus ?? raw?.status ?? null,
  288. payType: raw?.payType ?? raw?.payMethod ?? ''
  289. };
  290. const couponInfo = raw?.couponInfo ?? raw?.coupon ?? {};
  291. const dishTotal = raw?.totalAmount ?? raw?.dishTotal ?? raw?.orderAmount ?? raw?.foodAmount ?? 0;
  292. const tablewareFee = raw?.tablewareFee ?? raw?.tablewareAmount ?? 0;
  293. const couponDiscount = raw?.couponAmount ?? raw?.couponDiscount ?? 0;
  294. const discountAmountVal = Number(raw?.discountAmount ?? raw?.couponAmount ?? raw?.couponDiscount ?? 0) || 0;
  295. const total = raw?.payAmount ?? raw?.totalAmount ?? raw?.totalPrice ?? 0;
  296. const rawDiscountRate =
  297. raw?.discountRate ?? couponInfo?.discountRate ?? raw?.coupon?.discountRate;
  298. const discountRateVal = rawDiscountRate != null && rawDiscountRate !== '' ? (Number(rawDiscountRate) || 0) / 10 : null;
  299. priceDetail.value = {
  300. dishTotal: formatPrice(dishTotal),
  301. tablewareFee: formatPrice(tablewareFee),
  302. couponDiscount: formatPrice(couponDiscount),
  303. discountAmount: discountAmountVal,
  304. couponName: raw?.couponName ?? couponInfo?.couponName ?? couponInfo?.name ?? '',
  305. couponType: raw?.couponType ?? couponInfo?.couponType ?? null,
  306. nominalValue: raw?.nominalValue ?? couponInfo?.nominalValue ?? couponInfo?.amount ?? null,
  307. discountRate: discountRateVal,
  308. total: formatPrice(total)
  309. };
  310. const list = raw?.orderItemList ?? raw?.orderItems ?? raw?.items ?? raw?.detailList ?? [];
  311. foodList.value = (Array.isArray(list) ? list : []).map(normalizeOrderItem);
  312. }
  313. // 去加餐:跳转点餐页,携带桌号与就餐人数
  314. const handleConfirmOrder = () => {
  315. const tableid = uni.getStorageSync('currentTableId');
  316. const diners = orderDetail.value?.dinerCount ?? '';
  317. const storeId = orderDetail.value?.storeId ?? '';
  318. if (!tableid) {
  319. uni.showToast({ title: '订单缺少桌号信息,无法加餐', icon: 'none' });
  320. return;
  321. }
  322. const q = [];
  323. q.push(`tableid=${encodeURIComponent(String(tableid))}`);
  324. if (diners !== '' && diners != null) q.push(`diners=${encodeURIComponent(String(diners))}`);
  325. if (storeId !== '' && storeId != null) q.push(`storeId=${encodeURIComponent(String(storeId))}`);
  326. uni.navigateTo({ url: `/pages/orderFood/index?${q.join('&')}` });
  327. };
  328. // 去结算:跳转确认订单页,携带订单ID、订单号、桌号、就餐人数、订单金额(用于调起支付)
  329. const handleConfirmPay = () => {
  330. const orderId = detailOrderId.value || '';
  331. const orderNo = orderDetail.value?.orderNo ?? '';
  332. const tableId = orderDetail.value?.tableId || orderDetail.value?.tableNo || '';
  333. const tableNumber = orderDetail.value?.tableNo ?? orderDetail.value?.tableNumber ?? '';
  334. const diners = orderDetail.value?.dinerCount ?? '';
  335. const totalAmount = priceDetail.value?.total ?? '';
  336. const remark = (orderDetail.value?.remark ?? '').trim().slice(0, 30);
  337. const q = [];
  338. if (orderId !== '') q.push(`orderId=${encodeURIComponent(String(orderId))}`);
  339. if (orderNo !== '') q.push(`orderNo=${encodeURIComponent(String(orderNo))}`);
  340. if (tableId !== '') q.push(`tableId=${encodeURIComponent(String(tableId))}`);
  341. if (tableNumber !== '') q.push(`tableNumber=${encodeURIComponent(String(tableNumber))}`);
  342. if (diners !== '') q.push(`diners=${encodeURIComponent(String(diners))}`);
  343. if (totalAmount !== '' && totalAmount != null) q.push(`totalAmount=${encodeURIComponent(String(totalAmount))}`);
  344. if (remark !== '') q.push(`remark=${encodeURIComponent(remark)}`);
  345. uni.navigateTo({ url: q.length ? `/pages/checkout/index?${q.join('&')}` : '/pages/checkout/index' });
  346. };
  347. onLoad(async (e) => {
  348. if (e.payType) payType.value = e.payType;
  349. const orderId = e?.orderId ?? e?.id ?? '';
  350. detailOrderId.value = orderId;
  351. if (!orderId) {
  352. uni.showToast({ title: '缺少订单ID', icon: 'none' });
  353. return;
  354. }
  355. try {
  356. const res = await GetOrderInfo(orderId);
  357. applyOrderData(res);
  358. } catch (err) {
  359. console.error('订单详情加载失败:', err);
  360. uni.showToast({ title: '加载失败', icon: 'none' });
  361. }
  362. });
  363. </script>
  364. <style lang="scss" scoped>
  365. .content {
  366. padding: 0 30rpx 300rpx;
  367. }
  368. .card {
  369. background-color: #fff;
  370. border-radius: 24rpx;
  371. padding: 30rpx 0;
  372. margin-top: 20rpx;
  373. .card-header {
  374. display: flex;
  375. justify-content: space-between;
  376. align-items: center;
  377. padding: 0 30rpx;
  378. height: 40rpx;
  379. position: relative;
  380. font-size: 27rpx;
  381. color: #151515;
  382. font-weight: bold;
  383. }
  384. .tag {
  385. width: 10rpx;
  386. height: 42rpx;
  387. background: linear-gradient(35deg, #FCB73F 0%, #FC733D 100%);
  388. border-radius: 0rpx 0rpx 0rpx 0rpx;
  389. position: absolute;
  390. left: 0;
  391. top: 0;
  392. }
  393. .card-content {
  394. padding: 0 30rpx;
  395. }
  396. .info-item {
  397. display: flex;
  398. justify-content: space-between;
  399. align-items: center;
  400. margin-top: 20rpx;
  401. font-size: 27rpx;
  402. .info-item-label {
  403. color: #666666;
  404. }
  405. .info-item-value {
  406. color: #151515;
  407. }
  408. &--coupon .coupon-value {
  409. display: flex;
  410. align-items: center;
  411. gap: 8rpx;
  412. }
  413. .coupon-amount {
  414. color: #E61F19;
  415. }
  416. .coupon-placeholder {
  417. color: #999999;
  418. }
  419. }
  420. .info-item-textarea {
  421. width: 100%;
  422. height: 115rpx;
  423. border-radius: 8rpx;
  424. border: 1rpx solid #F2F2F2;
  425. margin-top: 20rpx;
  426. font-size: 23rpx;
  427. color: #AAAAAA;
  428. box-sizing: border-box;
  429. padding: 20rpx;
  430. }
  431. .info-food {
  432. margin-top: 20rpx;
  433. }
  434. .food-item {
  435. display: flex;
  436. align-items: center;
  437. padding: 20rpx 0;
  438. &:last-child {
  439. border-bottom: none;
  440. }
  441. &__image {
  442. width: 118rpx;
  443. height: 118rpx;
  444. border-radius: 8rpx;
  445. flex-shrink: 0;
  446. background-color: #f5f5f5;
  447. }
  448. &__info {
  449. flex: 1;
  450. margin-left: 20rpx;
  451. display: flex;
  452. flex-direction: column;
  453. justify-content: center;
  454. }
  455. &__name {
  456. font-size: 28rpx;
  457. font-weight: bold;
  458. color: #151515;
  459. margin-bottom: 8rpx;
  460. }
  461. &__desc {
  462. font-size: 24rpx;
  463. color: #666666;
  464. line-height: 1.5;
  465. }
  466. &__tag {
  467. font-size: 24rpx;
  468. color: #666666;
  469. &.signature {
  470. color: #FC793D;
  471. }
  472. &.spicy {
  473. color: #2E2E2E;
  474. }
  475. }
  476. &__right {
  477. display: flex;
  478. flex-direction: column;
  479. align-items: flex-end;
  480. justify-content: center;
  481. margin-left: 20rpx;
  482. }
  483. &__price {
  484. display: flex;
  485. align-items: baseline;
  486. color: #151515;
  487. font-weight: bold;
  488. margin-bottom: 8rpx;
  489. .price-symbol {
  490. font-size: 20rpx;
  491. margin-right: 2rpx;
  492. }
  493. .price-main {
  494. font-size: 28rpx;
  495. }
  496. .price-decimal {
  497. font-size: 24rpx;
  498. }
  499. }
  500. &__quantity {
  501. font-size: 24rpx;
  502. color: #797979;
  503. }
  504. }
  505. .price-line {
  506. display: flex;
  507. justify-content: space-between;
  508. align-items: center;
  509. margin-top: 20rpx;
  510. font-size: 27rpx;
  511. color: #151515;
  512. border-top: 1rpx solid rgba(170, 170, 170, 0.15);
  513. font-weight: bold;
  514. padding-top: 20rpx;
  515. }
  516. }
  517. .bottom-button {
  518. width: 100%;
  519. background-color: #fff;
  520. padding: 20rpx 30rpx;
  521. box-sizing: border-box;
  522. position: fixed;
  523. bottom: 0;
  524. left: 0;
  525. right: 0;
  526. z-index: 999;
  527. padding-bottom: env(safe-area-inset-bottom);
  528. box-shadow: 0rpx -11rpx 46rpx 0rpx rgba(0, 0, 0, 0.05);
  529. display: flex;
  530. justify-content: space-between;
  531. align-items: center;
  532. .bottom-button-text1 {
  533. font-size: 32rpx;
  534. font-weight: bold;
  535. color: #fff;
  536. width: 324rpx;
  537. height: 80rpx;
  538. border-radius: 23rpx 23rpx 23rpx 23rpx;
  539. border: 2rpx solid #F47D1F;
  540. display: flex;
  541. align-items: center;
  542. color: #F47D1F;
  543. justify-content: center;
  544. }
  545. .bottom-button-text {
  546. font-size: 32rpx;
  547. font-weight: bold;
  548. color: #fff;
  549. background: linear-gradient(90deg, #FCB73F 0%, #FC743D 100%);
  550. border-radius: 23rpx 23rpx 23rpx 23rpx;
  551. display: flex;
  552. align-items: center;
  553. justify-content: center;
  554. width: 324rpx;
  555. height: 80rpx;
  556. }
  557. }
  558. .store-info {
  559. border-bottom: 1rpx solid rgba(170, 170, 170, 0.15);
  560. box-sizing: border-box;
  561. margin: 0 30rpx 30rpx;
  562. .store-info-title {
  563. font-size: 27rpx;
  564. color: #151515;
  565. font-weight: bold;
  566. margin-bottom: 10rpx;
  567. }
  568. .store-info-address {
  569. font-size: 23rpx;
  570. color: #AAAAAA;
  571. margin-bottom: 30rpx;
  572. }
  573. }
  574. </style>