|
@@ -1,5 +1,6 @@
|
|
import * as echarts from '../../ec-canvas/echarts';
|
|
import * as echarts from '../../ec-canvas/echarts';
|
|
-
|
|
|
|
|
|
+var Api = require('../../utils/api.js');
|
|
|
|
+var wxRequest = require('../../utils/wxRequest.js')
|
|
var app = getApp()
|
|
var app = getApp()
|
|
function initChart(canvas, width, height, dpr, data) {
|
|
function initChart(canvas, width, height, dpr, data) {
|
|
const chart = echarts.init(canvas, null, {
|
|
const chart = echarts.init(canvas, null, {
|
|
@@ -178,6 +179,10 @@ Page({
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ var getinclast = wxRequest.postRequest(Api.getinclast());
|
|
|
|
+ getinclast.then((res)=>{
|
|
|
|
+ console.log(res)
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 滑动切换tab
|
|
// 滑动切换tab
|
|
bindChange: function(e) {
|
|
bindChange: function(e) {
|
|
@@ -202,15 +207,6 @@ Page({
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
url: '../item/item?row='+JSON.stringify(e.currentTarget.dataset.row)
|
|
url: '../item/item?row='+JSON.stringify(e.currentTarget.dataset.row)
|
|
});
|
|
});
|
|
- wx.request({
|
|
|
|
- url: 'http://192.168.1.60:6900/news/mainpage', //仅为示例,并非真实的接口地址
|
|
|
|
|
|
|
|
- header: {
|
|
|
|
- 'content-type': 'application/json' // 默认值
|
|
|
|
- },
|
|
|
|
- success (res) {
|
|
|
|
- console.log(res)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|