Commit 215c0a0d by limin

修改获取TGT逻辑

1 parent b26940de
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-07-15 15:46:53 * @Date: 2021-07-15 15:46:53
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2021-08-09 19:15:04 * @LastEditTime: 2021-08-09 22:15:08
* @FilePath: \account\js\load.js * @FilePath: \account\js\load.js
*/ */
;(function load() { ;(function load() {
...@@ -34,16 +34,14 @@ function loadHeaderFooter() { ...@@ -34,16 +34,14 @@ function loadHeaderFooter() {
var store = layui.store var store = layui.store
if(isExternal){ //运营平台外部系统 if(isExternal){ //运营平台外部系统
append() append()
}else{//嵌入运营平台 }else{//嵌入运营平台 或者是登录页面
var token = store.get('token') if(isLoginPage()){ //如果是登陆页面 直接返回 登录成功会设置token
if(token || isLoginPage()){
return return
} }
var t = qs('t') var t = qs('t') //运营平台子系统从 父系统的iframe src获取 TGT.
if(!t){ if(t){
throw new Error('未获取到TGT,请检测') store.set('token', t)
} }
store.set('token', t)
} }
}) })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!