xiuli.gao %!s(int64=2) %!d(string=hace) años
padre
commit
ac17e94dc7

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
qwh5/dist/index.html


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
qwh5/dist/js/app.9e5f1c22.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
qwh5/dist/js/extend.9be47dd1.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 1
qwh5/dist/js/extend.debe7487.js


+ 15 - 4
qwh5/src/views/extend.vue

3
 <script lang="ts" setup>
3
 <script lang="ts" setup>
4
 import { getQueryString } from '@/utils/common'
4
 import { getQueryString } from '@/utils/common'
5
 import { ref, onBeforeMount, getCurrentInstance } from "vue";
5
 import { ref, onBeforeMount, getCurrentInstance } from "vue";
6
+import { Toast } from 'vant';
6
 const { proxy } = getCurrentInstance();
7
 const { proxy } = getCurrentInstance();
7
 onBeforeMount(() => {//组件挂载之前
8
 onBeforeMount(() => {//组件挂载之前
8
   if (getQueryString('againJump')) {
9
   if (getQueryString('againJump')) {
10
   } else {//获取用户信息
11
   } else {//获取用户信息
11
     let redirect_uri = encodeURIComponent(window.location.href + '&againJump=true')
12
     let redirect_uri = encodeURIComponent(window.location.href + '&againJump=true')
12
     let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${getQueryString('corpid')}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=1&agentid=1000012#wechat_redirect`;
13
     let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${getQueryString('corpid')}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=1&agentid=1000012#wechat_redirect`;
14
+    goUrl(url)
13
   }
15
   }
14
 });
16
 });
15
 const getUserInfo = () => {
17
 const getUserInfo = () => {
19
     state: getQueryString('state')
21
     state: getQueryString('state')
20
   }, true).then((res) => {
22
   }, true).then((res) => {
21
     if (res.rst) {
23
     if (res.rst) {
22
-      // now_res.external_userid = res.rst.external_userid
23
-      // now_res.openid = res.rst.openid
24
-      // now_res.device_id = res.rst.device_id
25
-      // behaviorReport(1, UUID.value)
24
+      if (getQueryString('jumpLink')) {
25
+        let url = decodeURIComponent(getQueryString('jumpLink')) + '&external_userid=' + res.rst.external_userid;
26
+        goUrl(url)
27
+      } else {
28
+        Toast('无回跳链接!')
29
+      }
26
     }
30
     }
27
   }).catch((err) => {
31
   }).catch((err) => {
28
   })
32
   })
29
 }
33
 }
34
+function goUrl(url) {
35
+  let link = document.createElement("a");
36
+  link.href = url;
37
+  document.body.appendChild(link);
38
+  link.click();
39
+  document.body.removeChild(link);
40
+}
30
 </script>
41
 </script>