Commit 694d1d2b by 李伟康

```

fix(app): 修复SSO登录回调地址错误和错误处理逻辑

- 在SSO登录流程中添加回调地址验证,如果未设置回调地址则抛出错误
- 修复错误处理逻辑,避免在error为null或undefined时执行通知显示
- 改进代码结构,使错误处理更加清晰
```
1 parent 5370e96e
...@@ -82,8 +82,10 @@ const actions = { ...@@ -82,8 +82,10 @@ const actions = {
URL = `${URL}?code=${wwcode}` URL = `${URL}?code=${wwcode}`
if (query) URL = `${URL}&${query}` if (query) URL = `${URL}&${query}`
window.location.href = URL window.location.href = URL
} else {
window.location.href = url
throw '请设置回调地址'
} }
else window.location.href = url
return return
} }
ssoApi.login({ ssoApi.login({
...@@ -155,7 +157,7 @@ const actions = { ...@@ -155,7 +157,7 @@ const actions = {
} }
} catch (error) { } catch (error) {
Notify(typeof error === 'string' ? error : error.toString()) if (error) Notify(typeof error === 'string' ? error : error.toString())
} }
}, },
navigation ({ dispatch }, to) { navigation ({ dispatch }, to) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!