diff --git a/src/utils/request.ts b/src/utils/request.ts index f15a0c3..e0735cf 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -35,10 +35,11 @@ const errorHandler = (error: RequestError): Promise => { }) } // 401 未登录/未授权 - if (status === 401 && data.result && data.result.isLogin) { + if (status === 401) { showNotify({ type: 'danger', - message: 'Authorization verification failed', + message: (data && data.message) || '链接已失效,请联系平台客服', + duration: 0 }) // 如果你需要直接跳转登录页面 // location.replace(loginRoutePath) diff --git a/src/views/badge/index.vue b/src/views/badge/index.vue index 5a21a29..97c3b03 100644 --- a/src/views/badge/index.vue +++ b/src/views/badge/index.vue @@ -139,6 +139,11 @@ const getPid = async () => { } } catch (err) { isLoading.value = false + closeToast() + showToast({ + message: '链接已失效,请联系平台客服', + duration: 2000, + }) console.log(err) } finally { isLoading.value = false @@ -294,7 +299,7 @@ onMounted(() => { {{ item.size }}
- (剩余兑换:{{ item.count }}) + (剩余兑换:{{ item.remaining }})
+
@@ -162,7 +163,7 @@