Commit 0e679342 by 高淑倩

add: 消费列表

parent 2edb060e
...@@ -26,12 +26,7 @@ wxService.page({ ...@@ -26,12 +26,7 @@ wxService.page({
*/ */
onShow: function () { onShow: function () {
// const { orderNo } = this.options // const { orderNo } = this.options
// 取会员id this.initOrderList(this.data.pageNo,this.data.pageSize)
const {memberId} = wx.getStorageSync('_baseUserInfo')
const orderNo = memberId
if(orderNo){
this.initOrderList(this.data.pageNo,this.data.pageSize,orderNo)
}
}, },
goDetail(e) { goDetail(e) {
const { orderNo } = e.currentTarget.dataset const { orderNo } = e.currentTarget.dataset
...@@ -39,12 +34,15 @@ wxService.page({ ...@@ -39,12 +34,15 @@ wxService.page({
wxService.router(`/pages/consumptionDetails/consumptionDetails?orderNo=${orderNo}`) wxService.router(`/pages/consumptionDetails/consumptionDetails?orderNo=${orderNo}`)
}, },
//获取消费列表 //获取消费列表
initOrderList(pageNo,pageSize,orderNo){ initOrderList(pageNo,pageSize){
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
}) })
// 取会员id
const {memberId} = wx.getStorageSync('_baseUserInfo')
const params = { const params = {
memberId: orderNo memberId
} }
wxService.post(`/sale/order/list?pageNo=${pageNo}&pageSize=${pageSize}`,params).then(res => { wxService.post(`/sale/order/list?pageNo=${pageNo}&pageSize=${pageSize}`,params).then(res => {
const {result,data} = res.data const {result,data} = res.data
...@@ -77,7 +75,8 @@ wxService.page({ ...@@ -77,7 +75,8 @@ wxService.page({
pageSize: 10, pageSize: 10,
noMore: true noMore: true
}) })
this.initOrderList(this.data.pageNo, this.data.pageSize) //
this.initOrderList(this.data.pageNo, this.data.pageSize,)
}else { }else {
this.setData({ this.setData({
noMore: true noMore: true
......
...@@ -10,5 +10,7 @@ ...@@ -10,5 +10,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<no-more wx:if="{{noMore}}"/> <view class="no-bottom">
<no-more wx:if="{{noMore}}"/>
</view>
</view> </view>
...@@ -27,4 +27,7 @@ page{ ...@@ -27,4 +27,7 @@ page{
} }
.fail-status{ .fail-status{
color: #999999; 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