Commit 3ee08a3c authored by 罗超's avatar 罗超

修改Login

parent b5d609f0
......@@ -457,13 +457,22 @@ export default {
useWechatLogin() {
// this.loginType = "wechat";
// this.setWechatCode()
const { AppID, State, OpenRedirectUri } = this.openInfo;
let redirect_uri = OpenRedirectUri;
const url = `https://open.weixin.qq.com/connect/qrconnect?appid=${AppID}&redirect_uri=${encodeURIComponent('http://www.oytour.com/#/login')}&response_type=code&scope=snsapi_login&state=${State}&wechat_redirect=${redirect_uri}`;
// this.windowObjectReference = window.open(url, 'wechat', 'left: 20,top: 20,width:200,height:200,')
// console.log('windowObjectReference', this.windowObjectReference)
// setTimeout(() => {console.log(this.windowObjectReference.close())}, 1000)
window.location.href = url;
if(this.$q.platform.is.desktop){
const { AppID, State, OpenRedirectUri } = this.openInfo;
let redirect_uri = OpenRedirectUri;
const url = `https://open.weixin.qq.com/connect/qrconnect?appid=${AppID}&redirect_uri=${encodeURIComponent('http://www.oytour.com/#/login')}&response_type=code&scope=snsapi_login&state=${State}&wechat_redirect=${redirect_uri}`;
// this.windowObjectReference = window.open(url, 'wechat', 'left: 20,top: 20,width:200,height:200,')
// console.log('windowObjectReference', this.windowObjectReference)
// setTimeout(() => {console.log(this.windowObjectReference.close())}, 1000)
window.location.href = url;
}else{
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx44c35529819fc345&redirect_uri=http%3A%2F%2Fwww.oytour.com%2F%23%2Flogin&response_type=code&scope=snsapi_userinfo&state=${State}&&connect_redirect=1#wechat_redirect`;
// this.windowObjectReference = window.open(url, 'wechat', 'left: 20,top: 20,width:200,height:200,')
// console.log('windowObjectReference', this.windowObjectReference)
// setTimeout(() => {console.log(this.windowObjectReference.close())}, 1000)
window.location.href = url;
}
},
async login() {
if (this.loading) {
......
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