Commit 18641583 by zsh

添加apis

parent e3672691
Subproject commit 769217b0cf659737061a80d91e4bc6fe23f27816 Subproject commit bede2605b1e5d42e9e7f861300e2c3a27eb03634
/**
* @file apis.js 接口存放
*/
;(function () {
// 接口请求域名
window.domain = {
stg: '', // 测试环境域名
prd: '' // 生产环境域名
}
// 接口请求路径
window.apis = {
}
})()
/**
* @file apis/proxy 开发环境跨域配置
*/
module.exports = {
host: '127.0.0.1',
port: '8082', // 自定义端口号
proxyTable: { // Vue开发环境跨域配置
'/apis': {
target: 'http://test-a.com',
pathRewrite: {
'^/apis': '/'
},
changeOrigin: true // 是否跨域 - 开启代理, 在本地会创建一个虚拟服务端, 然后发送请求的数据, 并同时接收请求的数据, 这样服务端和服务端进行数据的交互就不会有跨域问题
}
}
}
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