From b34e49753040016b4984f84df29c27e4ad325b6d Mon Sep 17 00:00:00 2001 From: "liujw155@outlook.com" Date: Fri, 8 Aug 2025 18:18:36 +0800 Subject: [PATCH] add logic & fix --- src/api/server.js | 10 ++++--- src/pages.json | 6 ++++ src/pages/index/index.vue | 8 ++---- src/static/images/index_banner.jpg | Bin 0 -> 110122 bytes src/subpackage/groupon/pages/exchange_fail.vue | 37 +++++++++++++++++++++++++ src/subpackage/groupon/pages/list.vue | 3 +- src/subpackage/groupon/pages/stadiums.vue | 4 +++ 7 files changed, 58 insertions(+), 10 deletions(-) create mode 100644 src/static/images/index_banner.jpg create mode 100644 src/subpackage/groupon/pages/exchange_fail.vue 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`); + }