Commit 5c34fff2 authored by 赵啸非's avatar 赵啸非

修改路由

parent 81ab790d
#开发环境
NODE_ENV = "development"
VUE_APP_BASE_API= http://192.168.0.98:11091/m
VUE_APP_BASE_API= http://192.168.0.98:11091/bill
#VUE_APP_BASE_API= /basics_api/m
#图片地址拼接
VUE_APP_API_IMG_URL=http://192.168.0.98:11078/
......@@ -5,7 +5,7 @@ import cookie from "./cookie";
import httpErrorHandler from "./httpErrorHandler";
const instance = axios.create({
baseURL: "/m",
baseURL: "/bill",
//baseURL: process.env.VUE_APP_BASE_API,
headers: {
post: {
......@@ -27,15 +27,7 @@ const instance = axios.create({
instance.interceptors.request.use(
(config) => {
//config.data = Qs.stringify(config.data, {arrayFormat: 'repeat', allowDots: true});
//config.data = Qs.stringify(config.data, {arrayFormat: 'indices', allowDots: true});
//brackets
// 也可以在这里给请求添加token之类的字段
// config.headers['Content-Type'] = 'application/json;charset=UTF-8'
// config.headers.timestamp = Math.floor(new Date().getTime() / 1000)
// console.log("sessionStorage",window.sessionStorage)
config.headers.Authorization = window.sessionStorage.getItem("token") || "";
//console.log("request config and session",config,window.sessionStorage);
return config;
},
(err) => {
......
......@@ -102,7 +102,7 @@ export default {
},
data() {
return {
uploadFileUrl: "/m/file/commonupload", // 上传的地址
uploadFileUrl: "/bill/file/commonupload", // 上传的地址
headers:{},
fileList: [],
};
......
......@@ -8,24 +8,11 @@ module.exports = {
port: 8085,
hot: true, //自动保存
proxy: {
"/m": {
"/bill": {
target: "http://192.168.0.98:11078",
//target: 'http://127.0.0.1:18222',
changeOrigin: true,
secure: false
},
"/file": {
target: "http://192.168.0.98:11091",
//target: 'http://127.0.0.1:18222',
changeOrigin: true,
},
"/moudle": {
target: "http://192.168.0.98:11091",
changeOrigin: true,
logLevel: 'debug',
pathRewrite:{
'^':''
}
}
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment