feat: 套餐购买支持易支付、支付宝支付

This commit is contained in:
xiaojunnuo
2024-12-23 00:24:31 +08:00
parent 9c8c7a7812
commit faa28f88f9
69 changed files with 1073 additions and 407 deletions
@@ -1,11 +1,13 @@
<template>
<span class="cd-expires-time-text">
<template v-if="label != null">
{{ label }}
</template>
<template v-else>
<FsTimeHumanize :model-value="value" :use-format-greater="1000000000000" :options="{ units: ['d'] }"></FsTimeHumanize>
</template>
<component :is="wrapperComp" :color="color">
<template v-if="label != null">
{{ label }}
</template>
<template v-else>
<FsTimeHumanize :model-value="value" :use-format-greater="1000000000000" :options="{ units: ['d'] }"></FsTimeHumanize>
</template>
</component>
</span>
</template>
@@ -19,8 +21,32 @@ defineOptions({
const props = defineProps<{
value?: number;
mode?: "tag" | "text";
}>();
const wrapperComp = computed(() => {
if (props.mode === "tag") {
return "a-tag";
}
return "span";
});
const color = computed(() => {
if (props.value == null) {
return "";
}
if (props.value === -1) {
return "green";
}
//小于3天 红色
if (dayjs().add(3, "day").valueOf() > props.value) {
return "red";
}
return "blue";
});
const label = computed(() => {
if (props.value == null) {
return "";