...
|
...
|
@@ -9,7 +9,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: [],
|
...
|
...
|
@@ -75,42 +78,49 @@ |
|
|
|
|
|
//参与的组团
|
|
|
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')
|
|
|
}
|
|
|
app.post(url, params, header).then((res) => {
|
|
|
console.log(res)
|
|
|
this.setData({
|
|
|
groupList: res.list
|
|
|
})
|
|
|
if(res.this_page < res.total_page) {
|
|
|
this.setData({group_has_more: true});
|
|
|
}
|
|
|
// console.log('list', list);
|
|
|
this.setData({groupList: this.data.groupList.concat(res.list)});
|
|
|
})
|
|
|
},
|
|
|
|
|
|
//成交记录
|
|
|
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) => {
|
|
|
console.log(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')
|
|
|
console.log(chargeTime)
|
|
|
recordList[i].create_time = chargeTime
|
|
|
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)});
|
|
|
})
|
|
|
},
|
|
|
|
...
|
...
|
@@ -210,6 +220,36 @@ |
|
|
this.PayDetail()
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
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('上拉加载');
|
|
|
}
|
|
|
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
*/
|
...
|
...
|
@@ -246,13 +286,6 @@ |
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
*/
|
|
|
onReachBottom: function() {
|
|
|
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 用户点击右上角分享
|
|
|
*/
|
|
|
onShareAppMessage: function() {
|
...
|
...
|
|