From e364a4b74fed6d0457404c4fc5cd7e1241847263 Mon Sep 17 00:00:00 2001 From: zoujing Date: Fri, 18 Sep 2026 10:52:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E4=B9=8B=E5=90=8E=E4=B8=8D=E5=B1=95=E7=A4=BA=E6=B3=A8=E9=94=80?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/mine/index.vue | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/pages/mine/index.vue b/src/pages/mine/index.vue index f9a5d32..47500f2 100644 --- a/src/pages/mine/index.vue +++ b/src/pages/mine/index.vue @@ -92,15 +92,18 @@ const doLogout = async () => { uni.showToast({ title: "已退出登录", icon: "none" }); }; -/** 主功能列表:6 项 */ -const cells = computed(() => [ - { key: "benefit", icon: "ticket", label: "我的权益", badge: isLogin.value ? usableCount.value : 0, onTap: onMyBenefit }, - { key: "privacy", icon: "shield", label: "隐私政策", onTap: () => goAgreement("privacy") }, - { key: "terms", icon: "doc", label: "用户协议", onTap: () => goAgreement("terms") }, - { key: "about", icon: "info", label: "关于我们", onTap: goAbout }, - { key: "service", icon: "headset", label: "联系客服", text: servicePhone.value, onTap: onContactService }, - { key: "cancel", icon: "trash", label: "账户注销", onTap: goAccountCancel }, -]); +/** 主功能列表:5 项固定,「账户注销」仅登录后出现 */ +const cells = computed(() => { + const list = [ + { key: "benefit", icon: "ticket", label: "我的权益", badge: isLogin.value ? usableCount.value : 0, onTap: onMyBenefit }, + { key: "privacy", icon: "shield", label: "隐私政策", onTap: () => goAgreement("privacy") }, + { key: "terms", icon: "doc", label: "用户协议", onTap: () => goAgreement("terms") }, + { key: "about", icon: "info", label: "关于我们", onTap: goAbout }, + { key: "service", icon: "headset", label: "联系客服", text: servicePhone.value, onTap: onContactService }, + ]; + if (isLogin.value) list.push({ key: "cancel", icon: "trash", label: "账户注销", onTap: goAccountCancel }); + return list; +}); /** 分组渲染:主列表一组,退出登录单独成组(仅登录后出现) */ const groups = computed(() => {