Commit 2e328be8 authored by zhangyanni's avatar zhangyanni

登录-去#试一下console

parent dd42be55
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
}) })
console.log(val) console.log(val)
console.log(arr) console.log(arr)
window.location.href = document.location.origin+"/newPage?code="+arr[0]+"&state="+arr[1]; // window.location.href = document.location.origin+"/newPage?code="+arr[0]+"&state="+arr[1];
console.log(document.location.origin) console.log(document.location.origin)
console.log(document.location.origin+"/newPage?code="+arr[0]+"&state="+arr[1]) console.log(document.location.origin+"/newPage?code="+arr[0]+"&state="+arr[1])
// if(document.location.href.split("#")[0].indexOf("index.html")>-1){ // if(document.location.href.split("#")[0].indexOf("index.html")>-1){
...@@ -28,45 +28,45 @@ ...@@ -28,45 +28,45 @@
// window.location.href = document.location.href.split("/#")[0].split("?")[0]+"/#/newPage?code="+arr[0]+"&state="+arr[1]; // window.location.href = document.location.href.split("/#")[0].split("?")[0]+"/#/newPage?code="+arr[0]+"&state="+arr[1];
// } // }
var _this = this; var _this = this;
// setTimeout(function(){ setTimeout(function(){
// if(arr[0]!=null||arr[0]!=undefined){ if(arr[0]!=null||arr[0]!=undefined){
// let params = { let params = {
// code:arr[0], code:arr[0],
// state:arr[1] state:arr[1]
// } }
// api.wechatLoginAxios(params).then((res)=>{ api.wechatLoginAxios(params).then((res)=>{
// if(res.code==0){ if(res.code==0){
// console.log("调借口了") console.log("调借口了")
// if(res.result!=null){ if(res.result!=null){
// console.log("进来1") console.log("进来1")
// if(_this.publicFun.getUserInfoCookieType()){ if(_this.publicFun.getUserInfoCookieType()){
// _this.publicFun.removeCookieType(); _this.publicFun.removeCookieType();
// } }
// _this.publicFun.setUserInfoCookieType(that.Base64.encode(JSON.stringify(res.result))); _this.publicFun.setUserInfoCookieType(that.Base64.encode(JSON.stringify(res.result)));
// globalMsg.$emit("getUserInfo"); globalMsg.$emit("getUserInfo");
// _this.$router.push("/index"); _this.$router.push("/index");
// _this.publicFun.setUserInfoCookie("selected","index"); _this.publicFun.setUserInfoCookie("selected","index");
// globalMsg.$emit("sendSelected","index"); globalMsg.$emit("sendSelected","index");
// } else{ } else{
// console.log("进来2") console.log("进来2")
// if(res.msg!=null){ if(res.msg!=null){
// console.log("进来3") console.log("进来3")
// that.$router.push({path:"/bindAccount",query:{id:res.msg}}); that.$router.push({path:"/bindAccount",query:{id:res.msg}});
// }else{ }else{
// window.location.href = document.location.origin+"/loginByPhone"; window.location.href = document.location.origin+"/loginByPhone";
// } }
// } }
// }else{ }else{
// that.$toast(res.msg); that.$toast(res.msg);
// } }
// }).catch((err)=>{ }).catch((err)=>{
// that.$toast(err); that.$toast(err);
// }) })
// }else{ }else{
// // var dataUrl = document.location.href.split("#/")[0]+"#/newPage"; // var dataUrl = document.location.href.split("#/")[0]+"#/newPage";
// // window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="+encodeURIComponent(dataUrl)+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect"; // window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx725d0e129f703106&redirect_uri="+encodeURIComponent(dataUrl)+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
// } }
// },2000) },2000)
} }
......
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