From 51b2de11925a0bdd6e5e3bd6ad318b44cd077556 Mon Sep 17 00:00:00 2001 From: chenhao Date: Tue, 14 Jul 2026 13:15:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=B5=B7=E6=8A=A5=20Safari?= =?UTF-8?q?=20=E5=85=BC=E5=AE=B9=E3=80=81=E6=98=B5=E7=A7=B0=E8=B6=85?= =?UTF-8?q?=E9=95=BF=E7=9C=81=E7=95=A5=E3=80=81=E5=85=B6=E4=BB=96=E5=B0=8F?= =?UTF-8?q?=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GoodsDetail: 分享海报连调两次 toDataURL 绕过 Safari html-to-image 首帧空白 - GoodsDetail: 昵称超 10 字省略、"友情推荐"一行不换行 - GoodsDetail: 商品不存在时提示并跳回 Mall - App: 恢复微信分享 init,share 请求走 persist 避免被 abortAll 取消 - http: 403 不再触发登出,仅 401 --- src/App.vue | 5 +++-- src/api/http.js | 2 +- src/views/Goods/GoodsDetail.vue | 16 ++++++++++------ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/App.vue b/src/App.vue index 211ad15..9e1fb48 100644 --- a/src/App.vue +++ b/src/App.vue @@ -48,7 +48,7 @@ export default { } }, mounted() { - // this.init() + this.init() // this.$geo.getWebGeo().then(pos => { // this.geo = pos // }) @@ -69,7 +69,8 @@ export default { } }, init() { - this.$get('/v1/client/HWxinfoClient/share').then(res => { + // 持久请求,避免被路由切换时的 abortAll() 取消 + this.$get('/v1/client/HWxinfoClient/share', undefined, undefined, undefined, true).then(res => { this.wechatShareInfo = res.data || {} }) }, diff --git a/src/api/http.js b/src/api/http.js index de90c0f..a0134aa 100644 --- a/src/api/http.js +++ b/src/api/http.js @@ -124,7 +124,7 @@ function handleUnauthorized(requestToken) { */ function handleError(err, requestToken) { // token 失效 - if (err.status === ERR_CODE.UNAUTHORIZED || err.status === ERR_CODE.FORBIDDEN) { + if (err.status === ERR_CODE.UNAUTHORIZED) { handleUnauthorized(requestToken); } return Promise.reject(err); diff --git a/src/views/Goods/GoodsDetail.vue b/src/views/Goods/GoodsDetail.vue index 1666b0b..8ac557f 100644 --- a/src/views/Goods/GoodsDetail.vue +++ b/src/views/Goods/GoodsDetail.vue @@ -140,7 +140,7 @@