fix: 沉默期提醒每次登录都弹,有未支付延期订单时提示去支付或作废
Some checks failed
构建并部署前端到测试环境 / build-and-deploy (push) Has been cancelled

- 频率从每天一次改为每次登录一次:重新登录后会再次提醒,同一次登录内回首页不重复
- 已过期套餐有未支付延期订单时,弹窗提示继续支付或作废
This commit is contained in:
邹进
2026-11-07 21:04:12 +09:00
parent 06ca8af218
commit c11d1881ef
5 changed files with 67 additions and 20 deletions

View File

@@ -2,10 +2,13 @@
<view class="silence-overlay" @tap.stop>
<view class="silence-dialog" :class="`silence-${reminder.kind}`" role="dialog" aria-modal="true" aria-label="套餐沉默期提醒">
<button class="silence-close" aria-label="关闭沉默期提醒" @tap="$emit('close')">×</button>
<view class="silence-title">{{ reminder.kind === 'expired' ? '套餐沉默期已过期' : '请尽快完成实名' }}</view>
<view class="silence-title">{{ title }}</view>
<view v-if="reminder.packageName" class="silence-package">{{ reminder.packageName }}</view>
<view class="silence-body">
<template v-if="reminder.kind === 'expired'">
<template v-if="reminder.pendingOrderNo">
套餐沉默期已于 <text class="silence-strong">{{ deadline }}</text> 过期,您有一笔未支付的延期订单({{ reminder.pendingOrderNo }}),请继续支付;不需要了可以作废后重新办理。
</template>
<template v-else-if="reminder.kind === 'expired'">
套餐需在 <text class="silence-strong">{{ deadline }}</text> 前完成实名,现已过期。办理延期后可继续实名激活使用。
</template>
<template v-else>
@@ -13,7 +16,7 @@
<text class="silence-strong">{{ reminder.remainingDays }}</text> 天,过期后需办理延期。
</template>
</view>
<button class="silence-confirm" @tap="$emit('action')">{{ reminder.kind === 'expired' ? '去延期' : '查看套餐' }}</button>
<button class="silence-confirm" @tap="$emit('action')">{{ actionText }}</button>
<button class="silence-later" @tap="$emit('close')">我知道了</button>
</view>
</view>
@@ -26,6 +29,14 @@
const props = defineProps({ reminder: { type: Object, required: true } });
defineEmits(['close', 'action']);
const deadline = computed(() => formatSilenceDate(props.reminder.silence?.silence_deadline_at));
const title = computed(() => {
if (props.reminder.pendingOrderNo) return '延期订单未支付';
return props.reminder.kind === 'expired' ? '套餐沉默期已过期' : '请尽快完成实名';
});
const actionText = computed(() => {
if (props.reminder.pendingOrderNo) return '去支付或作废';
return props.reminder.kind === 'expired' ? '去延期' : '查看套餐';
});
</script>
<style scoped lang="scss">