Browse Source

extend_page

xiuli.gao 2 years ago
parent
commit
0f870f08f8

File diff suppressed because it is too large
+ 1 - 1
qwh5/dist/css/app.abe62ca6.css


File diff suppressed because it is too large
+ 1 - 1
qwh5/dist/index.html


File diff suppressed because it is too large
+ 1 - 1
qwh5/dist/js/app.9eae8756.js


File diff suppressed because it is too large
+ 2 - 2
qwh5/dist/js/chunk-vendors.bf0633c3.js


File diff suppressed because it is too large
+ 1 - 0
qwh5/dist/js/extend.debe7487.js


qwh5/dist/js/userPortrait.8927e58c.js → qwh5/dist/js/userPortrait.e1369ada.js


+ 5 - 1
qwh5/src/router/index.ts

@@ -41,7 +41,11 @@ const routes: Array<RouteRecordRaw> = [
41 41
     path: '/userPortrait',
42 42
     name: 'userPortrait',
43 43
     component: () => import(/*webpackChunkName:"userPortrait" */ '@/views/userPortrait.vue')
44
-
44
+  },
45
+  {
46
+    path: '/extend',
47
+    name: 'extend',
48
+    component: () => import(/*webpackChunkName:"extend" */ '@/views/extend.vue')
45 49
   }
46 50
 
47 51
 ]

+ 30 - 0
qwh5/src/views/extend.vue

@@ -0,0 +1,30 @@
1
+<template>
2
+</template>
3
+<script lang="ts" setup>
4
+import { getQueryString } from '@/utils/common'
5
+import { ref, onBeforeMount, getCurrentInstance } from "vue";
6
+const { proxy } = getCurrentInstance();
7
+onBeforeMount(() => {//组件挂载之前
8
+  if (getQueryString('againJump')) {
9
+    getUserInfo()
10
+  } else {//获取用户信息
11
+    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
+  }
14
+});
15
+const getUserInfo = () => {
16
+  (proxy as any).$axios.get('/api/oauth2/userInfo', {
17
+    corpid: getQueryString('corpid'),
18
+    code: getQueryString('code'),
19
+    state: getQueryString('state')
20
+  }, true).then((res) => {
21
+    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)
26
+    }
27
+  }).catch((err) => {
28
+  })
29
+}
30
+</script>