xiongzhu 4 yıl önce
ebeveyn
işleme
3e3517aca1

+ 3 - 0
src/main/nine-space/.eslintrc.js

@@ -14,5 +14,8 @@ module.exports = {
         'no-empty': ['error', { allowEmptyCatch: true }],
         'vue/custom-event-name-casing': 0,
         'vue/no-parsing-error': ['error']
+    },
+    globals: {
+        wx: true
     }
 };

+ 1 - 0
src/main/nine-space/public/index.html

@@ -12,6 +12,7 @@
         <meta name="full-screen" content="yes" />
         <meta name="x5-fullscreen" content="true" />
         <meta name="theme-color" content="#000000" />
+        <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
         <title>第九空间</title>
     </head>
     <body>

+ 19 - 0
src/main/nine-space/src/router/index.js

@@ -2,7 +2,26 @@ import { createRouter, createWebHistory } from 'vue-router';
 import store from '../store';
 import { Page } from './Page';
 import { Dialog } from 'vant';
+import http from '../plugins/http';
 
+console.log(http);
+function jsapiSign() {
+    http.http
+        .get('/wx/jsapiSign', { url: location.origin + location.pathname })
+        .then(res => {
+            res.debug = false;
+            res.jsApiList = [
+                'chooseWXPay',
+                'updateAppMessageShareData',
+                'updateTimelineShareData',
+                'hideAllNonBaseMenuItem',
+                'scanQRCode'
+            ];
+            wx.config(res);
+        })
+        .catch(e => {});
+}
+jsapiSign();
 const routes = [
     {
         path: '/',