panhui 7 年之前
父節點
當前提交
db66994c84
共有 1 個文件被更改,包括 16 次插入0 次删除
  1. 16 0
      src/main/House/src/router/index.js

+ 16 - 0
src/main/House/src/router/index.js

@@ -247,6 +247,22 @@ router.afterEach(function(to) {
             cordova.plugins.navigationbar.showBack();
         }
     }
+    axios.get('/wx/getSignature', {
+            params: {
+                shareUrl: location.href.split('#')[0]
+            }
+        })
+        .then(response => {
+            console.log(response)
+            wx.config({
+                debug: false,
+                appId: response.data.appId,
+                timestamp: response.data.timestamp,
+                nonceStr: response.data.nonceStr,
+                signature: response.data.signature,
+                jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage']
+            })
+        })
 
     store.commit("updateLoading", false);
 });