Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 66c86b14
authored
Aug 09, 2021
by
limin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
TGT凭证获取逻辑修改
1 parent
f0b278bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
html/components/header.html
js/load.js
js/request.js
html/components/header.html
View file @
66c86b1
...
@@ -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
()
})
})
})
})
...
...
js/load.js
View file @
66c86b1
...
@@ -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 1
1:40:44
* @LastEditTime: 2021-08-09 1
4: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 ''
...
...
js/request.js
View file @
66c86b1
...
@@ -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 1
0:52:59
* @LastEditTime: 2021-08-09 1
4: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
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment