diff --git a/view/peko/activity/act-ocean/js/index.js b/view/peko/activity/act-ocean/js/index.js index dc2d5e8..7fb78a9 100644 --- a/view/peko/activity/act-ocean/js/index.js +++ b/view/peko/activity/act-ocean/js/index.js @@ -119,7 +119,8 @@ const getNewestAct = () => { networkRequest({ type: 'GET', url: urlPrefix + '/act/luckySea/getNewestAct', - success(res) { + timeout: 8000, + success (res) { if (res.code === 200) { if ($.isEmptyObject(res.data) || res.data.status === 4) { return showLoading('服務器正在維護中...') @@ -168,6 +169,13 @@ const getNewestAct = () => { }, error(err) { toastMsg('網絡錯誤,請退出重進') + }, + complete: function (XMLHttpRequest, status) { + if (status == 'timeout') { + xhr.abort()// 超时后中断请求 + hideLoading(layerIndex); + toastMsg('網絡開小差,請退出重進,開獎結果可通過【遊戲記錄】/【往輪結果】查看~') + } } }) }