Commit b699da7e by 高淑倩

modify: 积分商城接口

parent 53ebb429
......@@ -29,40 +29,40 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.initIntegralCouponList(this.data.pageNo, this.data.pageSize)
this.initIntegralCouponList()
},
// 积分兑换优惠券列表
initIntegralCouponList(pageNo,pageSize) {
initIntegralCouponList() {
wx.showLoading({
title: '加载中'
})
wxService.get(`/coupon/pointsRedemptionCouponSetting/findPage?pageNo=${pageNo}&pageSize=${pageSize}&query=${this.data.query}`).then(res => {
// wxService.get(`/coupon/pointsRedemptionCouponSetting/findPage?pageNo=${pageNo}&pageSize=${pageSize}&query=${this.data.query}`).then(res => {
// const {result,data} = res.data
// if(result == 0){
// wx.hideLoading()
// this.setData({
// integralCouponList: this.data.pageNo == 1? [...data.content]: [...this.data.integralCouponList,...data.content],
// totalPages: data.totalPages
// })
// }
// }).finally(() => {
// wx.hideLoading();
// })
// 查询所有生效中的活动
wxService.get(`/coupon/pointsRedemptionCouponSetting/getAllValid`).then(res => {
const {result,data} = res.data
if(result == 0){
wx.hideLoading()
this.setData({
integralCouponList: this.data.pageNo == 1? [...data.content]: [...this.data.integralCouponList,...data.content],
totalPages: data.totalPages
integralCouponList: data
})
}
}).finally(() => {
wx.hideLoading();
})
// 查询所有生效中的活动
// wxService.get(`/coupon/pointsRedemptionCouponSetting/getAllValid`).then(res => {
// const {result,data} = res.data
// if(result == 0){
// wx.hideLoading()
// this.setData({
// })
// }
// }).finally(() => {
// wx.hideLoading();
// })
},
//立即兑换
exchange(e){
......@@ -90,17 +90,17 @@ wxService.page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if (this.data.pageNo < this.data.totalPages) {
this.setData({
pageNo: this.data.pageNo + 1,
pageSize: 10,
noMore: true
})
this.initIntegralCouponList(this.data.pageNo, this.data.pageSize)
} else {
this.setData({
noMore: true
})
}
// if (this.data.pageNo < this.data.totalPages) {
// this.setData({
// pageNo: this.data.pageNo + 1,
// pageSize: 10,
// noMore: true
// })
// this.initIntegralCouponList(this.data.pageNo, this.data.pageSize)
// } else {
// this.setData({
// noMore: true
// })
// }
},
})
\ No newline at end of file
......@@ -23,5 +23,5 @@
</view>
</view>
<exchange-coupon-modal exchangeId="{{exchangeId}}" exchangePoint="{{exchangePoint}}" isExchange='{{isExchange}}'/>
<no-more wx:if="{{noMore}}"/>
<!--<no-more wx:if="{{noMore}}"/>-->
</view>
......@@ -4,7 +4,7 @@
.integral-vip-rules{
width:140rpx;
height:35rpx;
line-height: 35rpx;
line-height: 40rpx;
text-align: center;
color: rgb(64, 205, 147);
font-size: 28rpx;
......@@ -80,7 +80,7 @@
color: #ffffff;
position: absolute;
right: 20rpx;
top: 30rpx;
top: 48rpx;
width: 24rpx;
word-wrap: break-word;
font-weight: bold;
......
......@@ -83,7 +83,7 @@ scroll-view{
color: #ffffff;
position: absolute;
right: 20rpx;
top: 30rpx;
top: 48rpx;
width: 24rpx;
word-wrap: break-word;
font-weight: bold;
......
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