This commit is contained in:
2025-09-24 20:35:15 +08:00
parent 39679f7330
commit 8a458ff0a4
12033 changed files with 1537546 additions and 13292 deletions

View File

@@ -13,10 +13,32 @@ const _sfc_main = {
};
},
onLoad() {
const hasToken = (() => {
try {
return !!common_vendor.index.getStorageSync("TOKEN");
} catch (e) {
return false;
}
})();
if (!hasToken) {
this.items = [];
this.categories = [];
common_vendor.index.showToast({ title: "请登录使用该功能", icon: "none" });
return;
}
this.fetchCategories();
this.reload();
},
onShow() {
const hasToken = (() => {
try {
return !!common_vendor.index.getStorageSync("TOKEN");
} catch (e) {
return false;
}
})();
if (!hasToken)
return;
this.reload();
},
computed: {