|
@@ -22,7 +22,7 @@ Page({
|
|
|
slowFree:0,
|
|
|
fastSum:0,
|
|
|
slowSum:0,
|
|
|
- pagesize:30,
|
|
|
+ pagesize:10,
|
|
|
pagenum:1,
|
|
|
total:-1,
|
|
|
loadTotal: 0,
|
|
@@ -159,9 +159,27 @@ Page({
|
|
|
chargid,
|
|
|
sumprice
|
|
|
});
|
|
|
-
|
|
|
+ this.fastAndSlow()
|
|
|
this.getPage();
|
|
|
},
|
|
|
+ fastAndSlow(e){
|
|
|
+ let that = this;
|
|
|
+ wx.request({
|
|
|
+ url: getApp().globalData.postHeadAgreement +'/restapi/wechat/fastAndSlow',
|
|
|
+ data: {
|
|
|
+ id: that.data.chargid,
|
|
|
+ },
|
|
|
+ method: 'POST',
|
|
|
+ success(res) {
|
|
|
+ that.setData({
|
|
|
+ fastFree : res.data.fastFree,
|
|
|
+ slowFree : res.data.slowFree,
|
|
|
+ fastSum : res.data.fastSum,
|
|
|
+ slowSum : res.data.slowSum
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
previewImage(e){
|
|
|
var that = this,
|
|
|
//获取当前图片的下表
|
|
@@ -176,7 +194,6 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
getPage(){
|
|
|
-
|
|
|
if(this.data.chargList.length == this.data.total){
|
|
|
this.setData({
|
|
|
finishedLoadTap:this.data.finishedLoadTap+1
|
|
@@ -210,11 +227,12 @@ Page({
|
|
|
data: {
|
|
|
id: that.data.chargid,
|
|
|
pagenum: this.data.pagenum++,
|
|
|
- pagesize: 30,
|
|
|
+ pagesize: 10,
|
|
|
},
|
|
|
method: 'POST',
|
|
|
success(res) {
|
|
|
console.log(res);
|
|
|
+ console.log(that.data.pagenum+":num");
|
|
|
let chargList = res.data.chargList.rows;
|
|
|
|
|
|
chargList.forEach(key => {
|
|
@@ -245,7 +263,7 @@ Page({
|
|
|
wx.hideLoading()
|
|
|
that.setData({
|
|
|
chargList: that.data.chargList.concat(chargList),
|
|
|
- total: res.data.chargList.total,
|
|
|
+ total: res.data.total,
|
|
|
dataLoading: false,
|
|
|
fastFree : res.data.fastFree,
|
|
|
slowFree : res.data.slowFree,
|