1 Star 0 Fork 0

luo / phoshow-vue-vant2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
罗翔 提交于 2023-06-03 20:59 . sina股票接口,安装echarts
const {defineConfig} = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
devServer: {
// host: "localhost",
// port: 8081, // 端口号
// https: false, // https:{type:Boolean}
// open: false, //配置自动启动浏览器
// hotOnly: true, // 热更新
proxy: { //配置多个跨域
"/btstu": {
target: "http://api.btstu.cn/qqxt/api.php",
changeOrigin: true,
// ws: true,//websocket支持
// secure: false,
// pathRewrite: {
// "^/btstu": ""
// }
},
"/sina": { // 设置跨域变量代号
target: "http://hq.sinajs.cn", // 想要代理的目标源链接
changeOrigin: true, // 开启代理
// ws: true,//websocket支持
// secure: false,
// pathRewrite: { // 设置二级
// "^/sina": ""
// }
headers: {//重点在这里,添加配置项 headers 就可以了
'Referer': 'http://finance.sina.com.cn'
}
},
}
}
})
1
https://gitee.com/luolove9100/phoshow-vue-vant2.git
git@gitee.com:luolove9100/phoshow-vue-vant2.git
luolove9100
phoshow-vue-vant2
phoshow-vue-vant2
master

搜索帮助