xiongzhu 4 роки тому
батько
коміт
a8a22f78fd

+ 1 - 1
src/main/nine-space/src/main.js

@@ -17,7 +17,7 @@ import VueClipboard from 'vue-clipboard2';
 import queryString from 'query-string';
 import VConsole from 'vconsole';
 const vConsole = new VConsole();
-console.log('mainUrl::', location);
+store.commit('setFirstUrl', location.href);
 http.http
     .get('/wx/jsapiSign', { url: location.href })
     .then(res => {

+ 1 - 1
src/main/nine-space/src/router/index.js

@@ -7,7 +7,7 @@ import http from '../plugins/http';
 function jsapiSign() {
     if (/micromessenger/i.test(navigator.userAgent)) {
         http.http
-            .get('/wx/jsapiSign', { url: 'https://nfttest.9space.vip/9th/home' })
+            .get('/wx/jsapiSign', { url: store.state.firstUrl })
             .then(res => {
                 wx.config({
                     debug: false,

+ 5 - 1
src/main/nine-space/src/store/index.js

@@ -4,7 +4,8 @@ import http from '../plugins/http';
 export default createStore({
     state: {
         finished: false,
-        userInfo: null
+        userInfo: null,
+        firstUrl: ''
     },
     mutations: {
         setFinished(state, finished) {
@@ -12,6 +13,9 @@ export default createStore({
         },
         setUserInfo(state, userInfo) {
             state.userInfo = userInfo;
+        },
+        setFirstUrl(state, url) {
+            state.firstUrl = url;
         }
     },
     actions: {