natasha há 3 anos atrás
pai
commit
a81136854b
5 ficheiros alterados com 101 adições e 90 exclusões
  1. 2 1
      .env.development
  2. 1 0
      .env.production
  3. 87 88
      package.json
  4. 2 0
      src/views/courseList.vue
  5. 9 1
      vue.config.js

+ 2 - 1
.env.development

@@ -11,4 +11,5 @@ VUE_APP_BASE_API = '/dev-api'
 # when you have a large number of pages.
 # Detail:  https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
 
-VUE_CLI_BABEL_TRANSPILE_MODULES = true
+VUE_CLI_BABEL_TRANSPILE_MODULES = true
+VUE_APP_PDF = '/pdf'

+ 1 - 0
.env.production

@@ -3,4 +3,5 @@ ENV = 'production'
 
 # base api
 VUE_APP_BASE_API = ''
+VUE_APP_PDF = ''
 

+ 87 - 88
package.json

@@ -1,89 +1,88 @@
 {
-    "name": "vue-admin-template",
-    "version": "4.4.0",
-    "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
-    "author": "Pan <panfree23@gmail.com>",
-    "scripts": {
-        "dev": "vue-cli-service serve",
-        "build:prod": "vue-cli-service build",
-        "build:stage": "vue-cli-service build --mode staging",
-        "preview": "node build/index.js --preview",
-        "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
-        "lint": "eslint --ext .js,.vue src",
-        "test:unit": "jest --clearCache && vue-cli-service test:unit",
-        "test:ci": "npm run lint && npm run test:unit"
-    },
-    "dependencies": {
-        "@tinymce/tinymce-vue": "^3.2.8",
-        "awe-dnd": "^0.3.4",
-        "axios": "0.18.1",
-        "book-ui": "file:../book-ui-0.1.25.tgz",
-        "cnchar": "^3.0.1",
-        "cnchar-all": "^3.0.1",
-        "cnchar-order": "^3.0.1",
-        "core-js": "3.6.5",
-        "element-ui": "^2.13.2",
-        "he-tree-vue": "^2.0.10",
-        "jquery": "^3.6.0",
-        "js-audio-recorder": "^1.0.7",
-        "js-base64": "^3.6.1",
-        "js-cookie": "2.2.0",
-        "jsplumb": "^2.15.6",
-        "normalize.css": "7.0.0",
-        "nprogress": "0.2.0",
-        "path-to-regexp": "2.4.0",
-        "pdfjs-dist": "^2.5.207",
-        "screenfull": "^5.1.0",
-        "seededshuffle": "^0.2.0",
-        "tinymce": "^5.7.1",
-        "vcolorpicker": "^1.1.0",
-        "view-design": "^4.5.0",
-        "vue": "2.6.10",
-        "vue-element-utils": "^0.2.1",
-        "vue-esign": "^1.0.5",
-        "vue-i18n": "^8.24.4",
-        "vue-pdf": "^4.2.0",
-        "vue-router": "3.0.6",
-        "vuedraggable": "^2.24.3",
-        "vuex": "3.1.0"
-    },
-    "devDependencies": {
-        "@vue/cli-plugin-babel": "4.4.4",
-        "@vue/cli-plugin-eslint": "4.4.4",
-        "@vue/cli-plugin-unit-jest": "4.4.4",
-        "@vue/cli-service": "4.4.4",
-        "@vue/test-utils": "1.0.0-beta.29",
-        "autoprefixer": "9.5.1",
-        "babel-eslint": "10.1.0",
-        "babel-jest": "23.6.0",
-        "babel-plugin-dynamic-import-node": "2.3.3",
-        "chalk": "2.4.2",
-        "compression-webpack-plugin": "^6.1.1",
-        "connect": "3.6.6",
-        "drag-tree-table": "^2.2.0",
-        "eslint": "6.7.2",
-        "eslint-plugin-vue": "6.2.2",
-        "hanzi-writer": "^3.1.0",
-        "html-webpack-plugin": "3.2.0",
-        "mockjs": "^1.0.1-beta3",
-        "postcss": "^8.2.10",
-        "postcss-loader": "^5.2.0",
-        "runjs": "4.3.2",
-        "sass": "1.26.8",
-        "sass-loader": "8.0.2",
-        "script-ext-html-webpack-plugin": "2.1.3",
-        "serve-static": "1.13.2",
-        "svg-sprite-loader": "4.1.3",
-        "svgo": "1.2.2",
-        "vue-template-compiler": "2.6.10"
-    },
-    "browserslist": [
-        "> 1%",
-        "last 2 versions"
-    ],
-    "engines": {
-        "node": ">=8.9",
-        "npm": ">= 3.0.0"
-    },
-    "license": "MIT"
-}
+  "name": "vue-admin-template",
+  "version": "4.4.0",
+  "description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
+  "author": "Pan <panfree23@gmail.com>",
+  "scripts": {
+    "dev": "vue-cli-service serve",
+    "build:prod": "vue-cli-service build",
+    "build:stage": "vue-cli-service build --mode staging",
+    "preview": "node build/index.js --preview",
+    "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
+    "lint": "eslint --ext .js,.vue src",
+    "test:unit": "jest --clearCache && vue-cli-service test:unit",
+    "test:ci": "npm run lint && npm run test:unit"
+  },
+  "dependencies": {
+    "@tinymce/tinymce-vue": "^3.2.8",
+    "awe-dnd": "^0.3.4",
+    "axios": "0.18.1",
+    "book-ui": "file:../GCLS-Book-question-ui/book-ui-0.1.30.tgz",
+    "cnchar": "^3.0.1",
+    "cnchar-all": "^3.0.1",
+    "cnchar-order": "^3.0.1",
+    "core-js": "3.6.5",
+    "element-ui": "^2.13.2",
+    "he-tree-vue": "^2.0.10",
+    "jquery": "^3.6.0",
+    "js-audio-recorder": "^1.0.7",
+    "js-base64": "^3.6.1",
+    "js-cookie": "2.2.0",
+    "jsplumb": "^2.15.6",
+    "normalize.css": "7.0.0",
+    "nprogress": "0.2.0",
+    "path-to-regexp": "2.4.0",
+    "screenfull": "^5.1.0",
+    "seededshuffle": "^0.2.0",
+    "tinymce": "^5.7.1",
+    "vcolorpicker": "^1.1.0",
+    "view-design": "^4.5.0",
+    "vue": "2.6.10",
+    "vue-element-utils": "^0.2.1",
+    "vue-esign": "^1.0.5",
+    "vue-i18n": "^8.24.4",
+    "vue-pdf": "^4.3.0",
+    "vue-router": "3.0.6",
+    "vuedraggable": "^2.24.3",
+    "vuex": "3.1.0"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "4.4.4",
+    "@vue/cli-plugin-eslint": "4.4.4",
+    "@vue/cli-plugin-unit-jest": "4.4.4",
+    "@vue/cli-service": "4.4.4",
+    "@vue/test-utils": "1.0.0-beta.29",
+    "autoprefixer": "9.5.1",
+    "babel-eslint": "10.1.0",
+    "babel-jest": "23.6.0",
+    "babel-plugin-dynamic-import-node": "2.3.3",
+    "chalk": "2.4.2",
+    "compression-webpack-plugin": "^6.1.1",
+    "connect": "3.6.6",
+    "drag-tree-table": "^2.2.0",
+    "eslint": "6.7.2",
+    "eslint-plugin-vue": "6.2.2",
+    "hanzi-writer": "^3.1.0",
+    "html-webpack-plugin": "3.2.0",
+    "mockjs": "^1.0.1-beta3",
+    "postcss": "^8.2.10",
+    "postcss-loader": "^5.2.0",
+    "runjs": "4.3.2",
+    "sass": "1.26.8",
+    "sass-loader": "8.0.2",
+    "script-ext-html-webpack-plugin": "2.1.3",
+    "serve-static": "1.13.2",
+    "svg-sprite-loader": "4.1.3",
+    "svgo": "1.2.2",
+    "vue-template-compiler": "2.6.10"
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions"
+  ],
+  "engines": {
+    "node": ">=8.9",
+    "npm": ">= 3.0.0"
+  },
+  "license": "MIT"
+}

+ 2 - 0
src/views/courseList.vue

@@ -521,10 +521,12 @@ export default {
       this.getList();
     },
     handleClick(row) {
+      sessionStorage.setItem("Bookdetail", JSON.stringify(row));
       this.$router.push("/input?bookId=" + row.id);
     },
     // 预览
     handleView(row) {
+      sessionStorage.setItem("Bookdetail", JSON.stringify(row));
       this.$router.push("/courseview?bookId=" + row.id);
     },
     // 优惠码

+ 9 - 1
vue.config.js

@@ -44,11 +44,19 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
         target: `http://gcls.utschool.cn/`,
-        //target: `http://gcls.helxsoft.cn/`,
+        // target: `http://gcls.helxsoft.cn/`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''
         }
+      },
+      [process.env.VUE_APP_PDF]: {
+        // target: 'https://file-kf.helxsoft.cn/',
+        target: 'https://file-cs.helxsoft.cn/',
+        changeOrigin: true,
+        pathRewrite: {
+          ['^' + process.env.VUE_APP_PDF]: ''
+        }
       }
     },
     after: require('./mock/mock-server.js')