index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. <template>
  2. <!-- 下单页面 -->
  3. <view class="content">
  4. <!-- 订单卡片 -->
  5. <view class="card">
  6. <view class="card-header">
  7. <view class='tag'></view>
  8. <view class="card-header-title">订单信息</view>
  9. </view>
  10. <view class="card-content">
  11. <view class="info-item">
  12. <view class="info-item-label">就餐桌号</view>
  13. <view class="info-item-value">{{ orderInfo.tableNumber || orderInfo.tableId || '—' }}</view>
  14. </view>
  15. <view class="info-item">
  16. <view class="info-item-label">用餐人数</view>
  17. <view class="info-item-value">{{ orderInfo.diners || '—' }}人</view>
  18. </view>
  19. <view class="info-item">
  20. <view class="info-item-label">联系电话</view>
  21. <view class="info-item-value">{{ orderInfo.contactPhone || '—' }}</view>
  22. </view>
  23. <view class="info-item">
  24. <view class="info-item-label">备注信息</view>
  25. </view>
  26. <textarea
  27. v-model="orderInfo.remark"
  28. placeholder="请输入特殊需求,如少辣、不要香菜等(最多30字)"
  29. class="info-item-textarea"
  30. maxlength="30"
  31. ></textarea>
  32. </view>
  33. </view>
  34. <!-- 菜品清单 -->
  35. <view class="card">
  36. <view class="card-header">
  37. <view class='tag'></view>
  38. <view class="card-header-title">菜品清单</view>
  39. </view>
  40. <view class="card-content">
  41. <view class="info-food">
  42. <view v-for="(item, index) in foodList" :key="item.id || item.cuisineId || index" class="food-item">
  43. <!-- 菜品图片:兼容 cuisineImage/image,逗号分隔取首图 -->
  44. <image :src="getItemImage(item)" mode="aspectFill" class="food-item__image"></image>
  45. <!-- 菜品信息 -->
  46. <view class="food-item__info">
  47. <view class="food-item__name">{{ item.name || item.cuisineName }}</view>
  48. <view class="food-item__desc" v-if="item.tags && item.tags.length > 0">
  49. <text v-for="(tag, tagIndex) in item.tags" :key="tagIndex" class="food-item__tag">
  50. {{ tag.text }}<text v-if="tagIndex < item.tags.length - 1">,</text>
  51. </text>
  52. </view>
  53. </view>
  54. <!-- 价格和数量 -->
  55. <view class="food-item__right">
  56. <view class="food-item__price">
  57. <text class="price-main">¥{{ formatPrice(getItemPrice(item)) }}</text>
  58. </view>
  59. <view class="food-item__quantity">{{ item.quantity || 1 }}份</view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. <!-- 总价 -->
  66. <view class="card">
  67. <view class="card-header">
  68. <view class='tag'></view>
  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">菜品总价</view>
  74. <view class="info-item-value">¥{{ formatPrice(dishTotal) }}</view>
  75. </view>
  76. <view class="info-item">
  77. <view class="info-item-label">餐具费</view>
  78. <view class="info-item-value">¥{{ formatPrice(orderInfo.utensilFee ?? 0) }}</view>
  79. </view>
  80. <view class="info-item info-item--coupon info-item--clickable" @click="onCouponRowClick">
  81. <view class="info-item-label">优惠券</view>
  82. <view class="info-item-value coupon-value">
  83. <text v-if="selectedCouponDisplay" class="coupon-amount">{{ selectedCouponDisplay }}</text>
  84. <text v-else class="coupon-placeholder">请选择</text>
  85. <text class="coupon-arrow">›</text>
  86. </view>
  87. </view>
  88. <view v-if="(orderInfo.discountAmount ?? 0) > 0" class="info-item info-item--coupon info-item--clickable" @click="onCouponRowClick">
  89. <view class="info-item-label">优惠金额</view>
  90. <view class="info-item-value coupon-value">
  91. <text class="coupon-amount">-¥{{ formatPrice(orderInfo.discountAmount) }}</text>
  92. <text class="coupon-arrow">›</text>
  93. </view>
  94. </view>
  95. <view class="price-line">
  96. <view class="price-line-label">应付金额</view>
  97. <view class="price-line-value">¥{{ formatPrice(orderInfo.payAmount ?? orderInfo.totalAmount) }}</view>
  98. </view>
  99. </view>
  100. </view>
  101. <!-- 底部按钮:确认下单(去结算请走 pages/checkout/index) -->
  102. <view class="bottom-button">
  103. <view class="bottom-button-text" hover-class="hover-active" @click="handleConfirmOrder">确认下单</view>
  104. </view>
  105. <!-- 选择优惠券弹窗(仅确认下单时可选) -->
  106. <SelectCouponModal
  107. v-model:open="couponModalOpen"
  108. :coupon-list="couponList"
  109. :selected-coupon-id="selectedCouponId"
  110. :view-only="false"
  111. @select="handleCouponSelect"
  112. @close="couponModalOpen = false"
  113. />
  114. </view>
  115. </template>
  116. <script setup>
  117. import { onLoad, onShow, onUnload } from "@dcloudio/uni-app";
  118. import { ref, computed } from "vue";
  119. import { go } from "@/utils/utils.js";
  120. import { getFileUrl } from "@/utils/file.js";
  121. import { useUserStore } from "@/store/user.js";
  122. import * as diningApi from "@/api/dining.js";
  123. import SelectCouponModal from "@/pages/orderFood/components/SelectCouponModal.vue";
  124. // 订单信息(从购物车带过来或 URL 参数)
  125. const orderInfo = ref({
  126. orderNo: '',
  127. tableId: '',
  128. tableNumber: '',
  129. diners: '',
  130. contactPhone: '',
  131. remark: '',
  132. totalAmount: 0,
  133. dishTotal: null,
  134. utensilFee: 0,
  135. discountAmount: 0,
  136. payAmount: 0,
  137. couponId: null
  138. });
  139. // 优惠券选择
  140. const couponModalOpen = ref(false);
  141. const selectedCouponId = ref(null);
  142. const couponList = ref([]);
  143. /** 选中券的展示文案(如 "5.5折"、"10元"),用于价格明细展示 */
  144. const selectedCouponDisplay = ref('');
  145. // 菜品列表(从购物车带过来)
  146. const foodList = ref([]);
  147. // 菜品清单展示:排除餐具(id/cuisineId === -1)
  148. const displayFoodList = computed(() => {
  149. return (foodList.value ?? []).filter((it) => Number(it?.id ?? it?.cuisineId) !== -1);
  150. });
  151. // 菜品总价(不含餐具费):仅按菜品清单中非餐具项汇总,不包含餐具费
  152. const dishTotal = computed(() => {
  153. const list = displayFoodList.value ?? [];
  154. const sum = list.reduce((s, it) => {
  155. const qty = Number(it?.quantity) || 0;
  156. const price = Number(it?.unitPrice ?? it?.price ?? it?.totalPrice ?? it?.salePrice ?? 0) || 0;
  157. return s + qty * price;
  158. }, 0);
  159. return Math.max(0, sum);
  160. });
  161. // 菜品图片:餐具(id/cuisineId=-1)固定用本地 /static/utensilFee.png,其他取接口图
  162. function getItemImage(item) {
  163. const id = item?.id ?? item?.cuisineId;
  164. if (Number(id) === -1) return '/static/utensilFee.png';
  165. const raw = item?.cuisineImage ?? item?.image ?? item?.imageUrl ?? '';
  166. const url = typeof raw === 'string' ? raw.split(',')[0].trim() : raw;
  167. return url ? getFileUrl(url) : '';
  168. }
  169. // 单品单价:列表展示用 unitPrice/price
  170. function getItemPrice(item) {
  171. const p = item?.unitPrice ?? item?.price ?? item?.totalPrice ?? item?.salePrice ?? 0;
  172. return Number(p) || 0;
  173. }
  174. function formatPrice(price) {
  175. const num = Number(price);
  176. return Number.isNaN(num) ? '0.00' : num.toFixed(2);
  177. }
  178. // 规范化优惠券项(与 orderFood 的 normalizeCouponItem 一致,供 SelectCouponModal 使用)
  179. function normalizeCouponItem(item) {
  180. if (!item || typeof item !== 'object') return null;
  181. const raw = item;
  182. const couponType = Number(raw.couponType) || 0;
  183. const nominalValue = Number(raw.nominalValue ?? raw.amount ?? 0) || 0;
  184. const discountRate = Number(raw.discountRate) || 0;
  185. const minAmount = Number(raw.minimumSpendingAmount ?? raw.minAmount ?? 0) || 0;
  186. let amountDisplay = nominalValue + '元';
  187. if (couponType === 1) amountDisplay = nominalValue + '元';
  188. else if (couponType === 2 && discountRate > 0) amountDisplay = (discountRate % 1 === 0 ? discountRate : discountRate.toFixed(1)) + '折';
  189. return {
  190. id: raw.userCouponId ?? raw.id ?? raw.couponId ?? '',
  191. amount: nominalValue,
  192. minAmount,
  193. name: raw.name ?? raw.title ?? raw.couponName ?? '',
  194. expireDate: raw.expirationTime ?? raw.endGetDate ?? raw.expireDate ?? '',
  195. couponType,
  196. discountRate,
  197. amountDisplay
  198. };
  199. }
  200. // 点击优惠券行:打开选择弹窗
  201. const onCouponRowClick = () => {
  202. openCouponModal();
  203. };
  204. // 打开优惠券弹窗并拉取用户可用券
  205. const openCouponModal = async () => {
  206. const storeId = uni.getStorageSync('currentStoreId') || '';
  207. couponModalOpen.value = false;
  208. try {
  209. const res = await diningApi.GetUserCouponList({ storeId });
  210. const list = Array.isArray(res) ? res : (res?.data ?? res?.records ?? res?.list ?? []);
  211. const normalized = (Array.isArray(list) ? list : []).map(normalizeCouponItem).filter(Boolean);
  212. couponList.value = normalized;
  213. couponModalOpen.value = true;
  214. } catch (err) {
  215. console.error('获取优惠券失败:', err);
  216. uni.showToast({ title: '获取优惠券失败', icon: 'none' });
  217. }
  218. };
  219. // 选择优惠券后更新订单优惠与应付金额(折扣券按折扣率计算优惠金额)
  220. const handleCouponSelect = ({ coupon, selectedId }) => {
  221. selectedCouponId.value = selectedId != null && selectedId !== '' ? String(selectedId) : null;
  222. orderInfo.value.couponId = selectedCouponId.value;
  223. if (!coupon) {
  224. selectedCouponDisplay.value = '';
  225. orderInfo.value.discountAmount = 0;
  226. } else {
  227. selectedCouponDisplay.value = coupon.amountDisplay || (coupon.amount ? coupon.amount + '元' : '');
  228. const total = dishTotal.value;
  229. const couponType = Number(coupon.couponType) || 0;
  230. if (couponType === 2 && coupon.discountRate != null && total > 0) {
  231. // 折扣券:优惠金额 = 菜品总价 × (1 - 折数/10),如 5.5折 即 优惠 = 总价 × 0.45
  232. const rate = Number(coupon.discountRate) || 0;
  233. orderInfo.value.discountAmount = Math.round(total * (1 - rate / 10) * 100) / 100;
  234. } else {
  235. orderInfo.value.discountAmount = Number(coupon.amount) || 0;
  236. }
  237. }
  238. updatePayAmount();
  239. couponModalOpen.value = false;
  240. };
  241. // 根据菜品总价(不含餐具)、餐具费、优惠额计算应付金额
  242. const updatePayAmount = () => {
  243. const dish = dishTotal.value;
  244. const utensil = Number(orderInfo.value.utensilFee) || 0;
  245. const discount = Number(orderInfo.value.discountAmount) || 0;
  246. orderInfo.value.payAmount = Math.max(0, dish + utensil - discount);
  247. };
  248. // 进入页面时调一次优惠券接口:默认不选中,显示请选择
  249. const fetchCouponsOnEnter = async () => {
  250. const storeId = uni.getStorageSync('currentStoreId') || '';
  251. try {
  252. const res = await diningApi.GetUserCouponList({ storeId });
  253. const list = Array.isArray(res) ? res : (res?.data ?? res?.records ?? res?.list ?? []);
  254. const normalized = (Array.isArray(list) ? list : []).map(normalizeCouponItem).filter(Boolean);
  255. couponList.value = normalized;
  256. selectedCouponId.value = null;
  257. selectedCouponDisplay.value = '';
  258. orderInfo.value.couponId = null;
  259. orderInfo.value.discountAmount = 0;
  260. updatePayAmount();
  261. } catch (err) {
  262. console.error('获取优惠券失败:', err);
  263. selectedCouponDisplay.value = '';
  264. orderInfo.value.discountAmount = 0;
  265. orderInfo.value.couponId = null;
  266. selectedCouponId.value = null;
  267. updatePayAmount();
  268. }
  269. };
  270. // 将存储的购物车项转为确认页展示格式(兼容 cuisineName/cuisineImage/unitPrice 等)
  271. function normalizeCartItem(item) {
  272. const image = item?.cuisineImage ?? item?.image ?? item?.imageUrl ?? '';
  273. const url = typeof image === 'string' ? image.split(',')[0].trim() : image;
  274. return {
  275. id: item?.id ?? item?.cuisineId,
  276. name: item?.name ?? item?.cuisineName,
  277. cuisineName: item?.cuisineName,
  278. price: item?.unitPrice ?? item?.price,
  279. image: url,
  280. cuisineImage: item?.cuisineImage,
  281. quantity: Number(item?.quantity) || 0,
  282. tags: item?.tags ?? [],
  283. subtotalAmount: item?.subtotalAmount,
  284. remark: item?.remark
  285. };
  286. }
  287. const handleConfirmOrder = async () => {
  288. const tableId = orderInfo.value.tableId;
  289. const contactPhone = orderInfo.value.contactPhone ?? '';
  290. const dinerCount = Number(orderInfo.value.diners) || 0;
  291. if (!tableId) {
  292. uni.showToast({ title: '请先选择桌号', icon: 'none' });
  293. return;
  294. }
  295. if (!contactPhone) {
  296. uni.showToast({ title: '请先填写联系电话', icon: 'none' });
  297. return;
  298. }
  299. const remark = (orderInfo.value.remark ?? '').trim().slice(0, 30);
  300. uni.showLoading({ title: '提交中...' });
  301. try {
  302. const tablewareFee = Number(orderInfo.value.utensilFee) || 0;
  303. const payAmount = Number((Number(orderInfo.value.payAmount) ?? 0).toFixed(2));
  304. const totalAmount = Number((Number(dishTotal.value) ?? 0).toFixed(2));
  305. const res = await diningApi.PostOrderCreate({
  306. tableId,
  307. contactPhone,
  308. totalAmount,
  309. couponId: (selectedCouponId.value ?? orderInfo.value.couponId) || null,
  310. discountAmount: orderInfo.value.discountAmount ?? 0,
  311. tablewareFee,
  312. payAmount,
  313. dinerCount: dinerCount || undefined,
  314. immediatePay: 0,
  315. remark: remark || undefined
  316. });
  317. uni.hideLoading();
  318. const orderId = res?.id ?? res?.orderId ?? res?.data?.id ?? res?.data?.orderId;
  319. const orderNo = res?.orderNo ?? res?.data?.orderNo ?? orderId ?? '';
  320. const total = orderInfo.value.payAmount ?? orderInfo.value.totalAmount ?? 0;
  321. // 结果页「去结算」需带 orderId/orderNo/金额/备注,用于确认支付
  322. uni.setStorageSync('lastPlaceOrderInfo', JSON.stringify({
  323. orderId: orderId ?? undefined,
  324. orderNo: orderNo ?? undefined,
  325. tableId: orderInfo.value.tableId,
  326. tableNumber: orderInfo.value.tableNumber,
  327. diners: orderInfo.value.diners,
  328. totalAmount: total,
  329. remark: (orderInfo.value.remark ?? '').trim().slice(0, 30)
  330. }));
  331. // 确认下单成功后即将跳转,此时页面不会触发 onUnload,需主动调用解锁
  332. const unlockFn = diningApi.PostOrderUnlock || diningApi.postOrderUnlock;
  333. if (typeof unlockFn === 'function' && tableId) {
  334. unlockFn({ tableId }).catch((err) => console.warn('解锁订单失败:', err));
  335. }
  336. if (orderId != null) {
  337. go(`/pages/result/index?id=${encodeURIComponent(orderId)}`);
  338. } else {
  339. go('/pages/result/index');
  340. }
  341. } catch (e) {
  342. uni.hideLoading();
  343. uni.showToast({ title: e?.message || '下单失败', icon: 'none' });
  344. }
  345. };
  346. onLoad((options) => {
  347. const userStore = useUserStore();
  348. const contactPhone = userStore.getUserInfo?.phone ?? userStore.getUserInfo?.contactPhone ?? userStore.getUserInfo?.mobile ?? '';
  349. orderInfo.value.contactPhone = contactPhone;
  350. const raw = uni.getStorageSync('placeOrderCart');
  351. if (raw) {
  352. try {
  353. const data = JSON.parse(raw);
  354. const list = Array.isArray(data.list) ? data.list : [];
  355. foodList.value = list.map(normalizeCartItem).filter((item) => (item.quantity || 0) > 0);
  356. if (data.tableId != null) orderInfo.value.tableId = data.tableId;
  357. if (data.tableNumber != null) orderInfo.value.tableNumber = data.tableNumber;
  358. if (data.diners != null) orderInfo.value.diners = data.diners;
  359. if (data.remark != null) orderInfo.value.remark = data.remark;
  360. const total = Number(data.totalAmount) || 0;
  361. orderInfo.value.totalAmount = total;
  362. if (data.dishTotal != null && data.dishTotal !== '') orderInfo.value.dishTotal = Number(data.dishTotal) || 0;
  363. const fee = data.utensilFee ?? data.tablewareFee;
  364. if (fee != null && fee !== '') orderInfo.value.utensilFee = Number(fee) || 0;
  365. if (data.discountAmount != null) orderInfo.value.discountAmount = data.discountAmount;
  366. if (data.couponId != null) selectedCouponId.value = data.couponId;
  367. updatePayAmount();
  368. } catch (e) {
  369. console.error('解析购物车数据失败:', e);
  370. }
  371. }
  372. if (orderInfo.value.tableId) uni.setStorageSync('currentTableId', String(orderInfo.value.tableId));
  373. fetchCouponsOnEnter();
  374. });
  375. // 每次进入页面(含从其他页返回)都调用锁定订单接口
  376. onShow(() => {
  377. const tableId = orderInfo.value?.tableId;
  378. if (tableId) {
  379. (diningApi.PostOrderLock || diningApi.postOrderLock)({ tableId }).catch((err) => {
  380. console.warn('锁定订单失败:', err);
  381. });
  382. }
  383. });
  384. // 离开页面时调用解锁订单接口
  385. onUnload(() => {
  386. const tableId = orderInfo.value?.tableId;
  387. if (tableId && typeof (diningApi.PostOrderUnlock || diningApi.postOrderUnlock) === 'function') {
  388. (diningApi.PostOrderUnlock || diningApi.postOrderUnlock)({ tableId }).catch((err) => {
  389. console.warn('解锁订单失败:', err);
  390. });
  391. }
  392. });
  393. </script>
  394. <style lang="scss" scoped>
  395. .content {
  396. padding: 0 30rpx 300rpx;
  397. }
  398. .card {
  399. background-color: #fff;
  400. border-radius: 24rpx;
  401. padding: 30rpx 0;
  402. margin-top: 20rpx;
  403. .card-header {
  404. display: flex;
  405. justify-content: space-between;
  406. align-items: center;
  407. padding: 0 30rpx;
  408. height: 40rpx;
  409. position: relative;
  410. font-size: 27rpx;
  411. color: #151515;
  412. font-weight: bold;
  413. }
  414. .tag {
  415. width: 10rpx;
  416. height: 42rpx;
  417. background: linear-gradient(35deg, #FCB73F 0%, #FC733D 100%);
  418. border-radius: 0rpx 0rpx 0rpx 0rpx;
  419. position: absolute;
  420. left: 0;
  421. top: 0;
  422. }
  423. .card-content {
  424. padding: 0 30rpx;
  425. }
  426. .info-item {
  427. display: flex;
  428. justify-content: space-between;
  429. align-items: center;
  430. margin-top: 20rpx;
  431. font-size: 27rpx;
  432. .info-item-label {
  433. color: #666666;
  434. }
  435. .info-item-value {
  436. color: #151515;
  437. }
  438. &--clickable {
  439. cursor: pointer;
  440. }
  441. &--coupon .coupon-value {
  442. display: flex;
  443. align-items: center;
  444. gap: 8rpx;
  445. }
  446. .coupon-amount {
  447. color: #E61F19;
  448. }
  449. .coupon-placeholder {
  450. color: #999999;
  451. }
  452. .coupon-arrow {
  453. color: #999999;
  454. font-size: 32rpx;
  455. }
  456. }
  457. .info-item-textarea {
  458. width: 100%;
  459. height: 115rpx;
  460. border-radius: 8rpx;
  461. border: 1rpx solid #F2F2F2;
  462. margin-top: 20rpx;
  463. font-size: 23rpx;
  464. color: #AAAAAA;
  465. box-sizing: border-box;
  466. padding: 20rpx;
  467. }
  468. .info-food {
  469. margin-top: 20rpx;
  470. }
  471. .food-item {
  472. display: flex;
  473. align-items: center;
  474. padding: 20rpx 0;
  475. &:last-child {
  476. border-bottom: none;
  477. }
  478. &__image {
  479. width: 118rpx;
  480. height: 118rpx;
  481. border-radius: 8rpx;
  482. flex-shrink: 0;
  483. background-color: #f5f5f5;
  484. }
  485. &__info {
  486. flex: 1;
  487. margin-left: 20rpx;
  488. display: flex;
  489. flex-direction: column;
  490. justify-content: center;
  491. }
  492. &__name {
  493. font-size: 28rpx;
  494. font-weight: bold;
  495. color: #151515;
  496. margin-bottom: 8rpx;
  497. }
  498. &__desc {
  499. font-size: 24rpx;
  500. color: #666666;
  501. line-height: 1.5;
  502. }
  503. &__tag {
  504. font-size: 24rpx;
  505. color: #666666;
  506. }
  507. &__right {
  508. display: flex;
  509. flex-direction: column;
  510. align-items: flex-end;
  511. justify-content: center;
  512. margin-left: 20rpx;
  513. }
  514. &__price {
  515. display: flex;
  516. align-items: baseline;
  517. color: #151515;
  518. font-weight: bold;
  519. margin-bottom: 8rpx;
  520. .price-symbol {
  521. font-size: 20rpx;
  522. margin-right: 2rpx;
  523. }
  524. .price-main {
  525. font-size: 28rpx;
  526. }
  527. .price-decimal {
  528. font-size: 24rpx;
  529. }
  530. }
  531. &__quantity {
  532. font-size: 24rpx;
  533. color: #797979;
  534. }
  535. }
  536. .price-line {
  537. display: flex;
  538. justify-content: space-between;
  539. align-items: center;
  540. margin-top: 20rpx;
  541. font-size: 27rpx;
  542. color: #151515;
  543. border-top: 1rpx solid rgba(170, 170, 170, 0.15);
  544. font-weight: bold;
  545. padding-top: 20rpx;
  546. }
  547. }
  548. .bottom-button {
  549. width: 100%;
  550. background-color: #fff;
  551. padding: 20rpx 30rpx;
  552. box-sizing: border-box;
  553. position: fixed;
  554. bottom: 0;
  555. left: 0;
  556. right: 0;
  557. z-index: 999;
  558. padding-bottom: env(safe-area-inset-bottom);
  559. box-shadow: 0rpx -11rpx 46rpx 0rpx rgba(0, 0, 0, 0.05);
  560. .bottom-button-text {
  561. font-size: 32rpx;
  562. font-weight: bold;
  563. color: #fff;
  564. width: 695rpx;
  565. height: 80rpx;
  566. background: linear-gradient(90deg, #FCB73F 0%, #FC743D 100%);
  567. border-radius: 23rpx 23rpx 23rpx 23rpx;
  568. display: flex;
  569. align-items: center;
  570. justify-content: center;
  571. }
  572. }
  573. </style>