Commit 0e679342 by 高淑倩

add: 消费列表

parent 2edb060e
......@@ -26,12 +26,7 @@ wxService.page({
*/
onShow: function () {
// const { orderNo } = this.options
// 取会员id
const {memberId} = wx.getStorageSync('_baseUserInfo')
const orderNo = memberId
if(orderNo){
this.initOrderList(this.data.pageNo,this.data.pageSize,orderNo)
}
this.initOrderList(this.data.pageNo,this.data.pageSize)
},
goDetail(e) {
const { orderNo } = e.currentTarget.dataset
......@@ -39,12 +34,15 @@ wxService.page({
wxService.router(`/pages/consumptionDetails/consumptionDetails?orderNo=${orderNo}`)
},
//获取消费列表
initOrderList(pageNo,pageSize,orderNo){
initOrderList(pageNo,pageSize){
wx.showLoading({
title: '加载中'
})
// 取会员id
const {memberId} = wx.getStorageSync('_baseUserInfo')
const params = {
memberId: orderNo
memberId
}
wxService.post(`/sale/order/list?pageNo=${pageNo}&pageSize=${pageSize}`,params).then(res => {
const {result,data} = res.data
......@@ -77,7 +75,8 @@ wxService.page({
pageSize: 10,
noMore: true
})
this.initOrderList(this.data.pageNo, this.data.pageSize)
//
this.initOrderList(this.data.pageNo, this.data.pageSize,)
}else {
this.setData({
noMore: true
......
......@@ -10,5 +10,7 @@
</view>
</view>
</scroll-view>
<no-more wx:if="{{noMore}}"/>
<view class="no-bottom">
<no-more wx:if="{{noMore}}"/>
</view>
</view>
......@@ -27,4 +27,7 @@ page{
}
.fail-status{
color: #999999;
}
.no-bottom {
margin: 50rpx 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment