Browse Source

更新代理 科目地点部门

wuhongyuq 5 years ago
parent
commit
69d399da0a

+ 1 - 1
src/store/bedroom.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/bedroom`,
+  interface: `/api/train/bedroom`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
src/store/classes.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/class`,
+  interface: `/api/train/class`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
src/store/dept.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api//department`,
+  interface: `/api/train/department`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
src/store/director.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/headteacher`,
+  interface: `/api/train/headteacher`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
src/store/location.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/location`,
+  interface: `/api/train/location`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
src/store/question.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/question`,
+  interface: `/api/train/question`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
src/store/questionnaire.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/questionnaire`,
+  interface: `/api/train/questionnaire`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
src/store/student.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/student`,
+  interface: `/api/train/student`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
src/store/subject.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/subject`,
+  interface: `/api/train/subject`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
src/store/task.js

@@ -3,7 +3,7 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/task`,
+  interface: `/api/train/task`,
 };
 const state = () => ({});
 const mutations = {};

+ 2 - 2
src/store/teacher.js

@@ -3,8 +3,8 @@ import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
 const api = {
-  interface: `/api/teacher`,
-  interfaceEdit: id => `/api/teacher/update/${id}`,
+  interface: `/api/train/teacher`,
+  interfaceEdit: id => `/api/train/teacher/update/${id}`,
   // interfaceSelect: id => `/api/teacher/show/${id}`,
 };
 const state = () => ({});

+ 1 - 0
src/views/classes/detail.vue

@@ -74,6 +74,7 @@ export default {
       let msg;
       if (isNew) {
         res = await this.create(data);
+        console.log(res);
         msg = `${this.keyWord}添加成功`;
       } else {
         res = await this.update(data);

+ 11 - 7
vue.config.js

@@ -21,8 +21,8 @@ module.exports = {
     port: '8001',
     //api地址前缀
     proxy: {
-      '/api': {
-        target: 'http://10.16.9.108:8001',
+      '/api/train': {
+        target: 'http://free.liaoningdoupo.com',
         changeOrigin: true,
         ws: true,
       },
@@ -41,19 +41,23 @@ module.exports = {
         ws: true,
       },
       '/admin/center': {
-        target: 'http://localhost:8001',
+        target: 'http://free.liaoningdoupo.com',
       },
+      // '/api/train/department': {
+      //   target: 'http://free.liaoningdoupo.com',
+      // },
+
       '/admin/director': {
-        target: 'http://localhost:8002',
+        target: 'http://free.liaoningdoupo.com',
       },
       '/admin/teacher': {
-        target: 'http://localhost:8003',
+        target: 'http://free.liaoningdoupo.com',
       },
       '/admin/student': {
-        target: 'http://localhost:8004',
+        target: 'http://free.liaoningdoupo.com',
       },
       '/admin/school': {
-        target: 'http://localhost:8005',
+        target: 'http://free.liaoningdoupo.com',
       },
     },
   },