Commit 66c86b14 by limin

TGT凭证获取逻辑修改

1 parent f0b278bf
......@@ -49,8 +49,6 @@
$('#logout').click(function () {
var sessionId = layui.store.get('token')
request({ sessionId: sessionId, method: 'org.ore.api.example.logout' }, function (result) {
layui.store.remove('external')
layui.store.remove('token')
goLogin()
})
})
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-07-15 15:46:53
* @LastEditors: limin
* @LastEditTime: 2021-08-09 11:40:44
* @LastEditTime: 2021-08-09 14:07:12
* @FilePath: \account\js\load.js
*/
;(function load() {
......@@ -20,9 +20,6 @@ function go(module, page, params) {
var href = '/html/' + module + '/' + page + '.html'
window.location.href = _p ? href + '?' + _p : href
}
function goLogin() {
window.location.href = '/login.html'
}
function loadLayConfig() {
layui.config({
......@@ -85,6 +82,14 @@ function loadConfig() {
})
})
}
function goLogin() {
layui.use(['store'], function () {
layui.store.remove('external')
layui.store.remove('token')
layui.store.remove('user')
window.location.href = '/login.html'
})
}
function genurl(param, key, encode) {
// if (!param || layui.$.isEmptyObject(param)) return ''
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-07-19 10:15:48
* @LastEditors: limin
* @LastEditTime: 2021-08-09 10:52:59
* @LastEditTime: 2021-08-09 14:09:12
* @FilePath: \account\js\request.js
*/
layui.define(['sha1', 'md5', 'helper'], function (exports) {
......@@ -76,6 +76,9 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) {
success && success(result)
} else {
msg(result.message)
if(result.errId=='21'){ //TGT失效
goLogin && goLogin()
}
}
}
if (config.async === false) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!