|
@@ -169,14 +169,14 @@ Page({
|
|
|
|
|
|
imagewidth: 0,//缩放后的宽
|
|
|
imageheight: 0,//缩放后的高
|
|
|
- // chartData:{
|
|
|
- // actual:[552,586,3555,4454,552,556,4455],
|
|
|
- // prediction:[552,546,3585,4424,542,546,35,44,524,56,355,444,2224,421],
|
|
|
- // timeData : [
|
|
|
- // '2020/6/1', '2020/6/2', '2020/6/3', '2020/6/4', '2020/6/5', '2020/6/6', '2020/6/7', '2020/6/8', '2020/6/9', '2020/6/10','2020/6/11',
|
|
|
- // '2020/6/12','2020/6/13','2020/6/14',
|
|
|
- // ]
|
|
|
- // },
|
|
|
+ chartData:{
|
|
|
+ // actual:[552,586,3555,4454,552,556,4455],
|
|
|
+ // prediction:[552,546,3585,4424,542,546,35,44,524,56,355,444,2224,421],
|
|
|
+ // timeData : [
|
|
|
+ // '2020/6/1', '2020/6/2', '2020/6/3', '2020/6/4', '2020/6/5', '2020/6/6', '2020/6/7', '2020/6/8', '2020/6/9', '2020/6/10','2020/6/11',
|
|
|
+ // '2020/6/12','2020/6/13','2020/6/14',
|
|
|
+ // ]
|
|
|
+ },
|
|
|
chartDatas:{
|
|
|
// actual:[572,556,3555,4744,552,576,3555],
|
|
|
// prediction:[352,246,385,2424,542,546,255],
|
|
@@ -314,9 +314,9 @@ Page({
|
|
|
url: '../logs/logs'
|
|
|
})
|
|
|
},
|
|
|
- //沪深
|
|
|
- getHushen:function(){
|
|
|
- apiServer.getHushen().then((res) =>{
|
|
|
+ //上证
|
|
|
+ getHz:function(){
|
|
|
+ apiServer.getHz().then((res) =>{
|
|
|
if(res.statusCode == 200){
|
|
|
console.log(res);
|
|
|
this.setData({
|
|
@@ -325,6 +325,17 @@ Page({
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ //深证
|
|
|
+ getSz:function(){
|
|
|
+ apiServer.getSz().then((res) =>{
|
|
|
+ if(res.statusCode == 200){
|
|
|
+ console.log(res);
|
|
|
+ this.setData({
|
|
|
+ chartData:this.recursion(res.data.data),
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
recursion:function(row,a=[],b=[],c=[],d){
|
|
|
for(let i in row.actuals){
|
|
|
a.unshift(row.actuals[i].industryDate)
|
|
@@ -346,8 +357,9 @@ Page({
|
|
|
// }).exec();
|
|
|
},
|
|
|
onLoad: function (options) {
|
|
|
+ this.getHz();
|
|
|
+ this.getSz();
|
|
|
getNewsList(this);
|
|
|
- this.getHushen();
|
|
|
let sysinfo = wx.getSystemInfoSync(),
|
|
|
windowHeight = sysinfo.windowHeight,
|
|
|
statusHeight = sysinfo.statusBarHeight,
|
|
@@ -404,12 +416,14 @@ Page({
|
|
|
*/
|
|
|
onPullDownRefresh: function () {
|
|
|
//下拉刷新,重新初始化,isMerge = false
|
|
|
+ console.log("1312432");
|
|
|
getNewsList(this);
|
|
|
},
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
onReachBottom: function () {
|
|
|
+ console.log("触发")
|
|
|
setPage(this);
|
|
|
},
|
|
|
computeScrollViewHeight() {
|