server.dev.js中配置为 app.use('/finance/stock/hs', proxy({target:'http://web.juhe.cn:8080',changeOrigin:true}));
调接口为: axios({ method: 'get', url: '/finance/stock/hs?gid=&type=0&key=1ed6d144683a32812ebe646f31a8e62e' }).then(function (response) { console.log('response', response); if (response.status == 200 ) { } }).catch(function (err) { }); 得到的返回是200,但是却是html,如下:
loadScript("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js", function(){
if (window.hljs) {
window.hljs.initHighlightingOnLoad();
}
});
-->