Authored by yyq

fix

... ... @@ -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>&nbsp;&nbsp;<a href="http://www.yohobuy.com/" class="button">返回首页</a></p>
</div>
</div>
</div>
\ No newline at end of file
</div>
... ...
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();
}
}
}
});
... ...