[baozhangchao] пре 3 година
родитељ
комит
b81cf1f9ed
3 измењених фајлова са 8 додато и 46 уклоњено
  1. 1
    1
      src/main.js
  2. 7
    1
      src/router/index.js
  3. 0
    44
      src/util/initial.js

+ 1
- 1
src/main.js Прегледај датотеку

@@ -13,7 +13,7 @@ import {
13 13
   Toast,
14 14
   Card,
15 15
   NavBar,
16
-  Image, SwipeItem, Tag, Swipe, Divider, Picker, Popup, Dialog, List,ImagePreview 
16
+  Image, SwipeItem, Tag, Swipe, Divider, Picker, Popup, Dialog, List, ImagePreview
17 17
 } from 'vant';
18 18
 import App from './App.vue'
19 19
 import { Login, redirect } from './util/initial'

+ 7
- 1
src/router/index.js Прегледај датотеку

@@ -11,10 +11,16 @@ import StrongPhoto from '@/views/StrongPhoto.vue'//精彩集锦
11 11
 import UserCenter from '@/views/UserCenter.vue'//我的页面
12 12
 import Questionnaire from '@/views/Questionnaire.vue'
13 13
 import SetUser from '@/views/userPages/SetUser.vue'//修改个人信息
14
-// // import Login from '../Login.vue'
14
+import { share } from '../util/initial'
15 15
 
16 16
 
17 17
 Vue.use(Router)
18
+router.afterEach((to, from) => {
19
+  share({
20
+    title: '施培基地培训系统',
21
+    desc: '施培基地培训系统'
22
+  })
23
+})
18 24
 
19 25
 const router = new Router({
20 26
   routes: [

+ 0
- 44
src/util/initial.js Прегледај датотеку

@@ -102,50 +102,6 @@ export function hideLoading () {
102 102
   document.getElementsByClassName('page-loading-wrapper')[0].style = "display: none"
103 103
 }
104 104
 
105
-// export function GetCode () {
106
-
107
-//   // 从 window.location.href 中截取 code 并且赋值
108
-//   if (window.location.href.indexOf('Code_state') !== -1) {
109
-//     this.code = window.location.href.split('?')[1].split('=')[1].split('&')[0]
110
-//     store.commit('SET_USER_INFO', { code: this.code })
111
-//   }
112
-
113
-//   if (this.$store.state.user.code) {
114
-//     // 存在 code 直接调用接口
115
-//     this.handGetUserInfo(this.code)
116
-//   }
117
-
118
-
119
-//   // 重定向地址重定到当前页面,在路径获取 code
120
-//   if (process.env.NODE_ENV === 'development') {
121
-//     console.log(222)
122
-//     return
123
-//   }
124
-//   /**
125
-//    * 获取 code
126
-//    * @returns
127
-//    */
128
-//   function getCode () {
129
-//     const matched = /[?&]*code=([^&]+)/.exec(location.search)
130
-//     if (matched) {
131
-//       return decodeURIComponent(matched[1])
132
-//     }
133
-//   }
134
-
135
-//   const hrefUrl = window.location.href
136
-
137
-
138
-//   if (this.code === '') {
139
-//     window.location.href = `
140
-// 						https://open.weixin.qq.com/connect/oauth2/authorize
141
-// 						?appid=${this.$store.state.user.appid}
142
-// 						&redirect_uri=${encodeURIComponent(hrefUrl)}
143
-// 						&response_type=code
144
-// 						&scope=snsapi_userinfo
145
-// 						&state=Code_state#wechat_redirect
146
-// 					`
147
-//   }
148
-// }
149 105
 
150 106
 /**
151 107
  * 获取 code