index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  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. // 菜品总价(不含餐具费):优先缓存中的 dishTotal,否则 totalAmount - utensilFee
  148. const dishTotal = computed(() => {
  149. const fromCache = orderInfo.value.dishTotal;
  150. if (fromCache != null && fromCache !== '' && !Number.isNaN(Number(fromCache))) {
  151. return Math.max(0, Number(fromCache));
  152. }
  153. const total = Number(orderInfo.value.totalAmount) || 0;
  154. const utensil = Number(orderInfo.value.utensilFee) || 0;
  155. return Math.max(0, total - utensil);
  156. });
  157. // 菜品图片:兼容 cuisineImage/image,逗号分隔取首图
  158. function getItemImage(item) {
  159. const raw = item?.cuisineImage ?? item?.image ?? item?.imageUrl ?? '';
  160. const url = typeof raw === 'string' ? raw.split(',')[0].trim() : raw;
  161. return url ? getFileUrl(url) : '';
  162. }
  163. // 单品单价:列表展示用 unitPrice/price
  164. function getItemPrice(item) {
  165. const p = item?.unitPrice ?? item?.price ?? item?.totalPrice ?? item?.salePrice ?? 0;
  166. return Number(p) || 0;
  167. }
  168. function formatPrice(price) {
  169. const num = Number(price);
  170. return Number.isNaN(num) ? '0.00' : num.toFixed(2);
  171. }
  172. // 规范化优惠券项(与 orderFood 的 normalizeCouponItem 一致,供 SelectCouponModal 使用)
  173. function normalizeCouponItem(item) {
  174. if (!item || typeof item !== 'object') return null;
  175. const raw = item;
  176. const couponType = Number(raw.couponType) || 0;
  177. const nominalValue = Number(raw.nominalValue ?? raw.amount ?? 0) || 0;
  178. // userOwnedByStore 接口返回的 discountRate 需除以 10(如 55 表示 5.5折)
  179. const discountRate = (Number(raw.discountRate) || 0) / 10;
  180. const minAmount = Number(raw.minimumSpendingAmount ?? raw.minAmount ?? 0) || 0;
  181. let amountDisplay = nominalValue + '元';
  182. if (couponType === 1) amountDisplay = nominalValue + '元';
  183. else if (couponType === 2 && discountRate > 0) amountDisplay = (discountRate % 1 === 0 ? discountRate : discountRate.toFixed(1)) + '折';
  184. return {
  185. id: raw.userCouponId ?? raw.id ?? raw.couponId ?? '',
  186. amount: nominalValue,
  187. minAmount,
  188. name: raw.name ?? raw.title ?? raw.couponName ?? '',
  189. expireDate: raw.expirationTime ?? raw.endGetDate ?? raw.expireDate ?? '',
  190. couponType,
  191. discountRate,
  192. amountDisplay
  193. };
  194. }
  195. // 点击优惠券行:打开选择弹窗
  196. const onCouponRowClick = () => {
  197. openCouponModal();
  198. };
  199. // 打开优惠券弹窗并拉取用户可用券
  200. const openCouponModal = async () => {
  201. const storeId = uni.getStorageSync('currentStoreId') || '';
  202. couponModalOpen.value = false;
  203. try {
  204. const res = await diningApi.GetUserOwnedCouponList({ storeId });
  205. const list = Array.isArray(res) ? res : (res?.data ?? res?.records ?? res?.list ?? []);
  206. const normalized = (Array.isArray(list) ? list : []).map(normalizeCouponItem).filter(Boolean);
  207. couponList.value = normalized;
  208. couponModalOpen.value = true;
  209. } catch (err) {
  210. console.error('获取优惠券失败:', err);
  211. uni.showToast({ title: '获取优惠券失败', icon: 'none' });
  212. }
  213. };
  214. // 选择优惠券后更新订单优惠与应付金额(折扣券按折扣率计算优惠金额)
  215. const handleCouponSelect = ({ coupon, selectedId }) => {
  216. selectedCouponId.value = selectedId != null && selectedId !== '' ? String(selectedId) : null;
  217. orderInfo.value.couponId = selectedCouponId.value;
  218. if (!coupon) {
  219. selectedCouponDisplay.value = '';
  220. orderInfo.value.discountAmount = 0;
  221. } else {
  222. selectedCouponDisplay.value = coupon.amountDisplay || (coupon.amount ? coupon.amount + '元' : '');
  223. const total = dishTotal.value;
  224. const couponType = Number(coupon.couponType) || 0;
  225. if (couponType === 2 && coupon.discountRate != null && total > 0) {
  226. // 折扣券:优惠金额 = 菜品总价 × (1 - 折数/10),如 5.5折 即 优惠 = 总价 × 0.45
  227. const rate = Number(coupon.discountRate) || 0;
  228. orderInfo.value.discountAmount = Math.round(total * (1 - rate / 10) * 100) / 100;
  229. } else {
  230. orderInfo.value.discountAmount = Number(coupon.amount) || 0;
  231. }
  232. }
  233. updatePayAmount();
  234. couponModalOpen.value = false;
  235. };
  236. // 根据菜品总价(不含餐具)、餐具费、优惠额计算应付金额
  237. const updatePayAmount = () => {
  238. const dish = dishTotal.value;
  239. const utensil = Number(orderInfo.value.utensilFee) || 0;
  240. const discount = Number(orderInfo.value.discountAmount) || 0;
  241. orderInfo.value.payAmount = Math.max(0, dish + utensil - discount);
  242. };
  243. // 进入页面时调一次优惠券接口:默认不选中,显示请选择
  244. const fetchCouponsOnEnter = async () => {
  245. const storeId = uni.getStorageSync('currentStoreId') || '';
  246. try {
  247. const res = await diningApi.GetUserOwnedCouponList({ storeId });
  248. const list = Array.isArray(res) ? res : (res?.data ?? res?.records ?? res?.list ?? []);
  249. const normalized = (Array.isArray(list) ? list : []).map(normalizeCouponItem).filter(Boolean);
  250. couponList.value = normalized;
  251. selectedCouponId.value = null;
  252. selectedCouponDisplay.value = '';
  253. orderInfo.value.couponId = null;
  254. orderInfo.value.discountAmount = 0;
  255. updatePayAmount();
  256. } catch (err) {
  257. console.error('获取优惠券失败:', err);
  258. selectedCouponDisplay.value = '';
  259. orderInfo.value.discountAmount = 0;
  260. orderInfo.value.couponId = null;
  261. selectedCouponId.value = null;
  262. updatePayAmount();
  263. }
  264. };
  265. // 将存储的购物车项转为确认页展示格式(兼容 cuisineName/cuisineImage/unitPrice 等)
  266. function normalizeCartItem(item) {
  267. const image = item?.cuisineImage ?? item?.image ?? item?.imageUrl ?? '';
  268. const url = typeof image === 'string' ? image.split(',')[0].trim() : image;
  269. return {
  270. id: item?.id ?? item?.cuisineId,
  271. name: item?.name ?? item?.cuisineName,
  272. cuisineName: item?.cuisineName,
  273. price: item?.unitPrice ?? item?.price,
  274. image: url,
  275. cuisineImage: item?.cuisineImage,
  276. quantity: Number(item?.quantity) || 0,
  277. tags: item?.tags ?? [],
  278. subtotalAmount: item?.subtotalAmount,
  279. remark: item?.remark
  280. };
  281. }
  282. const handleConfirmOrder = async () => {
  283. const tableId = orderInfo.value.tableId;
  284. const contactPhone = orderInfo.value.contactPhone ?? '';
  285. const dinerCount = Number(orderInfo.value.diners) || 0;
  286. if (!tableId) {
  287. uni.showToast({ title: '请先选择桌号', icon: 'none' });
  288. return;
  289. }
  290. if (!contactPhone) {
  291. uni.showToast({ title: '请先填写联系电话', icon: 'none' });
  292. return;
  293. }
  294. const remark = (orderInfo.value.remark ?? '').trim().slice(0, 30);
  295. uni.showLoading({ title: '提交中...' });
  296. try {
  297. const tablewareFee = Number(orderInfo.value.utensilFee) || 0;
  298. const payAmount = Number((Number(orderInfo.value.payAmount) ?? 0).toFixed(2));
  299. // couponId 传入接口返回的当前选择的优惠券 id(userOwnedByStore 返回的 userCouponId/id/couponId)
  300. const res = await diningApi.PostOrderCreate({
  301. tableId,
  302. contactPhone,
  303. couponId: (selectedCouponId.value ?? orderInfo.value.couponId) || null,
  304. discountAmount: orderInfo.value.discountAmount ?? 0,
  305. tablewareFee,
  306. payAmount,
  307. dinerCount: dinerCount || undefined,
  308. immediatePay: 0,
  309. remark: remark || undefined
  310. });
  311. uni.hideLoading();
  312. const orderId = res?.id ?? res?.orderId ?? res?.data?.id ?? res?.data?.orderId;
  313. const orderNo = res?.orderNo ?? res?.data?.orderNo ?? orderId ?? '';
  314. const total = orderInfo.value.payAmount ?? orderInfo.value.totalAmount ?? 0;
  315. // 结果页「去结算」需带 orderId/orderNo/金额/备注,用于确认支付
  316. uni.setStorageSync('lastPlaceOrderInfo', JSON.stringify({
  317. orderId: orderId ?? undefined,
  318. orderNo: orderNo ?? undefined,
  319. tableId: orderInfo.value.tableId,
  320. tableNumber: orderInfo.value.tableNumber,
  321. diners: orderInfo.value.diners,
  322. totalAmount: total,
  323. remark: (orderInfo.value.remark ?? '').trim().slice(0, 30)
  324. }));
  325. // 确认下单成功后即将跳转,此时页面不会触发 onUnload,需主动调用解锁
  326. const unlockFn = diningApi.PostOrderUnlock || diningApi.postOrderUnlock;
  327. if (typeof unlockFn === 'function' && tableId) {
  328. unlockFn({ tableId }).catch((err) => console.warn('解锁订单失败:', err));
  329. }
  330. if (orderId != null) {
  331. go(`/pages/result/index?id=${encodeURIComponent(orderId)}`);
  332. } else {
  333. go('/pages/result/index');
  334. }
  335. } catch (e) {
  336. uni.hideLoading();
  337. uni.showToast({ title: e?.message || '下单失败', icon: 'none' });
  338. }
  339. };
  340. onLoad((options) => {
  341. const userStore = useUserStore();
  342. const contactPhone = userStore.getUserInfo?.phone ?? userStore.getUserInfo?.contactPhone ?? userStore.getUserInfo?.mobile ?? '';
  343. orderInfo.value.contactPhone = contactPhone;
  344. const raw = uni.getStorageSync('placeOrderCart');
  345. if (raw) {
  346. try {
  347. const data = JSON.parse(raw);
  348. const list = Array.isArray(data.list) ? data.list : [];
  349. foodList.value = list.map(normalizeCartItem).filter((item) => (item.quantity || 0) > 0);
  350. if (data.tableId != null) orderInfo.value.tableId = data.tableId;
  351. if (data.tableNumber != null) orderInfo.value.tableNumber = data.tableNumber;
  352. if (data.diners != null) orderInfo.value.diners = data.diners;
  353. if (data.remark != null) orderInfo.value.remark = data.remark;
  354. const total = Number(data.totalAmount) || 0;
  355. orderInfo.value.totalAmount = total;
  356. if (data.dishTotal != null && data.dishTotal !== '') orderInfo.value.dishTotal = Number(data.dishTotal) || 0;
  357. const fee = data.utensilFee ?? data.tablewareFee;
  358. if (fee != null && fee !== '') orderInfo.value.utensilFee = Number(fee) || 0;
  359. if (data.discountAmount != null) orderInfo.value.discountAmount = data.discountAmount;
  360. if (data.couponId != null) selectedCouponId.value = data.couponId;
  361. updatePayAmount();
  362. } catch (e) {
  363. console.error('解析购物车数据失败:', e);
  364. }
  365. }
  366. if (orderInfo.value.tableId) uni.setStorageSync('currentTableId', String(orderInfo.value.tableId));
  367. fetchCouponsOnEnter();
  368. });
  369. // 每次进入页面(含从其他页返回)都调用锁定订单接口
  370. onShow(() => {
  371. const tableId = orderInfo.value?.tableId;
  372. if (tableId) {
  373. (diningApi.PostOrderLock || diningApi.postOrderLock)({ tableId }).catch((err) => {
  374. console.warn('锁定订单失败:', err);
  375. });
  376. }
  377. });
  378. // 离开页面时调用解锁订单接口
  379. onUnload(() => {
  380. const tableId = orderInfo.value?.tableId;
  381. if (tableId && typeof (diningApi.PostOrderUnlock || diningApi.postOrderUnlock) === 'function') {
  382. (diningApi.PostOrderUnlock || diningApi.postOrderUnlock)({ tableId }).catch((err) => {
  383. console.warn('解锁订单失败:', err);
  384. });
  385. }
  386. });
  387. </script>
  388. <style lang="scss" scoped>
  389. .content {
  390. padding: 0 30rpx 300rpx;
  391. }
  392. .card {
  393. background-color: #fff;
  394. border-radius: 24rpx;
  395. padding: 30rpx 0;
  396. margin-top: 20rpx;
  397. .card-header {
  398. display: flex;
  399. justify-content: space-between;
  400. align-items: center;
  401. padding: 0 30rpx;
  402. height: 40rpx;
  403. position: relative;
  404. font-size: 27rpx;
  405. color: #151515;
  406. font-weight: bold;
  407. }
  408. .tag {
  409. width: 10rpx;
  410. height: 42rpx;
  411. background: linear-gradient(35deg, #FCB73F 0%, #FC733D 100%);
  412. border-radius: 0rpx 0rpx 0rpx 0rpx;
  413. position: absolute;
  414. left: 0;
  415. top: 0;
  416. }
  417. .card-content {
  418. padding: 0 30rpx;
  419. }
  420. .info-item {
  421. display: flex;
  422. justify-content: space-between;
  423. align-items: center;
  424. margin-top: 20rpx;
  425. font-size: 27rpx;
  426. .info-item-label {
  427. color: #666666;
  428. }
  429. .info-item-value {
  430. color: #151515;
  431. }
  432. &--clickable {
  433. cursor: pointer;
  434. }
  435. &--coupon .coupon-value {
  436. display: flex;
  437. align-items: center;
  438. gap: 8rpx;
  439. }
  440. .coupon-amount {
  441. color: #E61F19;
  442. }
  443. .coupon-placeholder {
  444. color: #999999;
  445. }
  446. .coupon-arrow {
  447. color: #999999;
  448. font-size: 32rpx;
  449. }
  450. }
  451. .info-item-textarea {
  452. width: 100%;
  453. height: 115rpx;
  454. border-radius: 8rpx;
  455. border: 1rpx solid #F2F2F2;
  456. margin-top: 20rpx;
  457. font-size: 23rpx;
  458. color: #AAAAAA;
  459. box-sizing: border-box;
  460. padding: 20rpx;
  461. }
  462. .info-food {
  463. margin-top: 20rpx;
  464. }
  465. .food-item {
  466. display: flex;
  467. align-items: center;
  468. padding: 20rpx 0;
  469. &:last-child {
  470. border-bottom: none;
  471. }
  472. &__image {
  473. width: 118rpx;
  474. height: 118rpx;
  475. border-radius: 8rpx;
  476. flex-shrink: 0;
  477. background-color: #f5f5f5;
  478. }
  479. &__info {
  480. flex: 1;
  481. margin-left: 20rpx;
  482. display: flex;
  483. flex-direction: column;
  484. justify-content: center;
  485. }
  486. &__name {
  487. font-size: 28rpx;
  488. font-weight: bold;
  489. color: #151515;
  490. margin-bottom: 8rpx;
  491. }
  492. &__desc {
  493. font-size: 24rpx;
  494. color: #666666;
  495. line-height: 1.5;
  496. }
  497. &__tag {
  498. font-size: 24rpx;
  499. color: #666666;
  500. }
  501. &__right {
  502. display: flex;
  503. flex-direction: column;
  504. align-items: flex-end;
  505. justify-content: center;
  506. margin-left: 20rpx;
  507. }
  508. &__price {
  509. display: flex;
  510. align-items: baseline;
  511. color: #151515;
  512. font-weight: bold;
  513. margin-bottom: 8rpx;
  514. .price-symbol {
  515. font-size: 20rpx;
  516. margin-right: 2rpx;
  517. }
  518. .price-main {
  519. font-size: 28rpx;
  520. }
  521. .price-decimal {
  522. font-size: 24rpx;
  523. }
  524. }
  525. &__quantity {
  526. font-size: 24rpx;
  527. color: #797979;
  528. }
  529. }
  530. .price-line {
  531. display: flex;
  532. justify-content: space-between;
  533. align-items: center;
  534. margin-top: 20rpx;
  535. font-size: 27rpx;
  536. color: #151515;
  537. border-top: 1rpx solid rgba(170, 170, 170, 0.15);
  538. font-weight: bold;
  539. padding-top: 20rpx;
  540. }
  541. }
  542. .bottom-button {
  543. width: 100%;
  544. background-color: #fff;
  545. padding: 20rpx 30rpx;
  546. box-sizing: border-box;
  547. position: fixed;
  548. bottom: 0;
  549. left: 0;
  550. right: 0;
  551. z-index: 999;
  552. padding-bottom: env(safe-area-inset-bottom);
  553. box-shadow: 0rpx -11rpx 46rpx 0rpx rgba(0, 0, 0, 0.05);
  554. .bottom-button-text {
  555. font-size: 32rpx;
  556. font-weight: bold;
  557. color: #fff;
  558. width: 695rpx;
  559. height: 80rpx;
  560. background: linear-gradient(90deg, #FCB73F 0%, #FC743D 100%);
  561. border-radius: 23rpx 23rpx 23rpx 23rpx;
  562. display: flex;
  563. align-items: center;
  564. justify-content: center;
  565. }
  566. }
  567. </style>