Closed justyeh closed 1 year ago
基金列表是空的,看了下控制台报错了,getIndFundData方法中接口请求返回的data对象为空e.data.data.diff,导致报错
e.data.data.diff
getIndFundData() { var t = this , e = "https://push2.eastmoney.com/api/qt/ulist.np/get?fltt=2&fields=f2,f3,f4,f12,f13,f14&secids=" + this.seciList.join(",") + "&_=" + (new Date).getTime(); this.$axios.get(e).then((function(e) { t.loadingInd = !1, t.indFundData = e.data.data.diff } )) }
{ "data": { "rc": 102, "rt": 1, "svr": 2887257693, "lt": 1, "full": 1, "dlmkts": "", "data": null }, "status": 200, "statusText": "OK", "headers": { "access-control-allow-credentials": "true", "access-control-allow-methods": "GET, POST, OPTIONS", "access-control-allow-origin": "*", "cache-control": "no-cache", "connection": "close", "content-length": "74", "content-type": "text/plain" }, "config": { "url": "https://push2.eastmoney.com/api/qt/ulist.np/get?fltt=2&fields=f2,f3,f4,f12,f13,f14&secids=&_=1690419464316", "method": "get", "headers": { "Accept": "application/json, text/plain, */*" }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1 }, "request": {} }
基金列表是空的,看了下控制台报错了,getIndFundData方法中接口请求返回的data对象为空
e.data.data.diff
,导致报错