From 2cf01f38b0add76720f4699bae483a8ed6861d0c Mon Sep 17 00:00:00 2001 From: hustcer Date: Mon, 18 Jan 2016 10:59:25 +0800 Subject: [PATCH] Fix insider check --- lib/insider.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/insider.js b/lib/insider.js index 6c0243e..5a81181 100644 --- a/lib/insider.js +++ b/lib/insider.js @@ -334,7 +334,7 @@ let getQueryOption = function getQueryOption(code){ option.qs.tab1PAGENUM = cmd.page || 1; } if(spanM){ - let span = parseInt(spanM); + let span = _.parseInt(spanM); span = span > 24 ? 24: span; span = span < 1 ? 1: span; option.qs[option.endKey] = moment().format(ft.outDate); @@ -371,7 +371,7 @@ let getQueryLatestOption = function getQueryLatestOption(callback){ let spanD = cmd.span || '10d'; option.sz.qs.CATALOGID = '1801_cxda'; - let span = parseInt(spanD); + let span = _.parseInt(spanD); span = span > 60 ? 60: span; span = span < 1 ? 1 : span; to = moment().format(ft.outDate); @@ -644,7 +644,7 @@ let queryTopAsync = function queryTopAsync(type){ let tradings = res.data; to = moment().format(ft.inDate); - from = moment().subtract(parseInt(res.condition.span), 'months').format(ft.inDate); + from = moment().subtract(_.parseInt(res.condition.span), 'months').format(ft.inDate); option.qs.span = res.condition.span; return { data: tradings, option }; @@ -693,7 +693,7 @@ let queryTopList = function queryTopList(type){ let end = new Date(); console.log(' '.repeat(16) + 'Done!'.header, '耗时:', `${end - start} ms,`.em, '最近', - `${parseInt(top.option.qs.span)}`.em, '月', (type === 'BV')?'买入总额前':'卖出总额前', + `${_.parseInt(top.option.qs.span)}`.em, '月', (type === 'BV')?'买入总额前':'卖出总额前', `${top.data.length}`.em, ' '.repeat(3), 'By TraceInvest.com\n' ); }) .catch((e) => {