Files
2026-05-09 16:40:29 +08:00

12 lines
291 B
JavaScript

export const checkLogin = () => {
const token = uni.getStorageSync("access_token");
if (!token) {
uni.showToast({ title: "请先登录", icon: "none" });
setTimeout(() => {
uni.navigateTo({ url: "/pages/login/index" });
}, 300);
return false;
}
return true;
};