feat:登录的也是mock接口对接
This commit is contained in:
1 parent
d723eb1232
commit
d759d48e79
37 files changed
+1791
-7498
No files matched your search
@@ -15,7 +15,9 @@ const props = defineProps({
|
||||
const emit = defineEmits(["close", "confirm"]);
|
||||
|
||||
const b = computed(() => props.benefit || {});
|
||||
const typeLabel = computed(() => BENEFIT_TYPE_LABEL[b.value.type] || "权益");
|
||||
/** 类型键与权益卡同源:接口给 section_key,本地数据给 type */
|
||||
const typeKey = computed(() => b.value.section_key || b.value.type || "");
|
||||
const typeLabel = computed(() => BENEFIT_TYPE_LABEL[typeKey.value] || "权益");
|
||||
|
||||
const priceLine = computed(() => {
|
||||
const deal = priceText(b.value.price?.deal);
|
||||
@@ -25,14 +27,15 @@ const priceLine = computed(() => {
|
||||
});
|
||||
|
||||
const validLine = computed(() => {
|
||||
const { valid_from: from, valid_to: to, valid_days: days } = b.value;
|
||||
if (from && to) return dateRangeText(from, to);
|
||||
const { valid_from: from, valid_until: until, valid_days: days } = b.value;
|
||||
if (from && until) return dateRangeText(from, until);
|
||||
if (days) return `领取后 ${days} 天内有效`;
|
||||
return to ? dateRangeText("", to) : "";
|
||||
return until ? dateRangeText("", until) : "";
|
||||
});
|
||||
|
||||
const ruleText = computed(
|
||||
() =>
|
||||
b.value.description ||
|
||||
b.value.rule_text ||
|
||||
"该权益不绑定具体商品,可多次使用。本次操作仅记录一次使用,不会使权益失效。"
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user