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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 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 @@
...
@@ -40,8 +40,22 @@
withCredentials
:
true
withCredentials
:
true
},
},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
typeof
callback
==
'function'
&&
callback
(
data
);
layer
.
close
(
index
);
//处理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
;
return
false
;
},
},
error
:
function
()
{
error
:
function
()
{
...
@@ -91,7 +105,7 @@
...
@@ -91,7 +105,7 @@
//退出
//退出
$
(
".nav_end"
).
on
(
'click'
,
function
()
{
$
(
".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
)
{
opt
.
getData
(
apis
.
authLogout
,
'POST'
,
null
,
function
(
res
)
{
...
@@ -99,7 +113,7 @@
...
@@ -99,7 +113,7 @@
Util
.
delCookie
(
'token'
,
cookieHostname
);
Util
.
delCookie
(
'token'
,
cookieHostname
);
window
.
location
.
reload
()
;
window
.
location
.
href
=
home_url
;
}
else
{
}
else
{
...
...
dist/js/goodmanage/index.js
View file @
ccdefd46
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
window
.
GoodManageController
=
{
window
.
GoodManageController
=
{
token
:
Util
.
getCookie
(
'token'
)
||
''
,
token
:
Util
.
getCookie
(
'token'
)
||
''
,
init
:
function
()
{
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
)
{
created
:
function
(
opt
)
{
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
elem
:
'pagination'
,
elem
:
'pagination'
,
theme
:
'#1080d0'
,
theme
:
'#1080d0'
,
count
:
res
.
total
,
count
:
res
.
total
,
limit
:
2
,
limit
:
10
,
curr
:
curr
,
curr
:
curr
,
jump
:
function
(
obj
,
first
)
{
jump
:
function
(
obj
,
first
)
{
...
@@ -70,21 +70,13 @@
...
@@ -70,21 +70,13 @@
}
}
var
param
=
$
.
extend
({},
params
,
json
);
var
param
=
$
.
extend
({},
params
,
json
);
GoodManageController
.
render
(
opt
,
param
,
obj
.
curr
);
GoodManageController
.
render
(
opt
,
param
,
obj
.
curr
);
}
}
}
}
});
});
});
});
}
else
if
(
res
.
errcode
===
501
)
{
layer
.
msg
(
res
.
errmsg
,
function
()
{
window
.
location
.
href
=
home_url
+
'/login'
;
});
}
else
if
(
res
.
errcode
==
110001
||
res
.
errcode
==
103001
)
{
}
else
if
(
res
.
errcode
==
110001
||
res
.
errcode
==
103001
)
{
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
layui
.
laytpl
(
getTpl
).
render
([],
function
(
html
)
{
...
@@ -107,13 +99,13 @@
...
@@ -107,13 +99,13 @@
var
param
=
{
var
param
=
{
token
:
opt
.
token
,
token
:
opt
.
token
,
offset
:
2
,
offset
:
10
,
p
:
1
p
:
1
};
};
var
params
=
$
.
extend
({},
data
.
field
,
param
);
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