张文飞 před 3 roky
rodič
revize
4002c7a10f
1 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 3 2
      App.vue

+ 3 - 2
App.vue

@@ -5,8 +5,9 @@
 			let href = location.href;
 			let code  = this.getQueryString('code');
 			if(!code){
-				href = encodeURIComponent(href.split('#')[0].substring(0,href.split('#')[0].length-1));
-				let url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+config.appid+"&redirect_uri="+href+"&response_type=code&scope=snsapi_base&state=123&connect_redirect=1#wechat_redirect"
+				let url =  href.split('#')[0];
+				url = encodeURIComponent(url);
+				url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+config.appid+"&redirect_uri="+url+"&response_type=code&scope=snsapi_base&state=123&connect_redirect=1#wechat_redirect"
 				window.location.href = url;
 			}
 			let BASE_URL = "";