Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ccdefd46
authored
Jul 10, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
693d61dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
dist/js/global/global.min.js
dist/js/goodmanage/index.js
dist/js/global/global.min.js
View file @
ccdefd46
...
...
@@ -40,8 +40,22 @@
withCredentials
:
true
},
success
:
function
(
data
)
{
//处理token失效的情况
if
(
data
.
errcode
===
501
||
data
.
err_code
===
501
)
{
layer
.
msg
(
'登录已失效,请重新登录'
,
{
time
:
600
},
function
()
{
window
.
location
.
href
=
home_url
+
'/login'
;
});
}
else
{
typeof
callback
==
'function'
&&
callback
(
data
);
layer
.
close
(
index
);
}
return
false
;
},
error
:
function
()
{
...
...
@@ -91,7 +105,7 @@
//退出
$
(
".nav_end"
).
on
(
'click'
,
function
()
{
layer
.
confirm
(
'您确定退出系统嘛'
,
{
icon
:
3
,
title
:
'提示'
,
move
:
false
},
function
(
index
)
{
layer
.
confirm
(
'您确定退出系统嘛'
,
{
icon
:
3
,
title
:
'提示'
,
move
:
false
},
function
(
index
)
{
opt
.
getData
(
apis
.
authLogout
,
'POST'
,
null
,
function
(
res
)
{
...
...
@@ -99,7 +113,7 @@
Util
.
delCookie
(
'token'
,
cookieHostname
);
window
.
location
.
reload
()
;
window
.
location
.
href
=
home_url
;
}
else
{
...
...
dist/js/goodmanage/index.js
View file @
ccdefd46
...
...
@@ -2,7 +2,7 @@
window
.
GoodManageController
=
{
token
:
Util
.
getCookie
(
'token'
)
||
''
,
init
:
function
()
{
this
.
created
(
this
).
mounted
(
this
).
render
(
this
,
{
offset
:
2
,
p
:
1
,
token
:
this
.
token
},
1
).
handleBind
(
this
);
this
.
created
(
this
).
mounted
(
this
).
render
(
this
,
{
offset
:
10
,
p
:
1
,
token
:
this
.
token
},
1
).
handleBind
(
this
);
},
created
:
function
(
opt
)
{
...
...
@@ -58,7 +58,7 @@
elem
:
'pagination'
,
theme
:
'#1080d0'
,
count
:
res
.
total
,
limit
:
2
,
limit
:
10
,
curr
:
curr
,
jump
:
function
(
obj
,
first
)
{
...
...
@@ -77,14 +77,6 @@
}
});
});
}
else
if
(
res
.
errcode
===
501
)
{
layer
.
msg
(
res
.
errmsg
,
function
()
{
window
.
location
.
href
=
home_url
+
'/login'
;
});
}
else
if
(
res
.
errcode
==
110001
||
res
.
errcode
==
103001
)
{
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
...
...
@@ -107,13 +99,13 @@
var
param
=
{
token
:
opt
.
token
,
offset
:
2
,
offset
:
10
,
p
:
1
};
var
params
=
$
.
extend
({},
data
.
field
,
param
);
opt
.
render
(
this
,
params
,
1
)
opt
.
render
(
this
,
params
,
1
)
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment