Commit 66c86b14 by limin

TGT凭证获取逻辑修改

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