orderDetail.vue 21 KB

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