Browse Source

更改为 query 传参

dsy 1 month ago
parent
commit
c23ea47387
3 changed files with 4 additions and 4 deletions
  1. 2 2
      src/enterPage.vue
  2. 1 1
      src/web_preview/index.vue
  3. 1 1
      vue.config.js

+ 2 - 2
src/enterPage.vue

@@ -32,9 +32,9 @@ export default {
           this.data = response;
           setToken(response);
           if (this.isMobile()) {
-            // this.$router.replace({ name: 'MobileBookPreview', params: { book_id: this.data.book_id } });
+            // this.$router.replace({ name: 'MobileBookPreview', query: { book_id: this.data.book_id } });
           } else {
-            this.$router.replace({ name: 'BookPreview', params: { book_id: this.data.book_id } });
+            this.$router.replace({ name: 'BookPreview', query: { book_id: this.data.book_id } });
           }
         })
         .catch(() => {});

+ 1 - 1
src/web_preview/index.vue

@@ -83,7 +83,7 @@ export default {
   },
   data() {
     return {
-      book_id: this.$route.params.book_id || '',
+      book_id: this.$route.query.book_id || '',
       select_node: '',
       courseware_info: {
         book_name: '',

+ 1 - 1
vue.config.js

@@ -10,7 +10,7 @@ function resolve(dir) {
 
 const NODE_ENV = process.env.NODE_ENV;
 
-const port = process.env.port || 9564;
+const port = process.env.port || 9214;
 
 const eepApiUrlList = {
   '': '',