|
@@ -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
|