| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678 |
- <template>
- <!-- 确认支付页面:订单信息、菜品清单、价格明细、确认支付 -->
- <view class="content">
- <view class="card">
- <view class="card-header">
- <view class="tag"></view>
- <view class="card-header-title">订单信息</view>
- </view>
- <view class="card-content">
- <view class="info-item">
- <view class="info-item-label">就餐桌号</view>
- <view class="info-item-value">{{ orderInfo.tableNumber || orderInfo.tableId || '—' }}</view>
- </view>
- <view class="info-item">
- <view class="info-item-label">用餐人数</view>
- <view class="info-item-value">{{ orderInfo.diners || '—' }}人</view>
- </view>
- <view class="info-item">
- <view class="info-item-label">联系电话</view>
- <view class="info-item-value">{{ orderInfo.contactPhone || '—' }}</view>
- </view>
- <view class="info-item">
- <view class="info-item-label">备注信息</view>
- <view class="info-item-value remark-text">{{ orderInfo.remark || '—' }}</view>
- </view>
- </view>
- </view>
- <view class="card" v-if="displayFoodList.length > 0">
- <view class="card-header">
- <view class="tag"></view>
- <view class="card-header-title">菜品清单</view>
- </view>
- <view class="card-content">
- <view class="info-food">
- <view v-for="(item, index) in displayFoodList" :key="item.id || index" class="food-item">
- <image :src="getItemImage(item)" mode="aspectFill" class="food-item__image"></image>
- <view class="food-item__info">
- <view class="food-item__name">{{ item.name }}</view>
- <view class="food-item__desc" v-if="item.tags && item.tags.length > 0">
- <text v-for="(tag, tagIndex) in item.tags" :key="tagIndex" class="food-item__tag"
- :class="tag.type">{{ tag.text }}<text v-if="tagIndex < item.tags.length - 1">,</text>
- </text>
- </view>
- </view>
- <view class="food-item__right">
- <view class="food-item__price">
- <text class="price-main">¥{{ formatPrice(item.price) }}</text>
- </view>
- <view class="food-item__quantity">{{ item.quantity || 1 }}份</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="card">
- <view class="card-header">
- <view class="tag"></view>
- <view class="card-header-title">价格明细</view>
- </view>
- <view class="card-content">
- <view class="info-item">
- <view class="info-item-label">菜品总价</view>
- <view class="info-item-value">¥{{ formatPrice(dishTotal) }}</view>
- </view>
- <view class="info-item">
- <view class="info-item-label">餐具费</view>
- <view class="info-item-value">¥{{ formatPrice(orderInfo.utensilFee ?? 0) }}</view>
- </view>
- <view class="info-item info-item--coupon info-item--clickable" @click="onCouponRowClick">
- <view class="info-item-label">优惠券</view>
- <view class="info-item-value coupon-value">
- <text v-if="(orderInfo.discountAmount ?? 0) > 0" class="coupon-amount">{{ couponDisplayText }}</text>
- <text v-else class="coupon-placeholder">请选择</text>
- <text class="coupon-arrow">›</text>
- </view>
- </view>
- <view v-if="(orderInfo.discountAmount ?? 0) > 0" class="info-item info-item--coupon">
- <view class="info-item-label">优惠金额</view>
- <view class="info-item-value coupon-value">
- <text class="coupon-amount">-¥{{ formatPrice(orderInfo.discountAmount) }}</text>
- </view>
- </view>
- <view class="price-line">
- <view class="price-line-label">应付金额</view>
- <view class="price-line-value">¥{{ formatPrice(orderInfo.payAmount ?? 0) }}</view>
- </view>
- </view>
- </view>
- <view class="bottom-button">
- <view class="bottom-button-text" hover-class="hover-active" @click="handleConfirmPay">确认支付 ¥{{ formatPrice(orderInfo.payAmount ?? 0) }}</view>
- </view>
- <!-- 选择优惠券弹窗 -->
- <view class="coupon-modal-wrapper">
- <SelectCouponModal
- v-model:open="couponModalOpen"
- :coupon-list="couponList"
- :selected-coupon-id="selectedCouponId"
- :view-only="false"
- @select="handleCouponSelect"
- @close="couponModalOpen = false"
- />
- </view>
- </view>
- </template>
- <script setup>
- import { onLoad, onShow, onUnload } from '@dcloudio/uni-app';
- import { ref, computed } from 'vue';
- import { go } from '@/utils/utils.js';
- import { getFileUrl } from '@/utils/file.js';
- import { useUserStore } from '@/store/user.js';
- import * as diningApi from '@/api/dining.js';
- import SelectCouponModal from '@/pages/orderFood/components/SelectCouponModal.vue';
- const orderId = ref('');
- const orderInfo = ref({
- orderNo: '',
- storeId: '',
- tableId: '',
- tableNumber: '',
- diners: '',
- contactPhone: '',
- remark: '',
- totalAmount: 0,
- dishTotal: null,
- utensilFee: 0,
- couponId: null,
- couponName: '',
- couponType: null, // 1 满减 2 折扣
- discountRate: null, // 折扣券力度,如 5.5 表示 5.5折
- nominalValue: null, // 满减券面额
- discountAmount: 0,
- payAmount: 0
- });
- const foodList = ref([]);
- // 优惠券选择(结算页)
- const couponModalOpen = ref(false);
- const couponList = ref([]);
- const selectedCouponId = ref(null);
- // 菜品清单展示:包含所有项(含餐具 id/cuisineId === -1)
- const displayFoodList = computed(() => foodList.value ?? []);
- // 菜品总价:绑定 totalAmount
- const dishTotal = computed(() => {
- const total = Number(orderInfo.value.totalAmount) || 0;
- return Math.max(0, total);
- });
- // 优惠券展示:满减券显示 nominalValue+元,折扣券显示 discountRate+折,否则显示 couponName 或 已使用优惠券
- const couponDisplayText = computed(() => {
- const o = orderInfo.value;
- if ((o.discountAmount ?? 0) <= 0) return '';
- const type = Number(o.couponType);
- if (type === 1 && (o.nominalValue != null && o.nominalValue !== '')) {
- const val = Number(o.nominalValue);
- return Number.isNaN(val) ? (o.couponName || '已使用优惠券') : val + '元';
- }
- if (type === 2 && (o.discountRate != null && o.discountRate !== '')) {
- const rate = Number(o.discountRate);
- return Number.isNaN(rate) ? (o.couponName || '已使用优惠券') : rate + '折';
- }
- return o.couponName || '已使用优惠券';
- });
- // 规范化优惠券项(供 SelectCouponModal 使用)
- function normalizeCouponItem(item) {
- if (!item || typeof item !== 'object') return null;
- const raw = item;
- const couponType = Number(raw.couponType) || 0;
- const nominalValue = Number(raw.nominalValue ?? raw.amount ?? 0) || 0;
- const discountRate = ((Number(raw.discountRate) || 0) / 10) || 0;
- const minAmount = Number(raw.minimumSpendingAmount ?? raw.minAmount ?? 0) || 0;
- let amountDisplay = nominalValue + '元';
- if (couponType === 1) amountDisplay = nominalValue + '元';
- else if (couponType === 2 && discountRate > 0) amountDisplay = (discountRate % 1 === 0 ? discountRate : discountRate.toFixed(1)) + '折';
- return {
- id: raw.userCouponId ?? raw.id ?? raw.couponId ?? '',
- couponId: raw.couponId ?? raw.id ?? raw.userCouponId ?? '',
- amount: nominalValue,
- minAmount,
- name: raw.name ?? raw.title ?? raw.couponName ?? '',
- expireDate: raw.expirationTime ?? raw.endGetDate ?? raw.expireDate ?? '',
- couponType,
- discountRate,
- amountDisplay
- };
- }
- // 点击优惠券行:打开选择弹窗
- const onCouponRowClick = () => {
- openCouponModal();
- };
- // 打开优惠券弹窗并拉取用户可用券
- const openCouponModal = async () => {
- const storeId = orderInfo.value.storeId || uni.getStorageSync('currentStoreId') || '';
- couponModalOpen.value = false;
- if (!storeId) {
- uni.showToast({ title: '暂无门店信息', icon: 'none' });
- return;
- }
- try {
- const res = await diningApi.GetUserOwnedCouponList({ storeId });
- const list = Array.isArray(res) ? res : (res?.data ?? res?.records ?? res?.list ?? []);
- const normalized = (Array.isArray(list) ? list : []).map(normalizeCouponItem).filter(Boolean);
- couponList.value = normalized;
- couponModalOpen.value = true;
- } catch (err) {
- console.error('获取优惠券失败:', err);
- uni.showToast({ title: '获取优惠券失败', icon: 'none' });
- }
- };
- // 选择优惠券后更新订单优惠与应付金额
- const handleCouponSelect = ({ coupon, selectedId }) => {
- const hasSelected = selectedId != null && selectedId !== '';
- selectedCouponId.value = hasSelected ? String(selectedId) : null;
- orderInfo.value.couponId = hasSelected ? (coupon?.couponId ?? coupon?.id ?? selectedCouponId.value) : null;
- if (!hasSelected) {
- orderInfo.value.discountAmount = 0;
- orderInfo.value.couponName = '';
- orderInfo.value.couponType = null;
- orderInfo.value.discountRate = null;
- orderInfo.value.nominalValue = null;
- } else if (coupon) {
- orderInfo.value.couponName = coupon.name ?? '';
- orderInfo.value.couponType = Number(coupon.couponType) ?? null;
- orderInfo.value.discountRate = coupon.discountRate != null ? coupon.discountRate : null;
- orderInfo.value.nominalValue = coupon.amount != null ? coupon.amount : null;
- const total = Number(orderInfo.value.totalAmount) || 0;
- const couponType = Number(coupon.couponType) || 0;
- if (couponType === 2 && coupon.discountRate != null && total > 0) {
- const rate = Number(coupon.discountRate) || 0;
- orderInfo.value.discountAmount = Math.round(total * (1 - rate / 10) * 100) / 100;
- } else {
- orderInfo.value.discountAmount = Number(coupon.amount) || 0;
- }
- }
- updateCheckoutPayAmount();
- couponModalOpen.value = false;
- };
- // 根据菜品总价、餐具费、优惠额计算应付金额
- const updateCheckoutPayAmount = () => {
- const total = Number(orderInfo.value.totalAmount) || 0;
- const utensil = Number(orderInfo.value.utensilFee) || 0;
- const discount = Number(orderInfo.value.discountAmount) || 0;
- orderInfo.value.payAmount = Math.max(0, total + utensil - discount);
- };
- function formatPrice(price) {
- const num = Number(price);
- return Number.isNaN(num) ? '0.00' : num.toFixed(2);
- }
- // 取第一张图:逗号分隔取首段,数组取首项,对象取 url/path/src(与 orderDetail 一致)
- function firstImage(val) {
- if (val == null || val === '') return '';
- if (Array.isArray(val)) {
- const first = val[0];
- if (first != null && first !== '') {
- if (typeof first === 'object' && first !== null) return first.url ?? first.path ?? first.src ?? first.link ?? '';
- return String(first).split(/[,,]/)[0].trim();
- }
- return '';
- }
- if (typeof val === 'object') return val.url ?? val.path ?? val.src ?? val.link ?? '';
- const str = String(val).trim();
- return str ? str.split(/[,,]/)[0].trim() : '';
- }
- function getItemImage(item) {
- if (Number(item?.id ?? item?.cuisineId) === -1) return '/static/utensilFee.png';
- const raw = item?.image ?? item?.cuisineImage ?? item?.imageUrl ?? item?.images ?? item?.pic ?? item?.cover ?? '';
- const url = firstImage(raw) || (typeof raw === 'string' ? raw.split(/[,,]/)[0]?.trim() : '');
- if (url && typeof url === 'string' && (url.startsWith('http') || url.startsWith('//'))) return url;
- return getFileUrl(url || 'img/icon/shop.png');
- }
- // 将 tags 统一为 [{ text, type }] 格式
- function normalizeTags(raw) {
- if (raw == null) return [];
- let arr = [];
- if (Array.isArray(raw)) arr = raw;
- else if (typeof raw === 'string') {
- const t = raw.trim();
- if (t.startsWith('[')) { try { arr = JSON.parse(t); if (!Array.isArray(arr)) arr = []; } catch { arr = t ? [t] : []; } }
- else arr = t ? t.split(/[,,、\s]+/).map(s => s.trim()).filter(Boolean) : [];
- } else if (raw && typeof raw === 'object') arr = Array.isArray(raw.list) ? raw.list : Array.isArray(raw.items) ? raw.items : [];
- return arr.map((it) => {
- if (it == null) return { text: '', type: '' };
- if (typeof it === 'string') return { text: it, type: '' };
- if (typeof it === 'number') return { text: String(it), type: '' };
- return { text: it.text ?? it.tagName ?? it.name ?? it.label ?? it.title ?? '', type: it.type ?? it.tagType ?? '' };
- }).filter((t) => t.text !== '' && t.text != null);
- }
- // 接口订单项转列表项:图片取首张(逗号/数组/对象与 orderDetail 一致)
- function normalizeOrderItem(item) {
- const rawTags = item?.tags ?? item?.tagList ?? item?.tagNames ?? item?.labels ?? item?.tag;
- const rawImg = item?.images ?? item?.image ?? item?.cuisineImage ?? item?.imageUrl ?? item?.pic ?? item?.cover ?? '';
- const imageUrl = firstImage(rawImg) || (typeof rawImg === 'string' ? rawImg.split(/[,,]/)[0]?.trim() : '') || 'img/icon/shop.png';
- return {
- id: item?.id ?? item?.cuisineId,
- name: item?.cuisineName ?? item?.name ?? '',
- price: item?.totalPrice ?? item?.unitPrice ?? item?.price ?? 0,
- image: imageUrl,
- quantity: item?.quantity ?? 1,
- tags: normalizeTags(rawTags)
- };
- }
- const fetchOrderDetail = async () => {
- const id = orderId.value || '';
- if (!id) return;
- try {
- const res = await diningApi.GetOrderInfo(id);
- const raw = res?.data ?? res ?? {};
- orderInfo.value.orderNo = raw?.orderNo ?? raw?.orderId ?? '';
- orderInfo.value.storeId = raw?.storeId ?? raw?.store_id ?? '';
- orderInfo.value.tableId = raw?.tableId ?? raw?.tableNumber ?? '';
- orderInfo.value.tableNumber = raw?.tableNumber ?? raw?.tableNo ?? '';
- orderInfo.value.diners = raw?.dinerCount ?? '';
- orderInfo.value.contactPhone = raw?.contactPhone ?? raw?.phone ?? '';
- orderInfo.value.remark = raw?.remark ?? '';
- const total = Number(raw?.totalAmount ?? raw?.orderAmount ?? raw?.foodAmount ?? 0) || 0;
- orderInfo.value.totalAmount = total;
- orderInfo.value.dishTotal = raw?.dishTotal != null ? Number(raw.dishTotal) : null;
- orderInfo.value.utensilFee = Number(raw?.tablewareFee ?? raw?.tablewareAmount ?? 0) || 0;
- orderInfo.value.couponId = raw?.couponId ?? null;
- orderInfo.value.couponName = raw?.couponName ?? '';
- orderInfo.value.couponType = raw?.couponType ?? null;
- const rawRate = raw?.discountRate;
- orderInfo.value.discountRate = rawRate != null && rawRate !== '' ? (Number(rawRate) || 0) / 10 : null;
- orderInfo.value.nominalValue = raw?.nominalValue ?? null;
- orderInfo.value.discountAmount = Number(raw?.discountAmount ?? raw?.couponAmount ?? raw?.couponDiscount ?? 0) || 0;
- orderInfo.value.payAmount = Number(raw?.payAmount ?? raw?.totalAmount ?? raw?.totalPrice ?? 0) || 0;
- const list = raw?.orderItemList ?? raw?.orderItems ?? raw?.items ?? raw?.detailList ?? [];
- foodList.value = (Array.isArray(list) ? list : []).map(normalizeOrderItem);
- selectedCouponId.value = orderInfo.value.couponId != null && orderInfo.value.couponId !== '' ? String(orderInfo.value.couponId) : null;
- } catch (err) {
- console.error('获取订单详情失败:', err);
- uni.showToast({ title: '加载失败', icon: 'none' });
- }
- };
- const handleConfirmPay = async () => {
- const id = orderId.value || '';
- if (!id) {
- uni.showToast({ title: '缺少订单ID', icon: 'none' });
- return;
- }
- const userStore = useUserStore();
- const openid = userStore.getOpenId || '';
- if (!openid) {
- uni.showToast({ title: '请先登录', icon: 'none' });
- return;
- }
- const priceAmount = Number(orderInfo.value.payAmount ?? 0) || 0;
- if (priceAmount <= 0) {
- uni.showToast({ title: '订单金额异常', icon: 'none' });
- return;
- }
- const orderNo = orderInfo.value.orderNo || '';
- if (!orderNo) {
- uni.showToast({ title: '缺少订单号', icon: 'none' });
- return;
- }
- const price = Math.round(priceAmount * 100);
- uni.showLoading({ title: '拉起支付...' });
- try {
- const storeId = orderInfo.value.storeId || uni.getStorageSync('currentStoreId') || '';
- const u = userStore.getUserInfo || {};
- const payerId = u.id ?? u.userId ?? u.user_id ?? '';
- const couponIdVal =
- orderInfo.value.couponId != null && orderInfo.value.couponId !== ''
- ? String(orderInfo.value.couponId)
- : selectedCouponId.value != null && selectedCouponId.value !== ''
- ? String(selectedCouponId.value)
- : '';
- const res = await diningApi.PostOrderPay({
- orderNo,
- payer: openid,
- price,
- subject: '订单支付',
- storeId: storeId || undefined,
- couponId: couponIdVal || undefined,
- payerId: payerId ? String(payerId) : undefined
- });
- uni.hideLoading();
- uni.requestPayment({
- provider: 'wxpay',
- timeStamp: res.timestamp,
- nonceStr: res.nonce,
- package: res.prepayId,
- signType: res.signType,
- paySign: res.sign,
- success: () => {
- uni.showToast({ title: '支付成功', icon: 'success' });
- const oid = orderId.value || '';
- if (oid) {
- diningApi.PostOrderSettlementUnlock({ orderId: oid }).catch((e) => console.warn('解锁订单失败:', e));
- }
- const payType = 'wechatPayMininProgram';
- // 查询支付结果需用 prePay 返回的 transactionId,与订单号 orderNo 可能不同
- const prePayTid =
- res?.transactionId ??
- res?.transaction_id ??
- res?.outTradeNo ??
- orderNo;
- const sid = orderInfo.value.storeId || uni.getStorageSync('currentStoreId') || '';
- const q = [`id=${encodeURIComponent(oid)}`, `payType=${encodeURIComponent(payType)}`, `transactionId=${encodeURIComponent(String(prePayTid ?? ''))}`];
- if (sid) q.push(`storeId=${encodeURIComponent(sid)}`);
- setTimeout(() => go(`/pages/paymentSuccess/index?${q.join('&')}`), 1500);
- },
- fail: (err) => {
- const msg = err?.errMsg ?? err?.message ?? '支付失败';
- if (String(msg).includes('cancel')) {
- uni.showToast({ title: '已取消支付', icon: 'none' });
- } else {
- uni.showToast({ title: msg || '支付失败', icon: 'none' });
- }
- }
- });
- } catch (e) {
- uni.hideLoading();
- uni.showToast({ title: e?.message || '获取支付参数失败', icon: 'none' });
- }
- };
- onLoad(async (options) => {
- const id = options?.orderId ?? options?.id ?? '';
- orderId.value = id;
- if (options?.orderNo) orderInfo.value.orderNo = options.orderNo;
- if (options?.tableId) orderInfo.value.tableId = options.tableId;
- if (options?.tableNumber) orderInfo.value.tableNumber = options.tableNumber;
- if (options?.diners) orderInfo.value.diners = options.diners;
- if (options?.remark != null && options?.remark !== '') orderInfo.value.remark = decodeURIComponent(options.remark);
- if (options?.totalAmount != null && options?.totalAmount !== '') {
- orderInfo.value.payAmount = Number(options.totalAmount) || 0;
- }
- if (id) {
- await fetchOrderDetail();
- }
- });
- onShow(() => {
- const id = orderId.value || '';
- if (id) {
- diningApi.PostOrderSettlementLock({ orderId: id }).catch((e) => console.warn('锁定订单失败:', e));
- }
- });
- onUnload(() => {
- const id = orderId.value || '';
- if (id) {
- diningApi.PostOrderSettlementUnlock({ orderId: id }).catch((e) => console.warn('解锁订单失败:', e));
- }
- });
- </script>
- <style lang="scss" scoped>
- .content {
- padding: 0 30rpx 300rpx;
- }
- .card {
- background-color: #fff;
- border-radius: 24rpx;
- padding: 30rpx 0;
- margin-top: 20rpx;
- .card-header {
- display: flex;
- align-items: center;
- padding: 0 30rpx;
- height: 40rpx;
- position: relative;
- font-size: 27rpx;
- color: #151515;
- font-weight: bold;
- }
- .tag {
- width: 10rpx;
- height: 42rpx;
- background: linear-gradient(35deg, #FCB73F 0%, #FC733D 100%);
- border-radius: 0;
- position: absolute;
- left: 0;
- top: 0;
- }
- .card-content {
- padding: 0 30rpx;
- }
- .info-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 20rpx;
- font-size: 27rpx;
- .info-item-label {
- color: #666666;
- }
- .info-item-value {
- color: #151515;
- &.remark-text {
- flex: 1;
- text-align: right;
- word-break: break-all;
- }
- }
- &--coupon .coupon-value {
- display: flex;
- align-items: center;
- gap: 8rpx;
- }
- .coupon-amount {
- color: #E61F19;
- }
- .coupon-placeholder {
- color: #999999;
- }
- .coupon-arrow {
- color: #999;
- margin-left: 4rpx;
- }
- &--clickable {
- cursor: pointer;
- }
- }
- .price-line {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-top: 24rpx;
- padding-top: 24rpx;
- border-top: 1rpx solid #f0f0f0;
- font-size: 28rpx;
- font-weight: bold;
- .price-line-label {
- color: #151515;
- }
- .price-line-value {
- color: #E61F19;
- }
- }
- .info-food {
- .food-item {
- display: flex;
- align-items: center;
- padding: 20rpx 0;
- border-bottom: 1rpx solid #f5f5f5;
- &:last-child {
- border-bottom: none;
- }
- &__image {
- width: 120rpx;
- height: 120rpx;
- border-radius: 12rpx;
- flex-shrink: 0;
- background: #f5f5f5;
- }
- &__info {
- flex: 1;
- margin-left: 24rpx;
- min-width: 0;
- }
- &__name {
- font-size: 28rpx;
- color: #151515;
- font-weight: 500;
- }
- &__desc {
- font-size: 22rpx;
- color: #999;
- margin-top: 6rpx;
- }
- &__tag {
- margin-right: 4rpx;
- &.signature {
- color: #FC793D;
- }
- &.spicy {
- color: #2E2E2E;
- }
- }
- &__right {
- flex-shrink: 0;
- text-align: right;
- }
- &__price .price-main {
- font-size: 28rpx;
- color: #151515;
- font-weight: 600;
- }
- &__quantity {
- font-size: 24rpx;
- color: #999;
- margin-top: 6rpx;
- }
- }
- }
- }
- .bottom-button {
- position: fixed;
- left: 0;
- right: 0;
- bottom: 0;
- padding: 20rpx 30rpx;
- padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
- background: #fff;
- box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.06);
- .bottom-button-text {
- height: 88rpx;
- line-height: 88rpx;
- text-align: center;
- background: linear-gradient(90deg, #FCB73F 0%, #FC733D 100%);
- color: #fff;
- font-size: 32rpx;
- font-weight: bold;
- border-radius: 44rpx;
- }
- .hover-active {
- opacity: 0.9;
- }
- }
- .coupon-modal-wrapper {
- position: relative;
- z-index: 99999;
- :deep(.uni-popup) {
- z-index: 99999 !important;
- top: 0 !important;
- left: 0 !important;
- right: 0 !important;
- bottom: 0 !important;
- }
- :deep(.uni-popup__wrapper) {
- z-index: 99999 !important;
- }
- :deep(.select-coupon-modal__list) {
- padding-bottom: calc(60rpx + env(safe-area-inset-bottom));
- }
- :deep(.select-coupon-modal__empty) {
- margin-bottom: 60rpx;
- }
- }
- </style>
|