2026-07-03 11:41:17 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="content">
|
2026-08-20 17:31:00 +08:00
|
|
|
|
<up-popup
|
|
|
|
|
|
:show="show"
|
|
|
|
|
|
mode="bottom"
|
|
|
|
|
|
:round="20"
|
|
|
|
|
|
:closeOnClickOverlay="true"
|
|
|
|
|
|
:closeable="true"
|
|
|
|
|
|
:safeAreaInsetBottom="true"
|
2026-07-03 11:41:17 +08:00
|
|
|
|
@close="handleClose"
|
|
|
|
|
|
>
|
|
|
|
|
|
<view class="coupon-popup">
|
|
|
|
|
|
<!-- 固定的标题头部 -->
|
|
|
|
|
|
<view class="popup-header">
|
|
|
|
|
|
<text class="title">选择优惠券</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
<!-- 固定的切换标签 (全部/可使用/不可用) -->
|
2026-07-03 11:41:17 +08:00
|
|
|
|
<view class="tab-container">
|
2026-08-20 17:31:00 +08:00
|
|
|
|
<view
|
|
|
|
|
|
v-for="(tab, index) in tabs"
|
|
|
|
|
|
:key="index"
|
2026-07-03 11:41:17 +08:00
|
|
|
|
:class="['tab-item', { active: activeTab === index }]"
|
2026-08-20 17:31:00 +08:00
|
|
|
|
@click="switchTab(index)"
|
2026-07-03 11:41:17 +08:00
|
|
|
|
>
|
|
|
|
|
|
<text class="tab-text">{{ tab.name }}</text>
|
|
|
|
|
|
<view class="active-line" v-if="activeTab === index"></view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 可上下滚动的优惠券列表区域 -->
|
2026-08-20 17:31:00 +08:00
|
|
|
|
<scroll-view class="coupon-scroll" scroll-y :enhanced="true" :show-scrollbar="false">
|
|
|
|
|
|
<view class="coupon-list" v-if="displayCoupons.length > 0">
|
|
|
|
|
|
<view
|
|
|
|
|
|
v-for="(coupon, index) in displayCoupons"
|
|
|
|
|
|
:key="coupon.couponUserId || coupon.id || coupon.templateId || index"
|
2026-07-03 11:41:17 +08:00
|
|
|
|
class="coupon-card"
|
2026-08-20 17:31:00 +08:00
|
|
|
|
:class="{ 'card-disabled': !isAvailable(coupon), 'card-selected': isSelected(coupon) }"
|
|
|
|
|
|
@click="isAvailable(coupon) && toggleSelect(coupon)"
|
2026-07-03 11:41:17 +08:00
|
|
|
|
>
|
|
|
|
|
|
<!-- 左侧:金额与门槛 -->
|
|
|
|
|
|
<view class="card-left">
|
|
|
|
|
|
<view class="price-box">
|
|
|
|
|
|
<text class="currency">¥</text>
|
2026-08-20 17:31:00 +08:00
|
|
|
|
<text class="amount">{{ getDiscountAmount(coupon) }}</text>
|
2026-07-03 11:41:17 +08:00
|
|
|
|
</view>
|
2026-08-20 17:31:00 +08:00
|
|
|
|
<text class="condition">{{ getThresholdText(coupon) }}</text>
|
2026-07-03 11:41:17 +08:00
|
|
|
|
</view>
|
2026-08-20 17:31:00 +08:00
|
|
|
|
|
2026-07-03 11:41:17 +08:00
|
|
|
|
<!-- 带有上下半圆凹槽的虚线分割线 -->
|
|
|
|
|
|
<view class="divider-wrapper">
|
|
|
|
|
|
<view class="notch top-notch"></view>
|
|
|
|
|
|
<view class="divider-line"></view>
|
|
|
|
|
|
<view class="notch bottom-notch"></view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
<!-- 右侧:详细内容与单选框 -->
|
2026-07-03 11:41:17 +08:00
|
|
|
|
<view class="card-right">
|
|
|
|
|
|
<view class="info-content">
|
2026-08-20 17:31:00 +08:00
|
|
|
|
<view class="coupon-title">{{ coupon.title || '优惠券' }}</view>
|
|
|
|
|
|
<view class="tag-row">
|
|
|
|
|
|
<text class="coupon-tag" :class="{ 'tag-disabled': !isAvailable(coupon) }">
|
|
|
|
|
|
{{ getTagText(coupon) }}
|
|
|
|
|
|
</text>
|
|
|
|
|
|
<text class="coupon-scope">{{ getScopeText(coupon) }}</text>
|
2026-07-03 11:41:17 +08:00
|
|
|
|
</view>
|
2026-08-20 17:31:00 +08:00
|
|
|
|
<view class="coupon-validity">{{ getValidityText(coupon) }}</view>
|
|
|
|
|
|
<view class="unavailable-reason" v-if="!isAvailable(coupon)">
|
|
|
|
|
|
{{ getUnavailableReason(coupon) }}
|
2026-07-03 11:41:17 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-08-20 17:31:00 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 右侧操作区:可使用状态下展示单选框 (Radio Button) -->
|
|
|
|
|
|
<view class="action-box">
|
|
|
|
|
|
<view v-if="isAvailable(coupon)" class="radio-wrap" @click.stop="toggleSelect(coupon)">
|
|
|
|
|
|
<view class="radio-circle" :class="{ 'checked': isSelected(coupon) }">
|
|
|
|
|
|
<text class="check-icon" v-if="isSelected(coupon)">✓</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view v-else class="disabled-tag-text">
|
|
|
|
|
|
不可用
|
|
|
|
|
|
</view>
|
2026-07-03 11:41:17 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-08-20 17:31:00 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 列表为空的缺省视图 -->
|
|
|
|
|
|
<view class="empty-wrap" v-else-if="!isLoading">
|
|
|
|
|
|
<text class="empty-text">暂无相关优惠券</text>
|
|
|
|
|
|
</view>
|
2026-07-03 11:41:17 +08:00
|
|
|
|
</scroll-view>
|
2026-08-20 17:31:00 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 底部不使用优惠券按钮 (方便取消选择) -->
|
|
|
|
|
|
<view class="popup-footer" v-if="coupons && coupons.length > 0">
|
|
|
|
|
|
<view class="no-use-btn" @click="noUseCoupon">
|
|
|
|
|
|
不使用优惠券
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-07-03 11:41:17 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</up-popup>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: "CouponDialog",
|
|
|
|
|
|
props: {
|
|
|
|
|
|
show: {
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
default: false,
|
|
|
|
|
|
},
|
2026-08-20 17:31:00 +08:00
|
|
|
|
goodsId: {
|
|
|
|
|
|
type: [Number, String],
|
|
|
|
|
|
default: 0,
|
|
|
|
|
|
},
|
|
|
|
|
|
coupons: {
|
|
|
|
|
|
type: Array,
|
|
|
|
|
|
default: () => [],
|
|
|
|
|
|
},
|
|
|
|
|
|
orderAmount: {
|
|
|
|
|
|
type: [Number, String],
|
|
|
|
|
|
default: 0,
|
|
|
|
|
|
},
|
|
|
|
|
|
selectedCoupon: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
default: () => null,
|
|
|
|
|
|
},
|
2026-07-03 11:41:17 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
activeTab: 0,
|
|
|
|
|
|
tabs: [
|
2026-08-20 17:31:00 +08:00
|
|
|
|
{ name: "全部", value: "" },
|
|
|
|
|
|
{ name: "可使用", value: 1 },
|
|
|
|
|
|
{ name: "不可用", value: 2 },
|
2026-07-03 11:41:17 +08:00
|
|
|
|
],
|
2026-08-20 17:31:00 +08:00
|
|
|
|
isLoading: false,
|
2026-07-03 11:41:17 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {
|
2026-08-20 17:31:00 +08:00
|
|
|
|
displayCoupons() {
|
|
|
|
|
|
if (this.activeTab === 1) {
|
|
|
|
|
|
return this.coupons.filter((coupon) => this.isAvailable(coupon));
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
2026-08-20 17:31:00 +08:00
|
|
|
|
if (this.activeTab === 2) {
|
|
|
|
|
|
return this.coupons.filter((coupon) => !this.isAvailable(coupon));
|
|
|
|
|
|
}
|
|
|
|
|
|
return this.coupons;
|
|
|
|
|
|
},
|
2026-07-03 11:41:17 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2026-08-20 17:31:00 +08:00
|
|
|
|
switchTab(index) {
|
|
|
|
|
|
this.activeTab = index;
|
|
|
|
|
|
},
|
|
|
|
|
|
isAvailable(coupon) {
|
|
|
|
|
|
if (coupon.canUse === false) return false;
|
|
|
|
|
|
if (coupon.available === false) return false;
|
|
|
|
|
|
if (coupon.receiveStatus === 2) return false;
|
|
|
|
|
|
if (coupon.status === 2 || coupon.status === 3 || coupon.status === 4) return false;
|
|
|
|
|
|
return Number(this.orderAmount || 0) >= Number(coupon.thresholdAmount || 0);
|
|
|
|
|
|
},
|
|
|
|
|
|
isSelected(coupon) {
|
|
|
|
|
|
if (!this.selectedCoupon) return false;
|
|
|
|
|
|
const curId = coupon.couponUserId || coupon.id || coupon.templateId;
|
|
|
|
|
|
const selId = this.selectedCoupon.couponUserId || this.selectedCoupon.id || this.selectedCoupon.templateId;
|
|
|
|
|
|
return curId && selId && String(curId) === String(selId);
|
|
|
|
|
|
},
|
|
|
|
|
|
toggleSelect(coupon) {
|
|
|
|
|
|
if (this.isSelected(coupon)) {
|
|
|
|
|
|
this.$emit("select", null);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$emit("select", coupon);
|
|
|
|
|
|
}
|
|
|
|
|
|
this.handleClose();
|
|
|
|
|
|
},
|
|
|
|
|
|
noUseCoupon() {
|
|
|
|
|
|
this.$emit("select", null);
|
|
|
|
|
|
this.handleClose();
|
|
|
|
|
|
},
|
2026-07-03 11:41:17 +08:00
|
|
|
|
handleClose() {
|
|
|
|
|
|
this.$emit("close");
|
|
|
|
|
|
},
|
2026-08-20 17:31:00 +08:00
|
|
|
|
// 格式化辅助函数
|
|
|
|
|
|
getDiscountAmount(coupon) {
|
|
|
|
|
|
return coupon.discountAmount !== undefined ? coupon.discountAmount : (coupon.amount || 0);
|
|
|
|
|
|
},
|
|
|
|
|
|
getThresholdText(coupon) {
|
|
|
|
|
|
const threshold = coupon.thresholdAmount !== undefined ? Number(coupon.thresholdAmount) : 0;
|
|
|
|
|
|
if (threshold === 0) {
|
|
|
|
|
|
return "无门槛";
|
|
|
|
|
|
}
|
|
|
|
|
|
return `满${threshold}元可用`;
|
|
|
|
|
|
},
|
|
|
|
|
|
getTagText(coupon) {
|
|
|
|
|
|
if (coupon.scopeType === 1) return "通用券";
|
|
|
|
|
|
if (coupon.scopeType === 2) return "商品券";
|
|
|
|
|
|
if (coupon.scopeType === 3 || coupon.scopeType === 4) return "品类券";
|
|
|
|
|
|
if (coupon.scopeText && coupon.scopeText.includes("通用")) return "通用券";
|
|
|
|
|
|
return "通用券";
|
|
|
|
|
|
},
|
|
|
|
|
|
getScopeText(coupon) {
|
|
|
|
|
|
if (coupon.scopeText) return coupon.scopeText;
|
|
|
|
|
|
if (coupon.scopeType === 1) return "所有商品可用";
|
|
|
|
|
|
if (coupon.scopeType === 2) return "指定商品可用";
|
|
|
|
|
|
if (coupon.scopeType === 3) return "指定类目可用";
|
|
|
|
|
|
if (coupon.scopeType === 4) return "指定专区商品可用";
|
|
|
|
|
|
return "所有商品可用";
|
|
|
|
|
|
},
|
|
|
|
|
|
getValidityText(coupon) {
|
|
|
|
|
|
if (coupon.useEndTime) {
|
|
|
|
|
|
return `有效期至 ${this.formatTime(coupon.useEndTime)}`;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (coupon.endTime) {
|
|
|
|
|
|
return `有效期至 ${this.formatTime(coupon.endTime)}`;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (coupon.validDays && coupon.validDays > 0) {
|
|
|
|
|
|
return `领取之日起${coupon.validDays}天内有效`;
|
|
|
|
|
|
}
|
|
|
|
|
|
return "长期有效";
|
|
|
|
|
|
},
|
|
|
|
|
|
getUnavailableReason(coupon) {
|
|
|
|
|
|
const threshold = Number(coupon.thresholdAmount || 0);
|
|
|
|
|
|
if (Number(this.orderAmount || 0) < threshold) {
|
|
|
|
|
|
return `订单金额未满${threshold}元`;
|
|
|
|
|
|
}
|
|
|
|
|
|
return coupon.unavailableReason || "该优惠券不适用于当前订单";
|
|
|
|
|
|
},
|
|
|
|
|
|
formatTime(time) {
|
|
|
|
|
|
if (!time) return "";
|
|
|
|
|
|
if (typeof time === "string" && time.includes("-")) return time;
|
|
|
|
|
|
const date = new Date(Number(time));
|
|
|
|
|
|
if (isNaN(date.getTime())) return String(time);
|
|
|
|
|
|
const y = date.getFullYear();
|
|
|
|
|
|
const m = String(date.getMonth() + 1).padStart(2, "0");
|
|
|
|
|
|
const d = String(date.getDate()).padStart(2, "0");
|
|
|
|
|
|
return `${y}-${m}-${d}`;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.coupon-popup {
|
2026-08-20 17:31:00 +08:00
|
|
|
|
height: 75vh;
|
|
|
|
|
|
background-color: #f7f8fa;
|
|
|
|
|
|
border-radius: 24rpx 24rpx 0 0;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
overflow: hidden;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.popup-header {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
color: #333333;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
padding: 30rpx 0 20rpx 0;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tab-container {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
height: 88rpx;
|
|
|
|
|
|
align-items: center;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
padding-left: 32rpx;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
box-sizing: border-box;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
border-top: 1rpx solid #f6f6f6;
|
|
|
|
|
|
border-bottom: 1rpx solid #f0f0f0;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
|
|
|
|
|
|
.tab-item {
|
|
|
|
|
|
margin-right: 48rpx;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
|
|
.tab-text {
|
|
|
|
|
|
font-size: 28rpx;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
color: #666666;
|
|
|
|
|
|
transition: color 0.2s ease;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
|
|
.tab-text {
|
2026-08-20 17:31:00 +08:00
|
|
|
|
color: #7a35f6;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.active-line {
|
|
|
|
|
|
position: absolute;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
bottom: 6rpx;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
width: 44rpx;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
height: 6rpx;
|
|
|
|
|
|
background-color: #7a35f6;
|
|
|
|
|
|
border-radius: 3rpx;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.coupon-scroll {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
height: 0;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
padding: 24rpx 24rpx 0 24rpx;
|
|
|
|
|
|
box-sizing: border-box;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.coupon-list {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
padding-bottom: 30rpx;
|
|
|
|
|
|
}
|
2026-07-03 11:41:17 +08:00
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
/* 高保真优惠券卡片样式 */
|
|
|
|
|
|
.coupon-card {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
background: rgba(253, 28, 36, 0.06);
|
|
|
|
|
|
border-radius: 16rpx;
|
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
transition: border-color 0.2s ease;
|
|
|
|
|
|
|
|
|
|
|
|
&.card-selected {
|
|
|
|
|
|
/* 不加外边框 */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.card-disabled {
|
|
|
|
|
|
background: #f5f5f5 !important;
|
|
|
|
|
|
border-color: transparent !important;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
|
|
|
|
|
|
.card-left {
|
|
|
|
|
|
.price-box {
|
2026-08-20 17:31:00 +08:00
|
|
|
|
color: #a0a0a0 !important;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
.condition {
|
2026-08-20 17:31:00 +08:00
|
|
|
|
color: #999999 !important;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
.coupon-title {
|
|
|
|
|
|
color: #333333 !important;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
2026-08-20 17:31:00 +08:00
|
|
|
|
}
|
2026-07-03 11:41:17 +08:00
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
.card-left {
|
|
|
|
|
|
width: 170rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
padding: 24rpx 0;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
|
|
|
|
|
|
.price-box {
|
2026-07-03 11:41:17 +08:00
|
|
|
|
display: flex;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
align-items: baseline;
|
|
|
|
|
|
color: #ff2442;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
.currency {
|
2026-07-03 11:41:17 +08:00
|
|
|
|
font-size: 28rpx;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
margin-right: 2rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.amount {
|
|
|
|
|
|
font-size: 60rpx;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.condition {
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
color: #ff2442;
|
|
|
|
|
|
margin-top: 10rpx;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.divider-wrapper {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
width: 2rpx;
|
|
|
|
|
|
align-self: stretch;
|
|
|
|
|
|
|
|
|
|
|
|
.divider-line {
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
border-left: 2rpx dashed #fca5a5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.notch {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
width: 24rpx;
|
|
|
|
|
|
height: 24rpx;
|
|
|
|
|
|
background-color: #f7f8fa;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
z-index: 10;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.top-notch {
|
|
|
|
|
|
top: -12rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bottom-notch {
|
|
|
|
|
|
bottom: -12rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.card-disabled .divider-line {
|
|
|
|
|
|
border-left: 2rpx dashed #dddddd !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.card-right {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
padding: 20rpx 20rpx 20rpx 24rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.info-content {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
margin-right: 16rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.coupon-title {
|
|
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
color: #1a1a1a;
|
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tag-row {
|
2026-07-03 11:41:17 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-08-20 17:31:00 +08:00
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
|
white-space: nowrap;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
.coupon-tag {
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
color: #ff2442;
|
|
|
|
|
|
background: #ffe4e6;
|
|
|
|
|
|
border: 1px solid #ff99a4;
|
|
|
|
|
|
border-radius: 6rpx;
|
|
|
|
|
|
padding: 2rpx 10rpx;
|
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
|
|
|
|
&.tag-disabled {
|
|
|
|
|
|
color: #888888 !important;
|
|
|
|
|
|
background: #eeeeee !important;
|
|
|
|
|
|
border: 1px solid #cccccc !important;
|
|
|
|
|
|
}
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
2026-08-20 17:31:00 +08:00
|
|
|
|
|
|
|
|
|
|
.coupon-scope {
|
|
|
|
|
|
font-size: 22rpx;
|
|
|
|
|
|
color: #666666;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.coupon-validity {
|
|
|
|
|
|
font-size: 22rpx;
|
|
|
|
|
|
color: #999999;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.unavailable-reason {
|
|
|
|
|
|
font-size: 20rpx;
|
|
|
|
|
|
color: #ff4d4f;
|
|
|
|
|
|
margin-top: 6rpx;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
.action-box {
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
padding-right: 8rpx;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
/* 单选框 (Radio Button) 高保真样式 */
|
|
|
|
|
|
.radio-wrap {
|
|
|
|
|
|
padding: 10rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.radio-circle {
|
|
|
|
|
|
width: 40rpx;
|
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
border: 2rpx solid #cccccc;
|
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
transition: all 0.2s ease;
|
|
|
|
|
|
|
|
|
|
|
|
&.checked {
|
|
|
|
|
|
background-color: #7a35f6;
|
|
|
|
|
|
border-color: #7a35f6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.check-icon {
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-20 17:31:00 +08:00
|
|
|
|
.disabled-tag-text {
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
color: #aaaaaa;
|
2026-07-03 11:41:17 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-08-20 17:31:00 +08:00
|
|
|
|
|
|
|
|
|
|
.empty-wrap {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
padding: 120rpx 0;
|
|
|
|
|
|
|
|
|
|
|
|
.empty-text {
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
color: #999999;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.popup-footer {
|
|
|
|
|
|
padding: 20rpx 32rpx 30rpx 32rpx;
|
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
|
|
|
|
|
|
.no-use-btn {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
|
line-height: 80rpx;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
|
color: #666666;
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
|
background-color: #eeeeee;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|