一、该问题的重现步骤是什么?
1. vue.config.js 里边修改
: {
: {
: {
: ,
: ,
: {
: },
},
: {
: ,
: ,
: {
: },
},
},2. 然后user.js 里边
/api/blade-auth/token 请求的路径不是按代理的路径走的
3.
二、你期待的结果是什么?实际看到的又是什么?
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
saber 3 window
四、请提供详细的错误堆栈信息,这很重要。
user.js
= (tenantId, account, password, type, key, code) =>
({
: ,
: ,
: {
: key,
: code,
},
: {
: .? : ,
tenantId,
account,
password,
type,
},
});
vue.config.js
module.exports = {
lintOnSave: true,
productionSourceMap: false,
chainWebpack: (config) => {
//忽略的打包文件
config.externals({
vue: "Vue",
"vue-router": "VueRouter",
vuex: "Vuex",
axios: "axios",
"element-ui": "ELEMENT",
});
const entry = config.entry("app");
entry.add("babel-polyfill").end();
entry.add("classlist-polyfill").end();
entry.add("@/mock").end();
},
devServer: {
// 端口配置
// port: 8100,
// 反向代理配置
proxy: {
"/api/blade-auth": {
target: "http://192.168.170.155:8100",
ws: true,
pathRewrite: {
"^/api/blade-auth": "/"
},
},
"/api/blade-system": {
target: "http://192.168.170.155:8106",
ws: true,
pathRewrite: {
"^/api/blade-system": "/"
},
},
},
},
};五、若有更多详细信息,请在下面提供。