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 b682869b
authored
Aug 09, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of 192.168.3.233:h5/account
2 parents
766daee6
e459e440
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
8 deletions
css/main.css
js/load.js
js/request.js
css/main.css
View file @
b682869
...
...
@@ -89,7 +89,8 @@ header {
main
{
flex
:
1
;
min-height
:
calc
(
100%
-
60px
-
30px
);
/* min-height: calc(100% - 60px - 30px); */
min-height
:
calc
(
100%
-
60px
);
overflow
:
auto
;
background-color
:
#f8f8f8
;
}
...
...
js/load.js
View file @
b682869
...
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-07-15 15:46:53
* @LastEditors: limin
* @LastEditTime: 2021-0
7-23 15:23:54
* @LastEditTime: 2021-0
8-09 11:20:52
* @FilePath: \account\js\load.js
*/
;(
function
load
()
{
...
...
@@ -32,21 +32,41 @@ function loadLayConfig() {
})
}
function
loadHeaderFooter
()
{
isAppend
()
&&
append
()
layui
.
use
([
'store'
],
function
()
{
var
isExternal
=
isAppend
()
var
store
=
layui
.
store
if
(
isExternal
){
//运营平台外部系统
append
()
}
else
{
//嵌入运营平台
var
token
=
store
.
get
(
'token'
)
if
(
token
||
isLoginPage
()){
return
}
var
t
=
qs
(
't'
)
if
(
!
t
){
throw
new
Error
(
'未获取到TGT,请检测'
)
}
store
.
set
(
'token'
,
t
)
}
})
}
function
append
()
{
var
$
=
layui
.
$
var
header
=
document
.
createElement
(
'header'
)
var
footer
=
document
.
createElement
(
'footer'
)
$
(
header
).
load
(
'/html/components/header.html'
)
$
(
footer
).
load
(
'/html/components/footer.html'
)
//
$(footer).load('/html/components/footer.html')
$
(
'main'
).
before
(
header
).
after
(
footer
)
}
function
isAppend
()
{
return
!
isLoginPage
()
&&
self
==
top
}
function
isLoginPage
(){
var
_href
=
location
.
href
.
split
(
'/'
)
var
_path
=
_href
.
slice
(
_href
.
length
-
1
,
_href
.
length
).
toString
()
return
_path
.
split
(
'?'
)[
0
]
!==
'login.html'
&&
self
==
top
return
_path
.
split
(
'?'
)[
0
]
===
'login.html'
}
function
loadConfig
()
{
...
...
@@ -57,7 +77,7 @@ function loadConfig() {
}
var
ajax
=
layui
.
$
.
ajax
ajax
({
url
:
'http
://192.168.3.171:7300
/mock/5be17454f31545347559d499/config/glsx-oss-account-config'
,
url
:
'http
s://oss-config.test.glsx.com.cn
/mock/5be17454f31545347559d499/config/glsx-oss-account-config'
,
async
:
false
,
success
:
function
(
res
)
{
store
.
setEx
(
'external'
,
res
.
external
,
10
*
60
*
1000
)
...
...
js/request.js
View file @
b682869
...
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-07-19 10:15:48
* @LastEditors: limin
* @LastEditTime: 2021-0
7-22 17:45:23
* @LastEditTime: 2021-0
8-09 10:52:59
* @FilePath: \account\js\request.js
*/
layui
.
define
([
'sha1'
,
'md5'
,
'helper'
],
function
(
exports
)
{
...
...
@@ -34,7 +34,7 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) {
shade
:
false
})
//0代表加载的风格,支持0-2
var
token
=
store
.
get
(
'token'
)
request
.
setRequestHeader
(
'
sessionId
'
,
token
)
request
.
setRequestHeader
(
'
TGT
'
,
token
)
},
complete
:
function
()
{
layer
.
close
(
loading
)
...
...
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