sunchengjie 8 months ago
parent
commit
9eb1afb7de
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/pages/express.vue

+ 5 - 3
src/pages/express.vue

@@ -304,14 +304,14 @@ export default {
 	},
 	async created(){
         const res = await getWxConfig({
-            url: window.location.href
+            url: window.location.protocol + '//' + window.location.host
         })
         //发送成功
         var timestamp = res.wxConfig.timestamp;
         var noncestr = res.wxConfig.nonceStr;
         var signature = res.wxConfig.signature;
         var appId = res.wxConfig.appId;
-        var url = window.location.href
+        var url = window.location.protocol + '//' + window.location.host
         wx.config({
             debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
             // debug : true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
@@ -323,7 +323,9 @@ export default {
             jsApiList: [
                 "scanQRCode",
             ] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
-        });
+        }).then(()=>{
+			console.log('123')
+		});
 		debugger
 
 		this.accountType = localStorage.getItem("accountType")