lrf402788946 4 years ago
parent
commit
a0606c3972
5 changed files with 9 additions and 6 deletions
  1. 2 2
      src/store/auth/menu.js
  2. 2 1
      src/store/auth/role.js
  3. 2 1
      src/store/auth/user.js
  4. 2 1
      src/store/auth/userMenu.js
  5. 1 1
      vue.config.js

+ 2 - 2
src/store/auth/menu.js

@@ -1,10 +1,10 @@
 import Vue from 'vue';
 import Vuex from 'vuex';
-import axios from 'axios';
 import _ from 'lodash';
 Vue.use(Vuex);
+const prefix = '/api/role/auth';
 const api = {
-  interface: `/api/auth/menu`,
+  interface: `${prefix}/menu`,
 };
 const state = () => ({});
 const mutations = {};

+ 2 - 1
src/store/auth/role.js

@@ -3,8 +3,9 @@ import Vuex from 'vuex';
 import axios from 'axios';
 import _ from 'lodash';
 Vue.use(Vuex);
+const prefix = '/api/role/auth';
 const api = {
-  interface: `/api/auth/role`,
+  interface: `${prefix}/role`,
 };
 const state = () => ({});
 const mutations = {};

+ 2 - 1
src/store/auth/user.js

@@ -3,8 +3,9 @@ import Vuex from 'vuex';
 import axios from 'axios';
 import _ from 'lodash';
 Vue.use(Vuex);
+const prefix = '/api/role/auth';
 const api = {
-  interface: `/api/zhwl/user`,
+  interface: `${prefix}/user`,
 };
 const state = () => ({});
 const mutations = {};

+ 2 - 1
src/store/auth/userMenu.js

@@ -2,8 +2,9 @@ import Vue from 'vue';
 import Vuex from 'vuex';
 import _ from 'lodash';
 Vue.use(Vuex);
+const prefix = '/api/role/auth';
 const api = {
-  interface: `/api/auth/usermenu`,
+  interface: `${prefix}/usermenu`,
 };
 const state = () => ({});
 const mutations = {};

+ 1 - 1
vue.config.js

@@ -25,7 +25,7 @@ module.exports = {
     port: '7001',
     //api地址前缀
     proxy: {
-      '/api/auth': {
+      '/api/role/auth': {
         target: 'http://free.liaoningdoupo.com',
         changeOrigin: true,
         ws: true,