This commit is contained in:
Ling53666
2025-05-15 21:01:14 +08:00
parent 9b8553930b
commit 7c371623eb
35 changed files with 620 additions and 401 deletions

25
utils/logcheck.js Normal file
View File

@ -0,0 +1,25 @@
function checkLogin() {
try {
const user = wx.getStorageSync('usermessage');
if (!user || (typeof user === 'object' && Object.keys(user).length === 0)) {
wx.showToast({
title: '您未登录请先登录',
icon:'error',
duration:2000
})
setTimeout(() => {
wx.navigateTo({
url: '/pages/logain/logain',
});
}, 2000);
}
} catch (e) {
wx.navigateTo({
url: '/pages/logain/logain',
});
}
}
module.exports = {
checkLogin
};