...
|
...
|
@@ -10,7 +10,10 @@ |
|
|
data: {
|
|
|
current: 0,
|
|
|
chargenum: "",
|
|
|
page: 0,
|
|
|
group_page_number: 1,
|
|
|
record_page_number: 1,
|
|
|
group_has_more: true,
|
|
|
record_has_more: true,
|
|
|
groupList: [],
|
|
|
recordList: [],
|
|
|
pay_info: [],
|
...
|
...
|
@@ -88,23 +91,28 @@ |
|
|
|
|
|
//成交记录
|
|
|
record() {
|
|
|
if(!this.data.record_has_more) return;
|
|
|
this.setData({record_has_more: false});
|
|
|
let url = '/portal/Group/group_complete'
|
|
|
let params = {
|
|
|
page: this.data.page
|
|
|
page: this.data.record_page_number
|
|
|
}
|
|
|
let header = {
|
|
|
"XX-Token": wx.getStorageSync('token')
|
|
|
}
|
|
|
app.post(url, params, header).then((res) => {
|
|
|
var recordList = res.list
|
|
|
for (var i = 0; i < recordList.length; i++) {
|
|
|
var chargeTime = recordList[i].create_time
|
|
|
chargeTime = time.formatTimeTwo(chargeTime, 'Y-M-D')
|
|
|
recordList[i].create_time = chargeTime
|
|
|
console.log(res)
|
|
|
if(res.this_page < res.total_page) {
|
|
|
this.setData({record_has_more: true});
|
|
|
}
|
|
|
this.setData({
|
|
|
recordList: recordList
|
|
|
})
|
|
|
var recordList= res.list
|
|
|
for(var i=0;i<recordList.length;i++){
|
|
|
var chargeTime = recordList[i].create_time
|
|
|
chargeTime = time.formatTimeTwo(chargeTime, 'Y-M-D')
|
|
|
console.log(chargeTime)
|
|
|
recordList[i].create_time = chargeTime
|
|
|
}
|
|
|
this.setData({recordList: this.data.recordList.concat(recordList)});
|
|
|
})
|
|
|
},
|
|
|
|
...
|
...
|
@@ -196,9 +204,11 @@ |
|
|
|
|
|
//参与的组团
|
|
|
takeGroup() {
|
|
|
if(!this.data.group_has_more) return;
|
|
|
this.setData({group_has_more: false});
|
|
|
let url = '/portal/Group/group_list'
|
|
|
let params = {
|
|
|
page: this.data.page
|
|
|
page: this.data.group_page_number
|
|
|
}
|
|
|
let header = {
|
|
|
"XX-Token": wx.getStorageSync('token')
|
...
|
...
|
@@ -224,10 +234,14 @@ |
|
|
});
|
|
|
// console.log(endTimeList)
|
|
|
this.countDown();
|
|
|
if(res.this_page < res.total_page) {
|
|
|
this.setData({group_has_more: true});
|
|
|
}
|
|
|
// console.log('list', list);
|
|
|
this.setData({
|
|
|
groupList: res.list,
|
|
|
goodsList: goodsList
|
|
|
})
|
|
|
groupList: this.data.groupList.concat(res.list),
|
|
|
goodsList: goodsList
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
|
...
|
...
|
@@ -299,6 +313,36 @@ |
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
onReachBottom: function () {
|
|
|
const self = this;
|
|
|
if(+self.data.current === 0) {
|
|
|
if(self.data.group_has_more) {
|
|
|
self.data.group_page_number ++;
|
|
|
self.takeGroup();
|
|
|
}else {
|
|
|
wx.showToast({
|
|
|
title: '没有更多数据了~',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
}
|
|
|
console.log('上拉加载');
|
|
|
}else if(+self.data.current === 1) {
|
|
|
if(self.data.record_has_more) {
|
|
|
self.data.record_page_number ++;
|
|
|
self.record();
|
|
|
}else {
|
|
|
wx.showToast({
|
|
|
title: '没有更多数据了~',
|
|
|
icon: 'none'
|
|
|
});
|
|
|
}
|
|
|
console.log('上拉加载');
|
|
|
}
|
|
|
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
...
|
...
|
@@ -335,13 +379,6 @@ |
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
onReachBottom: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 用户点击右上角分享
|
|
|
*/
|
|
|
onShareAppMessage: function() {
|
...
|
...
|
|