Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
李奇
7 years ago
Commit
083abaff80569d66654c32745a7c4d60d07f4e82
1 parent
7a777aaf
BLK老版本没有sessionKey导致的401提示升级
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
config/common.js
public/js/global.js
config/common.js
View file @
083abaf
...
...
@@ -11,7 +11,7 @@ const isTest = process.env.NODE_ENV === 'test';
module
.
exports
=
{
app
:
'h5'
,
appVersion
:
'
6.1
.0'
,
// 调用api的版本
appVersion
:
'
5.6
.0'
,
// 调用api的版本
port
:
6004
,
siteUrl
:
'//m.yohoblk.com'
,
signExtend
:
{
...
...
public/js/global.js
View file @
083abaf
...
...
@@ -6,12 +6,18 @@
import
$
from
'jquery'
;
import
cookie
from
'yoho-cookie'
;
import
yoho
from
'yoho'
;
// 初始化
import
tip
from
'common/tip'
;
// 注册ajaxError处理服务端401状态
$
(
document
).
ajaxError
((
event
,
xhr
)
=>
{
if
(
xhr
.
status
===
401
)
{
if
(
!
cookie
.
get
(
'app_version'
))
{
tip
({
txt
:
'请升级APP至最新版'
,
delay
:
60
*
1000
});
return
;
}
cookie
.
remove
(
'_UID'
);
cookie
.
remove
(
'_TOKEN'
);
...
...
Please
register
or
login
to post a comment