diff --git a/src/components/StockList.vue b/src/components/StockList.vue index 1ea0d85..ac73879 100644 --- a/src/components/StockList.vue +++ b/src/components/StockList.vue @@ -136,7 +136,7 @@ export default { this.list = []; //因为并没有修改列表已经渲染出来的界面,要恢复空值(什么都不渲染) return; } - var url = `//web.sqt.gtimg.cn/q=${this.stocksList.join(",")}`; + var url = `/proxy/web.sqt.gtimg.cn/q=${this.stocksList.join(",")}`; this.$http.get(url).then(function(res) { // console.log(res); let data = parse(res.body); diff --git a/src/components/Trend.vue b/src/components/Trend.vue index c6b4c6b..45a1e6a 100644 --- a/src/components/Trend.vue +++ b/src/components/Trend.vue @@ -181,7 +181,7 @@ export default { methods: { getTimeSharpData() { // 请求分时图data - let url = `http://web.ifzq.gtimg.cn/appstock/app/minute/query?code=${this.detailCode}`; + let url = `/proxy/web.ifzq.gtimg.cn/appstock/app/minute/query?code=${this.detailCode}`; let that = this; this.$http.get(url).then(function (res) { let code = that.detailCode; diff --git a/src/pages/StockDetail.vue b/src/pages/StockDetail.vue index f72ed90..e4b995b 100644 --- a/src/pages/StockDetail.vue +++ b/src/pages/StockDetail.vue @@ -161,7 +161,7 @@ export default { this.getData(); }, getData: function() { - let url = `http://web.sqt.gtimg.cn/q=${this.detailCode}`; + let url = `/proxy/web.sqt.gtimg.cn/q=${this.detailCode}`; this.loading = true; this.$http.get(url).then(function(res) { this.loading = false;