From 45ab088e8955b9e4bc8662e82c12be2aae96ba15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Tue, 25 Aug 2020 11:05:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A2=9E=E5=8A=A0=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84=E9=B8=A1=E7=B2=BE=E6=97=B6=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E6=AD=BB=E6=8E=89=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/js/app.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 084dc49..579098b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "io.yutent.gaystat", - "version": "1.6.0", + "version": "1.7.0", "description": "搞基数据", "main": "src/main.js", "scripts": { diff --git a/src/js/app.js b/src/js/app.js index e576b04..8f98d7c 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -23,7 +23,10 @@ const WIN = remote.getCurrentWindow() const $doc = Anot(document) function getJsonp(str) { - return new Function(`function jsonpgz(d){return d}; return ${str}`)() + if (~str.indexOf('jsonpgz')) { + return new Function(`function jsonpgz(d){return d}; return ${str}`)() + } + return false } function getTableData(str) { @@ -93,6 +96,7 @@ Anot({ 'net', `https://fundgz.1234567.com.cn/js/${id}.js` ) + return getJsonp(res) }, @@ -117,8 +121,9 @@ Anot({ } Anot.nextTick(_ => { var info = this.getTodayStat(id) - var last = this.getLastMonth(id) + var last if (info) { + last = this.getLastMonth(id) var tmp = { code: info.fundcode, name: info.name, @@ -130,6 +135,8 @@ Anot({ this.list.unshift(tmp) this.$dict[tmp.code] = this.list[0] Anot.ls('watch_list', this.list.$model) + } else { + layer.toast('鸡精不存在', 'error') } }) })