|
@@ -188,6 +188,27 @@
|
|
|
if (flag) {
|
|
|
console.log('进来了');
|
|
|
}
|
|
|
+
|
|
|
+ // 获取 URL 中的 'flow' 参数
|
|
|
+ const flowParam = this.$route.query.flow;
|
|
|
+ // 将 URL 编码的 'flow' 参数解析为 JSON 对象
|
|
|
+ const flowObject = JSON.parse(decodeURIComponent(flowParam));
|
|
|
+ console.log("flowObject.openId---> ", flowObject.openId)
|
|
|
+ if (flowObject.openId) {
|
|
|
+ const [err, res] = await uni.request({
|
|
|
+ url: BASE_URL + `/auth-server/user/sys/wxLogin`,
|
|
|
+ method: 'POST',
|
|
|
+ data: { openId: flowObject.openId },
|
|
|
+ header: {
|
|
|
+ 'domain': 'ydddl'
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (res && res.statusCode === 200) {
|
|
|
+ this.$store.commit('SET_TOKEN',res.data.token);
|
|
|
+ await this.refreshUserInfo();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['refreshUserInfo']),
|