Commit 0d718fa7 by 李伟康

```

feat(app): 优化手机号登录逻辑并修复跳转问题

- 注释掉原有的SSO登录API调用,避免重复登录
- 修改路由跳转逻辑,使用userInfo替代res返回的数据
- 调整跳转URL构建方式,移除多余的#号路径格式
- 修复当lastPath为'pc'或'mobile'时的路由处理逻辑
- 移除session相关设置,简化登录流程
```
1 parent cd893faa
......@@ -47,18 +47,20 @@ const actions = {
let [userInfo] = item.loginList,
{ phone } = userInfo
if (paramsPhone == phone) {
const res = await ssoApi.loginByPhone({
phone,
})
if (res) {
let route = state.lastPath == 'index' ? '' : state.lastPath || ''
// const res = await ssoApi.loginByPhone({
// phone,
// })
// if (res) {
let route = ['pc', 'mobile'].includes(state.lastPath) ? '' : state.lastPath || '',
jumpUrl = redirectUrl
route = route.replace('.', '/')
util.setLocalStorage('ww_userInfo', res)
util.setSessionId(res.sessionId)
dispatch('registerHttp', res.sessionId)
util.setLocalStorage('ww_userInfo', userInfo)
// util.setSessionId(res.sessionId)
// dispatch('registerHttp', res.sessionId)
state.showWindow = true
window.location.replace(`${redirectUrl}#/${route}`)
} else throw ''
if (route) window.location.replace(`${jumpUrl}${route}`)
else window.location.replace(jumpUrl)
// } else throw ''
} else throw '手机号不一致'
} else throw ''
} else throw ''
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!