Commit 8565b353 authored by verestrasz's avatar verestrasz

update

parent 328da2b2
......@@ -36,6 +36,7 @@ export default {
mounted() {
var local = window.location.href // 获取页面url
var appid = 'wxbdddd81913c795e9'
let url=window.location.host+"/"+window.location.hash
this.timeTask = setInterval(() => {
this.setCurrentTime(+new Date())
}, 1000);
......@@ -43,7 +44,7 @@ export default {
if (this.code == null || this.code === ''){
// 没有code去拿code;
if(sysInfo.isWechat) {
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_base&state=1#wechat_redirect`;
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(url)}&response_type=code&scope=snsapi_base&state=1#wechat_redirect`;
}
}else{
// 获取得code
......@@ -61,7 +62,7 @@ export default {
error: () => {
// console.log(error)
if(sysInfo.isWechat) {
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_base&state=1#wechat_redirect`;
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(url)}&response_type=code&scope=snsapi_base&state=1#wechat_redirect`;
}
this.code=''
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment