Skip to content

Commit

Permalink
Fix insider check
Browse files Browse the repository at this point in the history
  • Loading branch information
topdna committed Jan 18, 2016
1 parent e1c2238 commit 2cf01f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/insider.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 };
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit 2cf01f3

Please sign in to comment.