hqchart 1.1.12687 → 1.1.12706
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.
- package/lib/umychart.vue.js +94 -50
- package/package.json +15 -47
- package/src/jscommon/umychart.resource/js/codemirror/javascript.js +1 -1
- package/src/jscommon/umychart.uniapp.h5/umychart.uniapp.h5.js +409 -115
- package/src/jscommon/umychart.vue/umychart.vue.js +409 -115
- package/.babelrc +0 -6
- package/.vscode/settings.json +0 -4
- package/Makefile +0 -9
- package/README.md +0 -452
- package/index.js +0 -17
- package/postcss.config.js +0 -5
- package/src/index.html +0 -18
- package/src/jscommon/backup/announcement.png +0 -0
- package/src/jscommon/backup/announcement2.png +0 -0
- package/src/jscommon/backup/blocktrading.png +0 -0
- package/src/jscommon/backup/investor.png +0 -0
- package/src/jscommon/backup/pforecast.png +0 -0
- package/src/jscommon/backup/research.png +0 -0
- package/src/jscommon/backup/tradedetail.png +0 -0
- package/src/jscommon/backup/umychart - backup.js +0 -17631
- package/src/jscommon/backup/umychart.macro.js +0 -4
- package/src/jscommon/backup/umychart.macro.vue.js +0 -3
- package/src/jscommon/commonindextree.json +0 -92
- package/src/jscommon/index.html +0 -13
- package/src/jscommon/jschinamapdata.js +0 -3
- package/src/jscommon/umychart.NetworkFilterTest.js +0 -48803
- package/src/jscommon/umychart.aliYunnetwork.js +0 -47
- package/src/jscommon/umychart.cninfo.components/readme.txt +0 -1
- package/src/jscommon/umychart.complier.js +0 -25291
- package/src/jscommon/umychart.complier.node/umychart.complier.controller.js +0 -559
- package/src/jscommon/umychart.complier.node/umychart.complier.node.js +0 -7043
- package/src/jscommon/umychart.complier.node/umychart.data.node.js +0 -816
- package/src/jscommon/umychart.console.js +0 -12
- package/src/jscommon/umychart.deal.js +0 -1452
- package/src/jscommon/umychart.dragdiv.js +0 -48
- package/src/jscommon/umychart.index.data.js +0 -4132
- package/src/jscommon/umychart.js +0 -90257
- package/src/jscommon/umychart.keyboard.js +0 -1659
- package/src/jscommon/umychart.listctrl.js +0 -690
- package/src/jscommon/umychart.mind.js +0 -2203
- package/src/jscommon/umychart.network.js +0 -44
- package/src/jscommon/umychart.news.js +0 -823
- package/src/jscommon/umychart.node.build/buildall.bat +0 -1
- package/src/jscommon/umychart.node.build/umychart.node.bat +0 -1
- package/src/jscommon/umychart.node.build/umychart.node.export.js +0 -40
- package/src/jscommon/umychart.regressiontest.js +0 -400
- package/src/jscommon/umychart.report.js +0 -5803
- package/src/jscommon/umychart.scrollbar.js +0 -1345
- package/src/jscommon/umychart.stock.js +0 -4218
- package/src/jscommon/umychart.style.js +0 -618
- package/src/jscommon/umychart.testdata.js +0 -150
- package/src/jscommon/umychart.uniapp.build/buildall.bat +0 -1
- package/src/jscommon/umychart.uniapp.build/umychart.bat +0 -1
- package/src/jscommon/umychart.uniapp.build/umychart.export.js +0 -70
- package/src/jscommon/umychart.user.js +0 -137
- package/src/jscommon/umychart.version.js +0 -30
- package/src/jscommon/umychart.vue/umychart.aliYunnetwork.vue.js +0 -56
- package/src/jscommon/umychart.vue.build/buildall.bat +0 -4
- package/src/jscommon/umychart.vue.build/copy_codemirror.bat +0 -2
- package/src/jscommon/umychart.vue.build/umychart.aliYunnetwork.vue.export.js +0 -9
- package/src/jscommon/umychart.vue.build/umychart.dragdiv.bat +0 -1
- package/src/jscommon/umychart.vue.build/umychart.dragdiv.export.js +0 -6
- package/src/jscommon/umychart.vue.build/umychart.index.data.bat +0 -1
- package/src/jscommon/umychart.vue.build/umychart.index.data.export.js +0 -4
- package/src/jscommon/umychart.vue.build/umychart.listctrl.vue.export.js +0 -15
- package/src/jscommon/umychart.vue.build/umychart.regressiontest.vue.export.js +0 -7
- package/src/jscommon/umychart.vue.build/umychart.regressiontest.wechat.export.js +0 -12
- package/src/jscommon/umychart.vue.build/umychart.stock.bat +0 -1
- package/src/jscommon/umychart.vue.build/umychart.stock.vue.export.js +0 -16
- package/src/jscommon/umychart.vue.build/umychart.testdata.bat +0 -3
- package/src/jscommon/umychart.vue.build/umychart.testdata.vue.export.js +0 -7
- package/src/jscommon/umychart.vue.build/umychart.vue.bat +0 -8
- package/src/jscommon/umychart.vue.build/umychart.vue.export.js +0 -112
- package/src/jscommon/umychart.vue.components/empyt.vue +0 -51
- package/src/jscommon/umychart.vue.components/historydayline.vue +0 -240
- package/src/jscommon/umychart.vue.components/jsloader.adddialog.vue +0 -315
- package/src/jscommon/umychart.vue.components/jsloader.vue +0 -93
- package/src/jscommon/umychart.vue.components/jsvuecontainer.vue +0 -160
- package/src/jscommon/umychart.vue.components/jsvuecontainer2.0.vue +0 -391
- package/src/jscommon/umychart.vue.components/login.vue +0 -178
- package/src/jscommon/umychart.vue.components/queryContent.vue +0 -750
- package/src/jscommon/umychart.vue.components/readme.txt +0 -8
- package/src/jscommon/umychart.vue.components/searchsymbol.vue +0 -299
- package/src/jscommon/umychart.vue.components/simulatetrade.vue +0 -1471
- package/src/jscommon/umychart.vue.components/stockchart.vue +0 -343
- package/src/jscommon/umychart.vue.components/stockchartV2.vue +0 -195
- package/src/jscommon/umychart.vue.components/stockdeal.vue +0 -358
- package/src/jscommon/umychart.vue.components/stockdealcount.vue +0 -262
- package/src/jscommon/umychart.vue.components/stockdeallastest.vue +0 -316
- package/src/jscommon/umychart.vue.components/stockdrawtool.vue +0 -343
- package/src/jscommon/umychart.vue.components/stockfull.vue +0 -355
- package/src/jscommon/umychart.vue.components/stockinfo.demo.vue +0 -153
- package/src/jscommon/umychart.vue.components/stockinfo.vue +0 -685
- package/src/jscommon/umychart.vue.components/stockkline.demo.vue +0 -1904
- package/src/jscommon/umychart.vue.components/stockmultiorder.vue +0 -174
- package/src/jscommon/umychart.vue.components/stockmultiperiod.vue +0 -222
- package/src/jscommon/umychart.vue.components/stockorder.vue +0 -320
- package/src/jscommon/umychart.vue.components/stocktradeinfo.demo.vue +0 -250
- package/src/jscommon/umychart.vue.components/stocktradeinfo.vue +0 -1907
- package/src/jscommon/umychart.vue.components/test.vue +0 -0
- package/src/jscommon/umychart.wechat/getDate.wechat.js +0 -91
- package/src/jscommon/umychart.wechat/lighter.news.wechat.js +0 -262
- package/src/jscommon/umychart.wechat/readme.txt +0 -3
- package/src/jscommon/umychart.wechat/umychart.analyze.wechat.js +0 -551
- package/src/jscommon/umychart.wechat/umychart.apidraw.wechat.js +0 -126
- package/src/jscommon/umychart.wechat/umychart.bigV.wechat.js +0 -2510
- package/src/jscommon/umychart.wechat/umychart.chartframe.wechat.js +0 -2931
- package/src/jscommon/umychart.wechat/umychart.chartpaint.wechat.js +0 -9752
- package/src/jscommon/umychart.wechat/umychart.charttitle.wechat.js +0 -2023
- package/src/jscommon/umychart.wechat/umychart.complier.wechat.js +0 -14726
- package/src/jscommon/umychart.wechat/umychart.console.wechat.js +0 -8
- package/src/jscommon/umychart.wechat/umychart.coordinatedata.wechat.js +0 -3654
- package/src/jscommon/umychart.wechat/umychart.data.wechat.js +0 -2243
- package/src/jscommon/umychart.wechat/umychart.element.wechart.js +0 -132
- package/src/jscommon/umychart.wechat/umychart.explainer.wechat.js +0 -1077
- package/src/jscommon/umychart.wechat/umychart.extendchart.wechat.js +0 -1140
- package/src/jscommon/umychart.wechat/umychart.framesplit.wechat.js +0 -2247
- package/src/jscommon/umychart.wechat/umychart.hqIndexformula.wechat.js +0 -941
- package/src/jscommon/umychart.wechat/umychart.index.data.wechat.js +0 -3628
- package/src/jscommon/umychart.wechat/umychart.index.wechat.js +0 -4074
- package/src/jscommon/umychart.wechat/umychart.klineinfo.wechat.js +0 -836
- package/src/jscommon/umychart.wechat/umychart.markethot.js +0 -50
- package/src/jscommon/umychart.wechat/umychart.network.wechart.js +0 -62
- package/src/jscommon/umychart.wechat/umychart.news.wechat.js +0 -3568
- package/src/jscommon/umychart.wechat/umychart.regressiontest.wechat.js +0 -412
- package/src/jscommon/umychart.wechat/umychart.report.wechat.js +0 -3983
- package/src/jscommon/umychart.wechat/umychart.resource.wechat.js +0 -919
- package/src/jscommon/umychart.wechat/umychart.shareimage.wechat.js +0 -681
- package/src/jscommon/umychart.wechat/umychart.simulatetrade.wechat.js +0 -238
- package/src/jscommon/umychart.wechat/umychart.stock.wechat.js +0 -4035
- package/src/jscommon/umychart.wechat/umychart.style.wechat.js +0 -419
- package/src/jscommon/umychart.wechat/umychart.uniapp.canvas.helper.js +0 -99
- package/src/jscommon/umychart.wechat/umychart.user.wechat.js +0 -588
- package/src/jscommon/umychart.wechat/umychart.userlog.wechat.js +0 -240
- package/src/jscommon/umychart.wechat/umychart.vedio.wechat.js +0 -112
- package/src/jscommon/umychart.wechat/umychart.version.wechat.js +0 -36
- package/src/jscommon/umychart.wechat/umychart.wechat.3.0.js +0 -12051
- package/src/jscommon/umychart.wechat/umychart.wechat.js +0 -15460
- package/src/jscommon/umychart.worker.js +0 -114
- package/src/jscommon/umychart.ws.stock.js +0 -110
- package/src/jscommon/umychart_python/.vscode/launch.json +0 -15
- package/src/jscommon/umychart_python/__init__.py +0 -4
- package/src/jscommon/umychart_python/build.cmd +0 -2
- package/src/jscommon/umychart_python/setup.py +0 -25
- package/src/jscommon/umychart_python/umychart_cache_testcase.py +0 -165
- package/src/jscommon/umychart_python/umychart_complier_data.py +0 -781
- package/src/jscommon/umychart_python/umychart_complier_help.py +0 -175
- package/src/jscommon/umychart_python/umychart_complier_job.py +0 -193
- package/src/jscommon/umychart_python/umychart_complier_jsalgorithm.py +0 -4144
- package/src/jscommon/umychart_python/umychart_complier_jscomplier.py +0 -177
- package/src/jscommon/umychart_python/umychart_complier_jsexecute.py +0 -517
- package/src/jscommon/umychart_python/umychart_complier_jsparser.py +0 -864
- package/src/jscommon/umychart_python/umychart_complier_jssymboldata.py +0 -1238
- package/src/jscommon/umychart_python/umychart_complier_jssymboldata_cache.py +0 -146
- package/src/jscommon/umychart_python/umychart_complier_jssymboldata_json.py +0 -106
- package/src/jscommon/umychart_python/umychart_complier_pandas_help.py +0 -80
- package/src/jscommon/umychart_python/umychart_complier_scanner.py +0 -554
- package/src/jscommon/umychart_python/umychart_complier_testcase.py +0 -362
- package/src/jscommon/umychart_python/umychart_complier_util.py +0 -30
- package/src/jscommon/umychart_python/umychart_webtemplate.py +0 -131
- package/src/jscommon/umychart_python/updatehqchartweb.bat +0 -5
- package/src/jscommon/vendor.js +0 -2
- package/src/pages/block.list.demo.page/App.vue +0 -117
- package/src/pages/block.list.demo.page/index.js +0 -12
- package/src/pages/brushTool.demo.page/App.vue +0 -19
- package/src/pages/brushTool.demo.page/index.js +0 -12
- package/src/pages/container.demo.page/App.vue +0 -118
- package/src/pages/container.demo.page/index.js +0 -18
- package/src/pages/dataZoom.demo.page/App.vue +0 -265
- package/src/pages/dataZoom.demo.page/components/dataZoom.vue +0 -303
- package/src/pages/dataZoom.demo.page/index.js +0 -12
- package/src/pages/historydayline.demo.page/App.vue +0 -57
- package/src/pages/historydayline.demo.page/index.js +0 -12
- package/src/pages/hq.demo.page/App.vue +0 -163
- package/src/pages/hq.demo.page/index.js +0 -12
- package/src/pages/hqchart.black/App.vue +0 -90
- package/src/pages/hqchart.black/components/searchsymbol.vue +0 -299
- package/src/pages/hqchart.black/components/stockdrawtool.vue +0 -300
- package/src/pages/hqchart.black/components/stockfull.vue +0 -313
- package/src/pages/hqchart.black/components/stockinfo.vue +0 -428
- package/src/pages/hqchart.black/components/stockkline.demo.vue +0 -1652
- package/src/pages/hqchart.black/components/stocktradeinfo.vue +0 -1337
- package/src/pages/hqchart.black/index.js +0 -30
- package/src/pages/hqchart.black/router/candlestickChart.vue +0 -108
- package/src/pages/hqchart.black/router/pricePointsTable.vue +0 -294
- package/src/pages/hqchart.black/router/stockDeallas.vue +0 -417
- package/src/pages/hqchart.black/router/timeShareChart.vue +0 -108
- package/src/pages/hqchart.page/App.vue +0 -101
- package/src/pages/hqchart.page/index.js +0 -18
- package/src/pages/index/App.vue +0 -1408
- package/src/pages/index/index.js +0 -7
- package/src/pages/indexHq/App.vue +0 -110
- package/src/pages/indexHq/index.js +0 -18
- package/src/pages/login.demo.page/App.vue +0 -22
- package/src/pages/login.demo.page/index.js +0 -12
- package/src/pages/queryContent.demo.page/App.vue +0 -29
- package/src/pages/queryContent.demo.page/index.js +0 -18
- package/src/pages/ranking.black/App.vue +0 -199
- package/src/pages/ranking.black/index.js +0 -18
- package/src/pages/search.demo.page/App.vue +0 -28
- package/src/pages/search.demo.page/index.js +0 -12
- package/src/pages/simulatetrade.demo.page/app.vue +0 -121
- package/src/pages/simulatetrade.demo.page/index.js +0 -17
- package/src/pages/stockdeal.demo.page/App.vue +0 -63
- package/src/pages/stockdeal.demo.page/index.js +0 -19
- package/src/pages/stockdealcount.demo.page/App.vue +0 -37
- package/src/pages/stockdealcount.demo.page/index.js +0 -12
- package/src/pages/stockdeallastest.demo.page/App.vue +0 -74
- package/src/pages/stockdeallastest.demo.page/index.js +0 -18
- package/src/pages/stockinfo.demo.page/App.vue +0 -92
- package/src/pages/stockinfo.demo.page/index.html +0 -13
- package/src/pages/stockinfo.demo.page/index.js +0 -19
- package/src/pages/stockkline.demo.page/App.vue +0 -55
- package/src/pages/stockkline.demo.page/index.js +0 -18
- package/src/pages/stockmultiorder.demo.page/App.vue +0 -149
- package/src/pages/stockmultiorder.demo.page/index.js +0 -18
- package/src/pages/stockmultiperiod.demo.page/App.vue +0 -87
- package/src/pages/stockmultiperiod.demo.page/index.js +0 -18
- package/src/pages/stockorder.demo.page/App.vue +0 -69
- package/src/pages/stockorder.demo.page/index.js +0 -18
- package/src/pages/test/App.vue +0 -22
- package/src/pages/test/index.js +0 -7
- package/src/pages/tradeinfopage/app.vue +0 -40
- package/src/pages/tradeinfopage/index.js +0 -7
- package/src/pages/tradeinfopage/tradeinfo.html +0 -12
- package/src/utils/urlObj.js +0 -81
- package/src/vendor.js +0 -2
- package/webpack.config.js +0 -104
|
File without changes
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 获取开始日期 shaoshiyu
|
|
3
|
-
* today 当前时间的最近多少天:值null表示获取的是当前时间的最近多少天;指定日期的最近多少天:today格式为yy/mm/dd
|
|
4
|
-
* addDayCount 表示增加的事件,如最近一月,-1;最近一周为-7
|
|
5
|
-
* str 有值的,d(日),m(月),y(年)
|
|
6
|
-
* 出参格式 YYMMDD
|
|
7
|
-
* */
|
|
8
|
-
function startDate(today, addDayCount, str) {
|
|
9
|
-
var dd;
|
|
10
|
-
if (today) {
|
|
11
|
-
dd = new Date(today);
|
|
12
|
-
} else {
|
|
13
|
-
dd = new Date();
|
|
14
|
-
}
|
|
15
|
-
var y, m, d;
|
|
16
|
-
|
|
17
|
-
switch (str) {
|
|
18
|
-
case "d":
|
|
19
|
-
dd.setDate(dd.getDate() + addDayCount);//获取AddDayCount天后的日期
|
|
20
|
-
break;
|
|
21
|
-
case "m":
|
|
22
|
-
dd.setMonth(dd.getMonth()+ addDayCount);//获取AddDayCount天后的日期
|
|
23
|
-
break;
|
|
24
|
-
case "y":
|
|
25
|
-
// return (dd.getFullYear() * 10000 + 101).toString();
|
|
26
|
-
dd.setFullYear(dd.getFullYear() + addDayCount);
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
var value = dd.getFullYear() * 10000 + (dd.getMonth() + 1) * 100 + dd.getDate();
|
|
30
|
-
return value.toString();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 获取结束日期,即当前时间
|
|
35
|
-
* 出参格式 YYMMDD
|
|
36
|
-
**/
|
|
37
|
-
function endTime() {
|
|
38
|
-
var now = new Date();
|
|
39
|
-
var value = now.getFullYear() * 10000 + (now.getMonth() + 1) * 100 + now.getDate();
|
|
40
|
-
return value.toString();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/*
|
|
44
|
-
* 获取指定日期的最近天数
|
|
45
|
-
* 调用规则 :
|
|
46
|
-
* 第一个入参格式支持字符串:"2017/11/26"、"2017.10.27"、"20171027"、"2017-10-27"
|
|
47
|
-
* 指定日期n天前日期:date_getPointDate("2017/11/26", -30)
|
|
48
|
-
* 指定日期n天后日期:date_getPointDate("2017.10.27", 30)
|
|
49
|
-
*/
|
|
50
|
-
function date_getPointDate (currDate, num) { //num表示天数,接受正负数
|
|
51
|
-
// console.log("currDate", currDate);
|
|
52
|
-
if (!num) {//做num简单验证
|
|
53
|
-
return currDate;
|
|
54
|
-
}
|
|
55
|
-
num = Math.floor(num);
|
|
56
|
-
this.symbol = ''; //需要什么格式出参自己定义
|
|
57
|
-
|
|
58
|
-
// console.log("currDate", currDate);
|
|
59
|
-
if(currDate.indexOf('-') > -1) //格式yy-mm-dd
|
|
60
|
-
{
|
|
61
|
-
currDate = currDate.replace(/-/g, '/');
|
|
62
|
-
}
|
|
63
|
-
else if (currDate.indexOf('.') > -1) //格式yy.mm.dd
|
|
64
|
-
{
|
|
65
|
-
currDate = currDate.replace(/\./g, '/');
|
|
66
|
-
}
|
|
67
|
-
else
|
|
68
|
-
{
|
|
69
|
-
currDate = currDate.substring(0, 4) + "/" + currDate.substring(4, 6) + "/" + currDate.substring(6, 8);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
//到这一步前,currDate格式要为YY/MM/DD
|
|
73
|
-
var myDate = new Date(currDate),
|
|
74
|
-
lw = new Date(Number(myDate) + 1000 * 60 * 60 * 24 * num), //num天数
|
|
75
|
-
lastY = lw.getFullYear(),
|
|
76
|
-
lastM = lw.getMonth() + 1,
|
|
77
|
-
lastD = lw.getDate(),
|
|
78
|
-
startdate = lastY + this.symbol + (lastM < 10 ? "0" + lastM : lastM) + this.symbol + (lastD < 10 ? "0" + lastD : lastD);
|
|
79
|
-
// console.log("currDate", currDate, startdate);
|
|
80
|
-
return startdate;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
module.exports ={
|
|
85
|
-
JSCommonDate:
|
|
86
|
-
{
|
|
87
|
-
startDate: startDate,
|
|
88
|
-
endTime: endTime,
|
|
89
|
-
date_getPointDate: date_getPointDate
|
|
90
|
-
}
|
|
91
|
-
};
|
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
function QuickNews() {
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
//获取新闻列表
|
|
7
|
-
QuickNews.GetNewsList = function (newsType) {
|
|
8
|
-
switch (newsType) {
|
|
9
|
-
case NEWS_TYPE.STOCK_NEWS:
|
|
10
|
-
return new GetNews();
|
|
11
|
-
break;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
QuickNews.GetSeyyingData = function (symbol,newsType){
|
|
15
|
-
switch (newsType) {
|
|
16
|
-
case NEWS_TYPE.SETTING:
|
|
17
|
-
return new GetTactics(symbol);
|
|
18
|
-
break;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
//类型
|
|
23
|
-
var NEWS_TYPE =
|
|
24
|
-
{
|
|
25
|
-
STOCK_NEWS: 1, //快讯
|
|
26
|
-
SETTING:2 //设置
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
//快讯基类
|
|
32
|
-
function News(){
|
|
33
|
-
|
|
34
|
-
this.Data = new Array(); //快讯数据
|
|
35
|
-
this.Callback;
|
|
36
|
-
this.Count; //一共的快讯个数
|
|
37
|
-
this.CacheCount; //已下载的快讯个数
|
|
38
|
-
this.PageSize = 10; //每页的快讯个数
|
|
39
|
-
this.PageIndex = 1;
|
|
40
|
-
this.ApiUrl; //数据请求地址
|
|
41
|
-
|
|
42
|
-
this.startDate; //开始时间
|
|
43
|
-
this.endDate; //结束时间
|
|
44
|
-
|
|
45
|
-
//是否是最后一页
|
|
46
|
-
this.IsEndPage = function () {
|
|
47
|
-
if (this.Count == null || this.Count <= 0) return true;
|
|
48
|
-
|
|
49
|
-
return this.CacheCount >= this.Count;
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
//获取第1页
|
|
54
|
-
this.GetFirstPage = function () {
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
//下拉获取下一页
|
|
59
|
-
this.GetNextPage = function () {
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
//策略应对基类
|
|
65
|
-
function Tactics(symbol){
|
|
66
|
-
this.Symbol = symbol; //股票代码
|
|
67
|
-
this.Name; //股票名称
|
|
68
|
-
this.Callback; //回调 function(info,news) info: {Start:请求的新闻起始位置 , End:新闻的结束位置 }
|
|
69
|
-
this.ApiUrl; //请求地址
|
|
70
|
-
this.Data; //数据 { Symbol:代码, Name:名称, Title:标题, Content:内容, Date:日期 .....}
|
|
71
|
-
this.Error; //如果调用失败 把错误信息写这里
|
|
72
|
-
|
|
73
|
-
this.GetData = function () {
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
//请求快讯数据
|
|
81
|
-
function GetNews(){
|
|
82
|
-
this.newMethod = News; //派生
|
|
83
|
-
this.newMethod();
|
|
84
|
-
delete this.newMethod;
|
|
85
|
-
|
|
86
|
-
this.ApiUrl = 'https://opensource.zealink.com/api/LG_NewsFlashList';
|
|
87
|
-
|
|
88
|
-
var date = new Date();
|
|
89
|
-
this.endDate = date.getFullYear() * 10000 + (date.getMonth() + 1) * 100 + date.getDate(); //获取结束时间
|
|
90
|
-
this.startDate = (date.getFullYear() - 1) * 10000 + (date.getMonth() + 1) * 100 + date.getDate();
|
|
91
|
-
|
|
92
|
-
//获取第1页
|
|
93
|
-
this.GetFirstPage = function () {
|
|
94
|
-
var self = this;
|
|
95
|
-
//清空数据
|
|
96
|
-
this.Data = [];
|
|
97
|
-
this.Count = 0;
|
|
98
|
-
this.CacheCount = 0;
|
|
99
|
-
|
|
100
|
-
wx.request({
|
|
101
|
-
url: this.ApiUrl,
|
|
102
|
-
data:{
|
|
103
|
-
"PageInfo": {
|
|
104
|
-
"PageIndex": 1,
|
|
105
|
-
"PageSize": 10
|
|
106
|
-
},
|
|
107
|
-
"Filter": {
|
|
108
|
-
"QueryDate": {
|
|
109
|
-
"StartDate": this.startDate,
|
|
110
|
-
"EndDate": this.endDate
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
method: "POST",
|
|
115
|
-
dataType: "json",
|
|
116
|
-
success: function (data) {
|
|
117
|
-
self.RecvData(data);
|
|
118
|
-
},
|
|
119
|
-
fail: function (request) {
|
|
120
|
-
this.RecvError(request);
|
|
121
|
-
}
|
|
122
|
-
})
|
|
123
|
-
},
|
|
124
|
-
this.RecvData = function (recvData)
|
|
125
|
-
{
|
|
126
|
-
var data = recvData.data;
|
|
127
|
-
if (this.Count <= 0)
|
|
128
|
-
this.Count = data.count; //一共的新闻个数
|
|
129
|
-
|
|
130
|
-
var info = {};
|
|
131
|
-
info.Start = this.Data.length;
|
|
132
|
-
info.End = this.Data.length;
|
|
133
|
-
|
|
134
|
-
for (var i in data.list) {
|
|
135
|
-
var item = data.list[i];
|
|
136
|
-
this.Data.push(
|
|
137
|
-
{
|
|
138
|
-
ID: item.newsid,
|
|
139
|
-
Data: item.date,
|
|
140
|
-
Content: item.content
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
if (i > 0)++info.End;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
this.InvokeCallback(info);
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
this.RecvError = function (reqeust){
|
|
150
|
-
this.Error = "请求失败";
|
|
151
|
-
this.InvokeCallback();
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
this.InvokeCallback = function (info){
|
|
155
|
-
if (typeof (this.Callback) != 'function') return;
|
|
156
|
-
|
|
157
|
-
this.Callback(info,this);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
this.GetNextPage = function () {
|
|
161
|
-
this.PageIndex ++;
|
|
162
|
-
var self = this;
|
|
163
|
-
|
|
164
|
-
var start = this.Data.length;
|
|
165
|
-
var end = start + this.PageSize;
|
|
166
|
-
|
|
167
|
-
wx.request({
|
|
168
|
-
url: this.ApiUrl,
|
|
169
|
-
data: {
|
|
170
|
-
"PageInfo": {
|
|
171
|
-
"PageIndex": this.PageIndex,
|
|
172
|
-
"PageSize": 10
|
|
173
|
-
},
|
|
174
|
-
"Filter": {
|
|
175
|
-
"QueryDate": {
|
|
176
|
-
"StartDate": this.startDate,
|
|
177
|
-
"EndDate": this.endDate
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
method: "POST",
|
|
182
|
-
dataType: "json",
|
|
183
|
-
success: function (data) {
|
|
184
|
-
self.RecvData(data);
|
|
185
|
-
},
|
|
186
|
-
fail: function (request) {
|
|
187
|
-
this.RecvError(request);
|
|
188
|
-
}
|
|
189
|
-
})
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
//请求settings数据
|
|
194
|
-
function GetTactics(symbol){
|
|
195
|
-
this.newMethod = Tactics; //派生
|
|
196
|
-
this.newMethod(symbol);
|
|
197
|
-
delete this.newMethod;
|
|
198
|
-
|
|
199
|
-
this.ApiUrl = "http://web4.umydata.com/api/StockPolicy";
|
|
200
|
-
this.GetData = function () {
|
|
201
|
-
var self = this;
|
|
202
|
-
//清空数据
|
|
203
|
-
this.Name = null;
|
|
204
|
-
this.Error = null;
|
|
205
|
-
this.Data = null;
|
|
206
|
-
|
|
207
|
-
wx.request({
|
|
208
|
-
url: this.ApiUrl,
|
|
209
|
-
data: {
|
|
210
|
-
"symbol": [this.Symbol],
|
|
211
|
-
"index": ["位置研判-顶部区", "位置研判-风险区", "位置研判-高位区", "位置研判-中位区", "位置研判-低位区", "位置研判-底部区", "形态研判-大盘多头", "形态研判-个股多头", "文字提示-情况1","文字提示-情况2","文字提示-情况3","文字提示-情况4","文字提示-情况5","文字提示-情况6","文字提示-情况7", "文字提示-情况8", "文字提示-情况9", "文字提示-情况10", "文字提示-情况11", "文字提示-情况12", "文字提示-情况13", "文字提示-情况14", "文字提示-情况15","文字提示-情况16", "文字提示-情况17", "文字提示-情况18", "文字提示-情况19", "文字提示-情况20", "文字提示-情况21", "文字提示-情况22", "文字提示-情况23", "文字提示-情况24"],
|
|
212
|
-
"field": ["price","increase"],
|
|
213
|
-
"start": 0,
|
|
214
|
-
"end": 60
|
|
215
|
-
},
|
|
216
|
-
method: "POST",
|
|
217
|
-
dataType: "json",
|
|
218
|
-
success: function (data) {
|
|
219
|
-
self.RecvData(data);
|
|
220
|
-
},
|
|
221
|
-
fail: function (request) {
|
|
222
|
-
self.RecvError(request);
|
|
223
|
-
}
|
|
224
|
-
})
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
this.RecvData = function(recvData){
|
|
228
|
-
var data = recvData.data.list[0];
|
|
229
|
-
|
|
230
|
-
//保存所需数据
|
|
231
|
-
this.Data = {};
|
|
232
|
-
this.Data.Name = data.name;
|
|
233
|
-
this.Data.Price = data.fieldlist[0].value;
|
|
234
|
-
this.Data.Increase = data.fieldlist[1].value;
|
|
235
|
-
this.Data.Policylist = data.policylist;
|
|
236
|
-
|
|
237
|
-
this.InvokeCallback();
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
this.RecvError = function (reqeust) {
|
|
241
|
-
this.Error = "请求失败";
|
|
242
|
-
this.InvokeCallback();
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
this.InvokeCallback = function () {
|
|
246
|
-
if (typeof (this.Callback) != 'function') return;
|
|
247
|
-
|
|
248
|
-
this.Callback(this);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
module.exports =
|
|
254
|
-
{
|
|
255
|
-
JSCommonQuickNews:
|
|
256
|
-
{
|
|
257
|
-
QuickNews: QuickNews,
|
|
258
|
-
GetNews: GetNews,
|
|
259
|
-
GetTactics: GetTactics,
|
|
260
|
-
NEWS_TYPE: NEWS_TYPE
|
|
261
|
-
}
|
|
262
|
-
};
|