diff --git a/src/i18n/zh/order/message.ts b/src/i18n/zh/order/message.ts index d9f13aaa..f70a43f8 100644 --- a/src/i18n/zh/order/message.ts +++ b/src/i18n/zh/order/message.ts @@ -1,4 +1,5 @@ export default { paidSuccessfully: '支付成功', - createFailed: '创建失败' + createFailed: '创建失败', + wechatPayHelp: '请打开手机微信,扫一扫完成支付' }; diff --git a/src/i18n/zh/order/title.ts b/src/i18n/zh/order/title.ts index 873dd378..da1fb373 100644 --- a/src/i18n/zh/order/title.ts +++ b/src/i18n/zh/order/title.ts @@ -1,5 +1,4 @@ export default { info: '订单信息', - payWayWechat: '微信支付', - wechatPayHelp: '请打开手机微信,扫一扫完成支付' + payWayWechat: '微信支付' }; diff --git a/src/pages/auth/Callback.vue b/src/pages/auth/Callback.vue index 715d64d1..4ce4ba82 100644 --- a/src/pages/auth/Callback.vue +++ b/src/pages/auth/Callback.vue @@ -24,8 +24,14 @@ export default defineComponent({ if (this.accessToken && this.refreshToken) { await this.$store.dispatch('setAccessToken', this.accessToken); await this.$store.dispatch('setRefreshToken', this.refreshToken); - removeCookie('ACCESS_TOKEN'); - removeCookie('REFRESH_TOKEN'); + const host = window.location.host; + // process test env and prod env, for example: + // auth.zhishuyun.com -> .zhishuyun.com + // auth.test.zhishuyun.com -> .zhishuyun.com + const domain = host.replace(/^\S+?\.(test\.)?/, '.'); + const path = '/'; + removeCookie('ACCESS_TOKEN', { domain, path }); + removeCookie('REFRESH_TOKEN', { domain, path }); if (this.redirect) { this.$router.push(this.redirect); }