lrf402788946 5 năm trước cách đây
mục cha
commit
f8181db02d
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 0 1
      src/util/axios-wrapper.js
  2. 2 1
      vue.config.js

+ 0 - 1
src/util/axios-wrapper.js

@@ -50,7 +50,6 @@ export default class AxiosWrapper {
     return this.$request(uri, data, query, options, router);
   }
   async $request(uri, data, query, options) {
-    // TODO: 合并query和options
     if (_.isObject(query) && _.isObject(options)) {
       options = { ...options, params: query, method: 'get' };
     } else if (_.isObject(query) && !query.params) {

+ 2 - 1
vue.config.js

@@ -2,7 +2,8 @@ const path = require('path');
 const question = path.resolve(__dirname, '../question-examine');
 const frame = path.resolve(__dirname, '../frame');
 module.exports = {
-  publicPath: '/',
+  publicPath: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROOT_URL + 'teacher',
+
   configureWebpack: config => {
     Object.assign(config, {
       // 开发生产共同配置