hqchart 1.1.12733 → 1.1.12741

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,823 @@
1
+ /*
2
+ 微信接口的个股新闻
3
+ */
4
+
5
+ function JSNewsResource()
6
+ {
7
+ this.Domain = "https://opensource.zealink.com"; //API域名
8
+ this.CacheDomain = "https://opensourcecache.zealink.com"; //缓存域名
9
+ }
10
+
11
+ var g_JSNewsResource = new JSNewsResource();
12
+
13
+
14
+ function JSNews()
15
+ {
16
+
17
+ }
18
+
19
+ JSNews.SetDomain = function (domain, cacheDomain)
20
+ {
21
+ if (domain) g_JSNewsResource.Domain = domain;
22
+ if (cacheDomain) g_JSNewsResource.CacheDomain = cacheDomain;
23
+ }
24
+
25
+ //获取新闻列表
26
+ JSNews.GetNews=function(symbol,newsType)
27
+ {
28
+ switch(newsType)
29
+ {
30
+ case NEWS_TYPE.STOCK_NEWS:
31
+ return new StockNews(symbol);
32
+ case NEWS_TYPE.ANNOUNCEMENT_ANALYSE:
33
+ return new AnnouncementAnalyse(symbol);
34
+ case NEWS_TYPE.STOCK_INTERACT:
35
+ return new StockInteract(symbol);
36
+ case NEWS_TYPE.STOCK_NEGATIVE:
37
+ return new StockNegative(symbol);
38
+ case NEWS_TYPE.STOCK_REPORT:
39
+ return new StockReport(symbol);
40
+ }
41
+ }
42
+ //获取新闻内容
43
+ JSNews.GetContent = function (id, newsType) {
44
+ switch (newsType) {
45
+ case NEWS_TYPE.STOCK_NEWS:
46
+ return new StockNewsContent(id);
47
+ }
48
+ }
49
+
50
+ //新闻类型
51
+ var NEWS_TYPE=
52
+ {
53
+ STOCK_NEWS:1, //个股新闻
54
+ ANNOUNCEMENT_ANALYSE:2, //公告解读
55
+ STOCK_INTERACT:3, //互动易
56
+ STOCK_NEGATIVE:4, //负面新闻
57
+ STOCK_REPORT:5,
58
+ }
59
+
60
+ //新闻资讯基类
61
+ function INewsBase(symbol)
62
+ {
63
+ this.Symbol = symbol; //股票代码
64
+ this.Name; //股票名称
65
+ this.Callback; //回调 function(info,news) info: {Start:请求的新闻起始位置 , End:新闻的结束位置 } , news 对应的 新闻类
66
+
67
+ this.Data = new Array(); //新闻数据 { Date:日期, Title:标题 , Source:来源, ID:新闻ID}
68
+ this.Count; //一共的新闻个数
69
+ this.CacheCount; //已下载的新闻个数
70
+ this.PageSize=10; //每页的新闻个数
71
+ this.ApiUrl; //数据请求地址
72
+
73
+ this.StartDate; //开始时间
74
+ this.EndDate; //结束时间
75
+
76
+ //设置默认的查询区间
77
+ this.SetDefautQueryDate=function()
78
+ {
79
+ // 取最近1年的数据
80
+ let date = new Date();
81
+ this.StartDate = (date.getFullYear()-1) * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
82
+ this.EndDate = date.getFullYear() * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
83
+ }
84
+
85
+ //把查询的股票统一转化为数组
86
+ this.GetQuerySymbol=function()
87
+ {
88
+ let arySymbol=new Array();
89
+ if (typeof(this.Symbol)=='string') arySymbol.push(this.Symbol); //单个股票
90
+ else arySymbol=this.Symbol.slice(0);
91
+
92
+ return arySymbol;
93
+ }
94
+
95
+ //是否是最后一页
96
+ this.IsEndPage=function()
97
+ {
98
+ if (this.Count==null || this.Count<=0) return true;
99
+
100
+ return this.CacheCount>=this.Count;
101
+
102
+ }
103
+
104
+ //获取第1页
105
+ this.GetFirstPage=function()
106
+ {
107
+
108
+ }
109
+
110
+ //下拉获取下一页
111
+ this.GetNextPage=function()
112
+ {
113
+
114
+ }
115
+ }
116
+
117
+ //新闻详情基类
118
+ function INewsContent(id)
119
+ {
120
+ this.ID = id; //新闻id
121
+ this.Symbol; //股票代码
122
+ this.Name; //股票名称
123
+ this.ApiUrl;
124
+ this.Callback; //回调 function(this)
125
+ this.Data; //数据 { Symbol:代码, Name:名称, Title:标题, Content:内容, Date:日期 .....}
126
+ this.Error; //如果调用失败 把错误信息写这里
127
+
128
+
129
+ this.GetContent = function ()
130
+ {
131
+
132
+ }
133
+ }
134
+
135
+ //个股新闻
136
+ function StockNews(symbol)
137
+ {
138
+ this.newMethod=INewsBase; //派生
139
+ this.newMethod(symbol);
140
+ delete this.newMethod;
141
+
142
+ var date = new Date();
143
+ this.EndDate = date.getFullYear() * 10000 + (date.getMonth() + 1) * 100 + date.getDate(); //获取结束时间
144
+ this.StartDate = (date.getFullYear() - 1) * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
145
+
146
+ this.ApiUrl = g_JSNewsResource.Domain+'/API/NewsStockList';
147
+
148
+ var self = this;
149
+
150
+ //获取第1页
151
+ this.GetFirstPage=function()
152
+ {
153
+ //清空数据
154
+ this.Data = [];
155
+ this.Count = 0;
156
+ this.CacheCount = 0;
157
+
158
+ $.ajax({
159
+ url: this.ApiUrl,
160
+ data: {
161
+ "symbol": [this.Symbol],
162
+ "filed": ["name", "symbol", "releasedate", "title", "id", "source"],
163
+ "querydate": { "StartDate": this.StartDate, "EndDate": this.EndDate },
164
+ "search": null,
165
+ "calccount": -1,
166
+ "start": 0,
167
+ "end": 10,
168
+ "userid": null
169
+ },
170
+ method: "POST",
171
+ dataType: "json",
172
+ success: function (data) {
173
+ self.RecvData(data);
174
+ },
175
+ error: function (request) {
176
+ this.RecvError(request);
177
+ }
178
+ });
179
+ }
180
+
181
+
182
+ this.RecvData = function(data)
183
+ {
184
+ if (this.Count <= 0) this.Count = data.count;
185
+
186
+ var info = {};
187
+ info.Start = this.Data.length;
188
+ info.End = this.Data.length;
189
+
190
+ var list=data.list;
191
+ for (var i in list)
192
+ {
193
+ var item = list[i];
194
+ this.Data.push({
195
+ ID: item.id,
196
+ Name:item.name,
197
+ Releasedate: item.releasedate,
198
+ Source: item.source,
199
+ Symbol: item.symbol,
200
+ Title: item.title
201
+ })
202
+ if (i > 0) ++info.End;
203
+ }
204
+
205
+ this.CacheCount = this.Data.length;
206
+ this.InvokeCallback(info); //通知页面
207
+ }
208
+
209
+ this.RecvError = function (request) {
210
+ console.log("[StockInteract::RecvError] ", request)
211
+ }
212
+
213
+ this.InvokeCallback = function(){
214
+ if (typeof (this.Callback) != 'function') return;
215
+
216
+ var info = {};
217
+ this.Callback(info,this);
218
+ }
219
+
220
+
221
+ //下拉获取下一页
222
+ this.GetNextPage=function()
223
+ {
224
+ var self = this;
225
+
226
+ var start = this.Data.length;
227
+ var end = start + this.PageSize;
228
+
229
+ $.ajax({
230
+ url: this.ApiUrl,
231
+ data: {
232
+ "symbol": [this.Symbol],
233
+ "filed": ["name", "symbol", "releasedate", "title", "id", "source"],
234
+ "querydate": { "StartDate": this.StartDate, "EndDate": this.EndDate },
235
+ "search": null,
236
+ "calccount": -1,
237
+ "start": start,
238
+ "end": end,
239
+ "userid": null
240
+ },
241
+ method: "POST",
242
+ dataType: "json",
243
+ success: function (data) {
244
+ self.RecvData(data);
245
+ },
246
+ error: function (request) {
247
+ self.RecvError(request);
248
+ }
249
+ })
250
+ }
251
+ }
252
+
253
+ //公告新闻
254
+ function StockReport(symbol){
255
+ this.newMethod = INewsBase; //派生
256
+ this.newMethod(symbol);
257
+ delete this.newMethod;
258
+
259
+ this.ApiUrl = g_JSNewsResource.Domain + '/API/ReportListByES'; //走公司内网查询接口
260
+ this.ReportType=[]; //公告类型数组
261
+
262
+ //获取第1页
263
+ this.GetFirstPage = function ()
264
+ {
265
+ //清空数据
266
+ this.Data = [];
267
+ this.Count = 0;
268
+ this.CacheCount = 0;
269
+
270
+ var self = this;
271
+ let arySymbol = this.GetQuerySymbol();
272
+ if (!this.StartDate || !this.EndDate) this.SetDefautQueryDate();
273
+ let reportType=null;
274
+ if (this.ReportType && this.ReportType.length > 0) reportType = this.ReportType[0]; //暂时只支持1个类型
275
+
276
+ $.ajax({
277
+ url: this.ApiUrl,
278
+ data:
279
+ {
280
+ "symbol": arySymbol,
281
+ "filed": ["symbol", "name", "releasedate", "title", "id", "source"],
282
+ "querydate": { "startDate": this.StartDate, "endDate": this.EndDate },
283
+ "search": null,
284
+ "calccount": 1, //返回一共的数据个数
285
+ "start": 0,
286
+ "end": this.PageSize,
287
+ "userid": null,
288
+ 'type': reportType
289
+ },
290
+ method: "POST",
291
+ dataType: "json",
292
+ success: function (data) {
293
+ self.RecvData(data);
294
+ },
295
+ error: function (request) {
296
+ self.RecvError(request);
297
+ }
298
+ })
299
+ }
300
+
301
+ this.RecvData = function (recvData)
302
+ {
303
+ var data = recvData;
304
+ if (this.Count <= 0)
305
+ this.Count = data.count; //一共的新闻个数
306
+
307
+ var info = {};
308
+ info.Start = this.Data.length;
309
+ info.End = this.Data.length;
310
+
311
+ for (let i in data.report) {
312
+ let item = data.report[i];
313
+ this.Data.push(
314
+ {
315
+ Name: item.name,
316
+ Symbol: item.symbol,
317
+ ID: item.id,
318
+ Data: item.releasedate.substring(0, 4) + "-" + item.releasedate.substring(4, 6) + "-" + item.releasedate.substring(6, 8),
319
+ Title: item.title,
320
+ Source: item.source,
321
+ Type:item.type,
322
+ Showurl: item.showurl
323
+ });
324
+
325
+ if (i > 0)++info.End;
326
+ }
327
+
328
+ this.CacheCount = this.Data.length;
329
+ // this.InvokeCallback(info);
330
+ this.InvokeCallback(this.Data);
331
+ }
332
+
333
+ this.RecvError = function (request)
334
+ {
335
+ console.log("[StockReport::RecvError] ", request)
336
+ }
337
+
338
+ this.InvokeCallback = function (info)
339
+ {
340
+ if (typeof (this.Callback) != 'function') return;
341
+
342
+ this.Callback(info, this);
343
+ }
344
+
345
+ //下拉获取下一页
346
+ this.GetNextPage = function ()
347
+ {
348
+ var self = this;
349
+ let arySymbol = this.GetQuerySymbol();
350
+ if (!this.StartDate || !this.EndDate) this.SetDefautQueryDate();
351
+
352
+ var start = this.Data.length;
353
+ var end = start + this.PageSize;
354
+ $.ajax({
355
+ url: this.ApiUrl,
356
+ data:
357
+ {
358
+ "symbol": arySymbol,
359
+ "filed": ["symbol", "name", "releasedate", "title", "id", "source"],
360
+ "querydate": { "startDate": self.StartDate, "endDate": self.EndDate },
361
+ "search": null,
362
+ "calccount": 0, //下页页不需要统计个数了
363
+ "start": start,
364
+ "end": end,
365
+ "userid": null
366
+ },
367
+ method: "POST",
368
+ dataType: "json",
369
+ success: function (data)
370
+ {
371
+ self.RecvData(data);
372
+ },
373
+ error: function (request)
374
+ {
375
+ self.RecvError(request);
376
+ }
377
+ })
378
+ }
379
+ }
380
+
381
+
382
+ //个股公告分析
383
+ function AnnouncementAnalyse(symbol)
384
+ {
385
+ this.newMethod = INewsBase; //派生
386
+ this.newMethod(symbol);
387
+ delete this.newMethod;
388
+
389
+ this.ApiUrl = g_JSNewsResource.Domain+'/API/AnnualReportAllType';
390
+ this.Error=null;
391
+
392
+ this.GetFirstPage = function ()
393
+ {
394
+ this.Error = null; //清空错误信息
395
+ this.Data=[];
396
+ this.Name = null;
397
+
398
+ var self=this;
399
+ var date=new Date();
400
+
401
+ // 取最近3年的数据
402
+ var start = (date.getFullYear()-3) * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
403
+ var end = date.getFullYear() * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
404
+
405
+ $.ajax({
406
+ url: this.ApiUrl,
407
+ data:
408
+ {
409
+ "symbol": this.Symbol,
410
+ "querydate": { "StartDate": start, "EndDate": end }
411
+ },
412
+ method: "POST",
413
+ dataType: "json",
414
+ success: function (data)
415
+ {
416
+ self.RecvData(data);
417
+ },
418
+ error: function (request)
419
+ {
420
+ self.RecvError(request)
421
+ }
422
+ })
423
+ }
424
+
425
+ this.RecvData=function(data)
426
+ {
427
+ if (data.list == null) return this.InvokeCallback();
428
+
429
+ for(var i in data.list)
430
+ {
431
+ var item=data.list[i];
432
+ if (item==null || item.info==null || item.info.length<=0) continue;
433
+
434
+ var analyseData=
435
+ {
436
+ Name:item.typename,
437
+ Data:new Array()
438
+ };
439
+
440
+ for(var j in item.info)
441
+ {
442
+ var subItem=item.info[j];
443
+ analyseData.Data.push({Date:subItem.date,Content:subItem.abstract});
444
+
445
+ if (this.Name==null) this.Name=subItem.name;
446
+ }
447
+
448
+ this.Data.push(analyseData);
449
+ }
450
+
451
+ this.InvokeCallback(); //通知页面
452
+ }
453
+
454
+ this.RecvError = function (request)
455
+ {
456
+ console.log('[AnnouncementAnalyse:RecvError] ',"request");
457
+ this.Error="请求失败";
458
+ }
459
+
460
+ this.InvokeCallback=function()
461
+ {
462
+ if (typeof(this.Callback)!='function') return;
463
+
464
+ var info={};
465
+ this.Callback(info,this);
466
+ }
467
+
468
+ }
469
+
470
+ //互动易
471
+ function StockInteract(symbol)
472
+ {
473
+ this.newMethod=INewsBase; //派生
474
+ this.newMethod(symbol);
475
+ delete this.newMethod;
476
+
477
+ this.ApiUrl = g_JSNewsResource.Domain+'/API/NewsInteract';
478
+
479
+ //获取第1页
480
+ this.GetFirstPage=function()
481
+ {
482
+ //清空数据
483
+ this.Data=[];
484
+ this.Count=0;
485
+ this.CacheCount=0;
486
+
487
+ var self=this;
488
+ // 取最近1年的数据
489
+ var date = new Date();
490
+ var startDate = (date.getFullYear()-1) * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
491
+ var endDate = date.getFullYear() * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
492
+
493
+ $.ajax({
494
+ url: this.ApiUrl,
495
+ data:
496
+ {
497
+ "symbol": [this.Symbol],
498
+ "filed": ["symbol","questioner","question","questondate","answerer","answer","answerdate","id"],
499
+ "querydate": { "StartDate": startDate, "EndDate": endDate },
500
+ "search": null,
501
+ "calccount": 1, //返回一共的数据个数
502
+ "start": 0,
503
+ "end": this.PageSize,
504
+ "userid": null
505
+ },
506
+ method: "POST",
507
+ dataType: "json",
508
+ success: function (data)
509
+ {
510
+ self.RecvData(data);
511
+ },
512
+ error: function (request)
513
+ {
514
+ self.RecvError(request);
515
+ }
516
+ })
517
+ }
518
+
519
+ this.RecvData=function(data)
520
+ {
521
+ if (this.Count<=0)
522
+ this.Count=data.count; //一共的新闻个数
523
+
524
+ var info={};
525
+ info.Start = this.Data.length;
526
+ info.End = this.Data.length;
527
+
528
+ for(var i in data.list)
529
+ {
530
+ var item=data.list[i];
531
+ this.Data.push(
532
+ {
533
+ ID:item.id,
534
+ Data: item.questondate,
535
+ Title: item.question,
536
+ Author: item.questioner,
537
+
538
+ Data2: item.answerdate,
539
+ Author2: item.answerer,
540
+ Content: item.answer
541
+ });
542
+
543
+ if (i>0) ++info.End;
544
+ }
545
+
546
+ this.CacheCount = this.Data.length;
547
+ this.InvokeCallback(info);
548
+ }
549
+
550
+ this.RecvError=function(request)
551
+ {
552
+ console.log("[StockInteract::RecvError] ", request)
553
+ }
554
+
555
+ this.InvokeCallback = function (info)
556
+ {
557
+ if (typeof (this.Callback) != 'function') return;
558
+
559
+ this.Callback(info, this);
560
+ }
561
+
562
+ //下拉获取下一页
563
+ this.GetNextPage = function ()
564
+ {
565
+ var self = this;
566
+ // 取最近1年的数据
567
+ var date = new Date();
568
+ var startDate = (date.getFullYear() - 1) * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
569
+ var endDate = date.getFullYear() * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
570
+
571
+ var start=this.Data.length;
572
+ var end = start + this.PageSize;
573
+ $.ajax({
574
+ url: this.ApiUrl,
575
+ data:
576
+ {
577
+ "symbol": [this.Symbol],
578
+ "filed": ["symbol", "questioner", "question", "questondate", "answerer", "answer", "answerdate", "id"],
579
+ "querydate": { "StartDate": startDate, "EndDate": endDate },
580
+ "search": null,
581
+ "calccount": 1, //返回一共的数据个数
582
+ "start": start,
583
+ "end": end,
584
+ "userid": null
585
+ },
586
+ method: "POST",
587
+ dataType: "json",
588
+ success: function (data) {
589
+ self.RecvData(data);
590
+ },
591
+ error: function (request) {
592
+ self.RecvError(request);
593
+ }
594
+ })
595
+ }
596
+
597
+ }
598
+
599
+
600
+ //新闻详情
601
+ function StockNewsContent(id)
602
+ {
603
+ this.newMethod = INewsContent; //派生
604
+ this.newMethod(id);
605
+ delete this.newMethod;
606
+
607
+ this.ApiUrl = g_JSNewsResource.Domain+"/API/NewsStockDetail2"
608
+
609
+ this.GetContent = function ()
610
+ {
611
+ var self=this;
612
+ //清空数据
613
+ this.Name=null;
614
+ this.Error=null;
615
+ this.Data=null;
616
+
617
+ $.ajax({
618
+ url: this.ApiUrl,
619
+ data: {
620
+ "userid": null,
621
+ "id": this.ID,
622
+ "symbol":this.Symbol,
623
+ "filed": ["name", "symbol", "releasedate", "title", "id", "content", "link","source"]
624
+ },
625
+ method: "POST",
626
+ dataType: "json",
627
+ success: function (data)
628
+ {
629
+ self.RecvData(data);
630
+ },
631
+ error: function (request)
632
+ {
633
+ self.RecvError(request);
634
+ }
635
+ })
636
+ }
637
+
638
+ this.RecvData=function(data)
639
+ {
640
+ var detail=data.detail;
641
+ if (detail == null) return this.InvokeCallback();
642
+
643
+ //把API数据格式 转换成自己的对外的统一格式,
644
+ this.Data={};
645
+ this.Data.Date = detail.releasedate;
646
+ this.Data.Content = detail.content;
647
+ this.Data.Title = detail.title;
648
+ this.Data.Source = detail.source;
649
+
650
+ //新闻关联的其他股票列表
651
+ var relation=new Array();
652
+ for (var i in data.stocklist)
653
+ {
654
+ var item = data.stocklist[i];
655
+ relation.push({Symbol:item.symbol,Name:item.name});
656
+ }
657
+ this.Data.Relation = relation;
658
+
659
+ this.Name = detail.name;
660
+
661
+ this.InvokeCallback();
662
+ }
663
+
664
+ this.RecvError=function(reqeust)
665
+ {
666
+ this.Error="请求失败";
667
+ this.InvokeCallback();
668
+ }
669
+
670
+ this.InvokeCallback = function()
671
+ {
672
+ if (typeof (this.Callback) != 'function') return;
673
+
674
+ this.Callback(this);
675
+ }
676
+ }
677
+
678
+
679
+ //负面新闻
680
+ function StockNegative(symbol)
681
+ {
682
+ this.newMethod=INewsBase; //派生
683
+ this.newMethod(symbol);
684
+ delete this.newMethod;
685
+
686
+ this.ApiUrl = g_JSNewsResource.Domain+'/API/NewsNegative';
687
+
688
+ //获取第1页
689
+ this.GetFirstPage=function()
690
+ {
691
+ //清空数据
692
+ this.Data=[];
693
+ this.Count=0;
694
+ this.CacheCount=0;
695
+
696
+ var self=this;
697
+ let arySymbol=this.GetQuerySymbol();
698
+ if (!this.StartDate || !this.EndDate) this.SetDefautQueryDate();
699
+
700
+ $.ajax({
701
+ url: this.ApiUrl,
702
+ data:
703
+ {
704
+ "symbol": arySymbol,
705
+ "filed": ["symbol","name","releasedate","title","id","source"],
706
+ "querydate": { "StartDate": this.StartDate, "EndDate": this.EndDate },
707
+ "search": null,
708
+ "calccount": 1, //返回一共的数据个数
709
+ "start": 0,
710
+ "end": this.PageSize,
711
+ "userid": null
712
+ },
713
+ method: "POST",
714
+ dataType: "json",
715
+ success: function (data)
716
+ {
717
+ self.RecvData(data);
718
+ },
719
+ error: function (request)
720
+ {
721
+ self.RecvError(request);
722
+ }
723
+ })
724
+ }
725
+
726
+ this.RecvData=function(data)
727
+ {
728
+ if (this.Count<=0)
729
+ this.Count=data.count; //一共的新闻个数
730
+
731
+ var info={};
732
+ info.Start = this.Data.length;
733
+ info.End = this.Data.length;
734
+
735
+ for(var i in data.list)
736
+ {
737
+ var item=data.list[i];
738
+ this.Data.push(
739
+ {
740
+ ID:item.id,
741
+ Data: item.releasedate,
742
+ Title: item.title,
743
+ Source:item.source
744
+ });
745
+
746
+ if (i>0) ++info.End;
747
+ }
748
+
749
+ this.CacheCount = this.Data.length;
750
+ this.InvokeCallback(info);
751
+ }
752
+
753
+ this.RecvError=function(request)
754
+ {
755
+ console.log("[StockInteract::RecvError] ", request)
756
+ }
757
+
758
+ this.InvokeCallback = function (info)
759
+ {
760
+ if (typeof (this.Callback) != 'function') return;
761
+
762
+ this.Callback(info, this);
763
+ }
764
+
765
+ //下拉获取下一页
766
+ this.GetNextPage = function ()
767
+ {
768
+ var self = this;
769
+
770
+ let arySymbol=this.GetQuerySymbol();
771
+ if (!this.StartDate || !this.EndDate) this.SetDefautQueryDate();
772
+
773
+ var start=this.Data.length;
774
+ var end = start + this.PageSize;
775
+ $.ajax({
776
+ url: this.ApiUrl,
777
+ data:
778
+ {
779
+ "symbol": arySymbol,
780
+ "filed": ["symbol","name","releasedate","title","id","source"],
781
+ "querydate": { "StartDate": startDate, "EndDate": endDate },
782
+ "search": null,
783
+ "calccount": 0, //下页页不需要统计个数了
784
+ "start": start,
785
+ "end": end,
786
+ "userid": null
787
+ },
788
+ method: "POST",
789
+ dataType: "json",
790
+ success: function (data)
791
+ {
792
+ self.RecvData(data);
793
+ },
794
+ error: function (request)
795
+ {
796
+ self.RecvError(request);
797
+ }
798
+ })
799
+ }
800
+
801
+ }
802
+
803
+ /* 测试
804
+
805
+ var news=JSNews.GetNews('600000.sh',NEWS_TYPE.STOCK_NEWS);
806
+
807
+ news.Callback=UpdateNews;
808
+ news.GetFirstPage();
809
+
810
+ function UpdateNews(info,news)
811
+ {
812
+ //获取请求的数据位置
813
+ var start=info.Start;
814
+ var end=info.End;
815
+
816
+ //取新闻列表
817
+ for(var i=start;i<end && i<news.Data.length;++i)
818
+ {
819
+ var item =news.Data[i];
820
+ }
821
+ }
822
+
823
+ */