Browse Source

去掉斜杠

张文飞 3 năm trước cách đây
mục cha
commit
1d748eea29
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      App.vue

+ 1 - 1
App.vue

@@ -5,7 +5,7 @@
 			let href = location.href;
 			let code  = this.getQueryString('code');
 			if(!code){
-				href = encodeURIComponent(href.split('#')[0]);
+				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"
 				window.location.href = url;
 			}