修改让用户登录的逻辑
This commit is contained in:
parent
44d2447744
commit
b239b83267
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user