mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
feat: 套餐购买支持易支付、支付宝支付
This commit is contained in:
@@ -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 "";
|
||||
|
||||
Reference in New Issue
Block a user