feat: 退出登录之后不展示注销按钮
This commit is contained in:
1 parent
8f8ca96a82
commit
e364a4b74f
1 file changed
+12
-9
@@ -92,15 +92,18 @@ const doLogout = async () => {
|
|||||||
uni.showToast({ title: "已退出登录", icon: "none" });
|
uni.showToast({ title: "已退出登录", icon: "none" });
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 主功能列表:6 项 */
|
/** 主功能列表:5 项固定,「账户注销」仅登录后出现 */
|
||||||
const cells = computed(() => [
|
const cells = computed(() => {
|
||||||
{ key: "benefit", icon: "ticket", label: "我的权益", badge: isLogin.value ? usableCount.value : 0, onTap: onMyBenefit },
|
const list = [
|
||||||
{ key: "privacy", icon: "shield", label: "隐私政策", onTap: () => goAgreement("privacy") },
|
{ key: "benefit", icon: "ticket", label: "我的权益", badge: isLogin.value ? usableCount.value : 0, onTap: onMyBenefit },
|
||||||
{ key: "terms", icon: "doc", label: "用户协议", onTap: () => goAgreement("terms") },
|
{ key: "privacy", icon: "shield", label: "隐私政策", onTap: () => goAgreement("privacy") },
|
||||||
{ key: "about", icon: "info", label: "关于我们", onTap: goAbout },
|
{ key: "terms", icon: "doc", label: "用户协议", onTap: () => goAgreement("terms") },
|
||||||
{ key: "service", icon: "headset", label: "联系客服", text: servicePhone.value, onTap: onContactService },
|
{ key: "about", icon: "info", label: "关于我们", onTap: goAbout },
|
||||||
{ key: "cancel", icon: "trash", label: "账户注销", onTap: goAccountCancel },
|
{ 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(() => {
|
const groups = computed(() => {
|
||||||
|
|||||||
Reference in new issue
Block a user