Browse Source

加盟页重复跳转问题

pull/107/head
pengda 3 weeks ago
parent
commit
48679dc607
  1. 9
      src/utils/login.js

9
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')
if(aid){
window.location.href = "/franchise?aid="+aid
}else{
window.location.href = "/franchise"
}
return true
}

Loading…
Cancel
Save