diff --git a/src/utils/login.js b/src/utils/login.js index 2c07763..7b92817 100644 --- a/src/utils/login.js +++ b/src/utils/login.js @@ -51,10 +51,15 @@ export async function autoLoginByToken(timeout = 10000) { const nick = localStorage.getItem('nick') - //非代理商 直接跳至加盟页 - if(nick === ''){ + //非代理商 直接跳至加盟页 访问加盟页的话 不再重复跳转 + const currentPath = window.location.pathname + if(!nick && currentPath !== '/franchise'){ const aid = urlParams.get('aid') - window.location.href = "/franchise?aid="+aid + if(aid){ + window.location.href = "/franchise?aid="+aid + }else{ + window.location.href = "/franchise" + } return true }