From 7fdb5f0c910ad3baf25730278606ce8b37faec50 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 13 三月 2025 18:34:02 +0800
Subject: [PATCH] fix: 修改导航 在路由上强制增加channelId
---
apps/taro/src/stores/modules/user.ts | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/apps/taro/src/stores/modules/user.ts b/apps/taro/src/stores/modules/user.ts
index 8525d95..41ff362 100644
--- a/apps/taro/src/stores/modules/user.ts
+++ b/apps/taro/src/stores/modules/user.ts
@@ -36,13 +36,16 @@
virtualUserId?: string;
virtualPhoneNumber?: string;
+
+ wxCode?: string;
+ wxOpenId?: string;
}
const goAuthorization = debounce(
() => {
const route = Taro.getCurrentInstance().router;
if (route.path !== RouterPath.authorization) {
- Taro.navigateTo({
+ RouteHelper.navigateTo({
url: RouterPath.authorization,
});
}
@@ -73,6 +76,9 @@
virtualUserId: storageVirtualUser?.virtualUserId ?? '',
virtualPhoneNumber: storageVirtualUser?.virtualPhoneNumber ?? '',
+
+ wxCode: '',
+ wxOpenId: '',
};
},
getters: {
@@ -235,11 +241,22 @@
setUserDetail(detail);
},
+ setWxCode(code: string) {
+ this.wxCode = code;
+ },
+ setWxOpenId(openId: string) {
+ this.wxOpenId = openId;
+ },
+
resetState() {
this.userInfo = null;
this.token = '';
this.refreshToken = '';
this.userDetail = null;
+ this.virtualUserId = '';
+ this.virtualPhoneNumber = '';
+ this.wxCode = '';
+ this.wxOpenId = '';
removeUserInfo();
removeUserDetail();
removeStorageVirtualUserId();
--
Gitblit v1.9.1