diff --git a/client/src/pages/profile/profile.vue b/client/src/pages/profile/profile.vue index bf6715a..d6c07ec 100644 --- a/client/src/pages/profile/profile.vue +++ b/client/src/pages/profile/profile.vue @@ -55,8 +55,16 @@ - - + + + + ✨ @@ -69,16 +77,6 @@ 充值 - - - ✨ - - 充值星尘 - AI问答 · 会员订阅 - - → - - @@ -113,19 +111,7 @@ - - - - - - 登录 / 注册 - - - - 去登录,同步点亮进度 - - - + 退出登录 @@ -144,7 +130,7 @@ import { APP_VERSION } from '@/utils/version' const SUB_GUEST = '游客 · 点亮进度保存在本机,登录后同步' const SUB_USER = '已点亮 {n} 颗星球 · 连续 {d} 天' -const PLAN_FREE = '✦ 免费版' + const PLAN_DESC_FREE = '每日 5 次 AI 问答 · 答对检测题点亮星球' const userStore = useUserStore() @@ -165,9 +151,7 @@ const profileSubText = computed(() => { return `已点亮 ${stats.value.totalLit} 颗星球 · 连续 ${stats.value.streak} 天` }) -const planTitle = computed(() => - userStore.isSubscribed ? `✦ ${userStore.subscriptionLevel?.toUpperCase() || 'PRO'} 会员` : PLAN_FREE -) + const planDesc = computed(() => userStore.isSubscribed ? '全量知识解锁 · AI 问答无限次' : PLAN_DESC_FREE ) diff --git a/client/src/pages/vpay/recharge.vue b/client/src/pages/vpay/recharge.vue index e339a7a..8b98156 100644 --- a/client/src/pages/vpay/recharge.vue +++ b/client/src/pages/vpay/recharge.vue @@ -28,7 +28,7 @@ {{ info.coinName || '星尘' }}用途 问答AI 问答一次 10 {{ info.coinName || '星尘' }} - 会员Pro 月卡 3000 {{ info.coinName || '星尘' }} + 连续更多星尘用途陆续开放 @@ -60,15 +60,30 @@ function openAgreement() { onMounted(async () => { if (!userStore.isLoggedIn) { - uni.showToast({ title: '请先登录', icon: 'none' }) - setTimeout(() => uni.navigateBack(), 1500) + uni.showModal({ + title: '请先登录', + content: '登录后即可充值星尘,每天还有 5 次免费问答', + confirmText: '去登录', + showCancel: false, + success: () => uni.redirectTo({ url: '/pages/login/login' }), + }) return } try { info.value = await request('GET', '/api/vpay/info', null, userStore.token) if ((info.value.packages || []).length) picked.value = info.value.packages[0].id } catch (e) { - uni.showToast({ title: e.message || '获取充值信息失败', icon: 'none' }) + if (String(e.message || '').includes('登录')) { + uni.showModal({ + title: '登录已过期', + content: '请重新登录后再充值', + confirmText: '去登录', + showCancel: false, + success: () => uni.redirectTo({ url: '/pages/login/login' }), + }) + } else { + uni.showToast({ title: e.message || '获取充值信息失败', icon: 'none' }) + } } })