From 2426a62bd13fcffe76856e0b6bf30a45b3840461 Mon Sep 17 00:00:00 2001 From: Dragon <13925835632@139.com> Date: Wed, 14 Dec 2022 17:22:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BD=91=E7=BB=9C=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/peko/activity/act-ocean/js/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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('網絡開小差,請退出重進,開獎結果可通過【遊戲記錄】/【往輪結果】查看~') + } } }) }