Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
7 years ago
Commit
18ccc16f2eaa8ea34991943d1f904a885570cd13
1 parent
a7b1a2d8
fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
doraemon/views/error/510.hbs
public/js/global.js
doraemon/views/error/510.hbs
View file @
18ccc16
...
...
@@ -2,10 +2,10 @@
<div
class=
"clear wrapper-404"
>
<div
class=
"left"
><img
src=
"http://static.yohobuy.com/images/v3/index/404.png"
></div>
<div
class=
"right right-tips"
>
<p
class=
"text1"
>
服务器繁忙请重试!
</p>
<p
class=
"text1"
>
{{#if
err
.
message
}}{{
err
.
message
}}{{^}}
服务器繁忙请重试!
{{/if}}
</p>
<p
class=
"text2"
>
</p>
<p
class=
"text3"
><a
href=
"http://www.yohobuy.com/product/new"
class=
"button"
>
浏览新品
</a>
<a
href=
"http://www.yohobuy.com/"
class=
"button"
>
返回首页
</a></p>
</div>
</div>
</div>
\ No newline at end of file
</div>
...
...
public/js/global.js
View file @
18ccc16
const
$
=
require
(
'yoho-jquery'
);
const
Alert
=
require
(
'./common/dialog'
).
Alert
;
// 注册ajaxError处理服务端异常
$
(
document
).
ajaxError
((
event
,
xhr
)
=>
{
if
(
xhr
.
responseJSON
)
{
if
(
xhr
.
status
===
510
&&
xhr
.
responseJSON
.
data
&&
xhr
.
responseJSON
.
data
.
refer
)
{
window
.
location
.
href
=
xhr
.
responseJSON
.
data
.
refer
;
if
(
xhr
.
status
===
510
)
{
if
(
xhr
.
responseJSON
.
data
&&
xhr
.
responseJSON
.
data
.
refer
)
{
window
.
location
.
href
=
xhr
.
responseJSON
.
data
.
refer
;
}
else
if
(
xhr
.
responseJSON
.
message
)
{
new
Alert
(
xhr
.
responseJSON
.
message
).
show
();
}
}
}
});
...
...
Please
register
or
login
to post a comment