|
...
|
...
|
@@ -24,7 +24,6 @@ Page({ |
|
|
|
sellerid: options.sellerid
|
|
|
|
})
|
|
|
|
}
|
|
|
|
if (type == 1) this.getInfo(options.sellerid)
|
|
|
|
},
|
|
|
|
getSeller() {
|
|
|
|
let type = this.data.type;
|
|
...
|
...
|
@@ -36,6 +35,7 @@ Page({ |
|
|
|
}, '/pages/me/myBalance')
|
|
|
|
})
|
|
|
|
},
|
|
|
|
// 获取消费金明细
|
|
|
|
getInfo(sellerid) {
|
|
|
|
App.Activity.GetConsumeListByOpenid({
|
|
|
|
openid: getApp().openid,
|
|
...
|
...
|
@@ -47,6 +47,25 @@ Page({ |
|
|
|
i.balance = (i.balance * 1).toFixed(2)
|
|
|
|
i.cdateInfo = i.cdate ? util.unixtoTime(i.cdate, 'YYYY-MM-DD HH:II') : '';
|
|
|
|
})
|
|
|
|
consumeList.sort((a, b) => (b.cdate * 1) - (a.cdate * 1));
|
|
|
|
this.setData({
|
|
|
|
consumeList
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
// 获取余额明细
|
|
|
|
getBalanceList(sellerid) {
|
|
|
|
App.Activity.GetBalanceListByOpenid({
|
|
|
|
openid: getApp().openid,
|
|
|
|
sellerid
|
|
|
|
}).then(res => {
|
|
|
|
let consumeList = res.data;
|
|
|
|
consumeList.forEach(i => {
|
|
|
|
i.price = (i.price * 1).toFixed(2)
|
|
|
|
i.balance = (i.balance * 1).toFixed(2)
|
|
|
|
i.cdateInfo = i.cdate ? util.unixtoTime(i.cdate, 'YYYY-MM-DD HH:II') : '';
|
|
|
|
})
|
|
|
|
consumeList.sort((a, b) => (b.cdate * 1) - (a.cdate * 1));
|
|
|
|
this.setData({
|
|
|
|
consumeList
|
|
|
|
})
|
|
...
|
...
|
@@ -63,7 +82,8 @@ Page({ |
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow() {
|
|
|
|
|
|
|
|
if (this.data.type == 1) this.getInfo(this.data.sellerid)
|
|
|
|
if (this.data.type == 2) this.getBalanceList(this.data.sellerid)
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|