diff --git a/src/api/server.js b/src/api/server.js index d8867ea..a3d39b6 100644 --- a/src/api/server.js +++ b/src/api/server.js @@ -80,10 +80,12 @@ function formatResponse(response){ */ function errorHandle({ Catch = true, content = '', data = {}, success, errorModal = true }) { console.error(`get ${data?.config?.url} err -> `, data) - if(errorModal)showModal({ - content: content || '请求失败', - success: success - }) + if(errorModal)setTimeout(_=>{ + showModal({ + content: content || '请求失败', + success: success + }) + }, 300); return Catch ? Promise.reject(data) : pending; } diff --git a/src/pages.json b/src/pages.json index e9e2f8e..7510103 100644 --- a/src/pages.json +++ b/src/pages.json @@ -89,6 +89,12 @@ "style": { "navigationBarTitleText": "抖音团购券" } + }, + { + "path": "pages/exchange_fail", + "style": { + "navigationBarTitleText": "兑换失败" + } } ] } diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index f0defcf..a416902 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -4,7 +4,6 @@ import { deepClone } from "@/utils"; import { accAdd } from "@/utils/calculation"; import { routeTo } from "@/utils/polish"; import { stadiumFind } from "@/api"; - onLoad(() => { // stadiumFind({ data: { brand_id: 63 }, loading: '加载...' }) // .then(res=>{ @@ -12,18 +11,18 @@ onLoad(() => { // }) }); - function verifyBtn(){ routeTo(`/subpackage/groupon/pages/list`); + }