作者 朱兆平

用户中心地址改动

... ... @@ -9,11 +9,12 @@ module.exports = {
assetsSubDirectory: 'static',
assetsPublicPath: './',
productionSourceMap: true,
// Gzip off by default as many popular static hosts such as
// Gzip off by default as many popular static hosts such as2.20202
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
... ... @@ -33,7 +34,7 @@ module.exports = {
// target: 'http://192.168.43.78:12343',//设置你调用的接口域名和端口号 别忘了加http
changeOrigin: true,
pathRewrite: {
'^/api': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
'^/api/': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
}
}
},
... ...
... ... @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>流浪地球项目</title>
<title>项目</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
</head>
... ...
... ... @@ -7,7 +7,7 @@ Vue.prototype.$http = axios;
export const getuserMenus = params => { return axios.get(`/perm/userMenus`, { params: params }); };
export const getUserList = params => { return axios.get(`/hqpt-user-center/user/list`, { params: params }); };
export const getUserList = params => { return axios.get(`/cloud-user-center/user/list`, { params: params }); };
export const getUserListPage = params => { return axios({
method: 'GET',
... ...
import axios from 'axios'
let base = '/hqpt-user-center/company';
let base = '/cloud-user-center/company';
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ...
import axios from 'axios'
let base = '/hqpt-user-center/department';
let base = '/cloud-user-center/department';
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ...
import axios from 'axios'
let base = '/hqpt-user-center/group';
let base = '/cloud-user-center/group';
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ...
... ... @@ -46,7 +46,7 @@ export default {
login: data =>{
return axios({
method: 'POST', // 请求协议
url: 'hqpt-user-center/login', // 请求的地址
url: 'cloud-user-center/login', // 请求的地址
data: qs.stringify(data), // post 请求的数据
timeout: 30000, // 超时时间, 单位毫秒
headers: {
... ...
import axios from 'axios'
let base = '/hqpt-user-center/system/log';
let base = '/cloud-user-center/system/log';
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ...
import axios from 'axios'
let base = '/hqpt-user-center/perm';
let base = '/cloud-user-center/perm';
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ...
import axios from 'axios'
let base = '/hqpt-user-center/role';
let base = '/cloud-user-center/role';
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ...
import http from './http.js'
let baseUrl = '/hqpt-user-center/user'
let baseUrl = '/cloud-user-center/user'
export const getUserList = params => { return http.get(`${baseUrl}/list`, params); };
... ...