diff --git a/utils/index.js b/utils/index.js index af91fb0f..db96283f 100644 --- a/utils/index.js +++ b/utils/index.js @@ -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) {