Commit b699da7e by 高淑倩

modify: 积分商城接口

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