panhui 7 tahun lalu
induk
melakukan
db66994c84
1 mengubah file dengan 16 tambahan dan 0 penghapusan
  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);
 });