修改让用户登录的逻辑

This commit is contained in:
赵毅 2025-08-28 15:09:00 +08:00
parent 44d2447744
commit b239b83267

View File

@ -10,6 +10,11 @@ export const picUrl = 'https://test.hshuishang.com'; // 图片地址前缀
* @param {Boolean} options.isLogin - 是否需要校验登录态默认为 true
*/
export const NavgateTo = (path, options = {}) => {
// 首页不需要登录验证
if (path === '/pages/index/index') {
uni.navigateTo({ url: path });
return;
}
const { isLogin = true } = options;
const ctoken = uni.getStorageSync('ctoken');
if (isLogin) {