"h5": {
"devServer": {
"port": 8000,
"disableHostCheck": true,
"proxy": {
"/ksy": {
"target": "http://www.imaiji.cn:8888",
"changeOrigin": true,
"ws": true,
"pathRewrite": {
"^/ksy": ""
}
}
}
}
}
我在manifest.json里配置了需要跨域访问的路径,然后请求接口时写的“/ksy/接口地址”,Request URL地址是“http://192.168.0.101:8000/ksy/接口地址”,请问这是怎么回事啊?
请求接口代码如下:
uni.request({
url: "/ksy/downPriceGoodsInterface/getDownPriceGoodsList",
data: JSON.stringify(that.param),
method: 'POST',
dataType: 'json',
header: {
'content-type': 'application/x-www-form-urlencoded;application/json;charset=UTF-8',
'maijiToken': 'abc494548414c8d8abc14541abc84cc1'
},
success: function(res) {
console.log(res)
}
})