소스 검색

发送通知调整

wangqiang 8 달 전
부모
커밋
9c408f59b2
1개의 변경된 파일21개의 추가작업 그리고 0개의 파일을 삭제
  1. 21 0
      App.vue

+ 21 - 0
App.vue

@@ -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']),