Commit 50e8ad4d by 谢中龙

提交版本

parent 314cbc55
......@@ -31,6 +31,8 @@
font-size: 28rpx;
}
/* 卡劵列表 */
.coupon-wrap{
padding: 20rpx;
......
......@@ -19,7 +19,7 @@ wxService.page({
}
],
pageNo: 1,
pageSize: 10,
pageSize: 20,
invalidPageNo: 1,
totalPages: 0,
totalElements: 0,
......@@ -44,10 +44,10 @@ wxService.page({
}
// 可使用
if( current == 0 ){
this.getCouponList(1,10,1)
this.getCouponList(1,20,1)
}else if( current == 1){
// 失效
this.getCouponList(1,10,0)
this.getCouponList(1,30,0)
}
},
// 点击切换
......@@ -64,10 +64,10 @@ wxService.page({
}
// 可使用
if( current == 0 ){
this.getCouponList(1,10,1)
this.getCouponList(1,20,1)
}else if( current == 1){
// 失效
this.getCouponList(1,10,0)
this.getCouponList(1,30,0)
}
},
/**
......@@ -79,8 +79,8 @@ wxService.page({
*/
onShow () {
// 可使用 已失效
this.getCouponList(1,10,1)
this.getCouponList(1,10,0)
this.getCouponList(1,20,1)
this.getCouponList(1,30,0)
},
handelPresentCouponDetail(e) {
let {cardno} = e.currentTarget.dataset
......@@ -175,17 +175,23 @@ wxService.page({
})
}
} else {
if ( invalidPageNo < invalidTotalPages) {
this.setData({
invalidPageNo: invalidPageNo + 1,
})
// status 0
this.getCouponList(this.data.invalidPageNo, pageSize, 0)
} else {
this.setData({
noMoreCouponInvalid: true
})
}
// if ( invalidPageNo < invalidTotalPages) {
// this.setData({
// invalidPageNo: invalidPageNo + 1,
// })
// // status 0
// this.getCouponList(this.data.invalidPageNo, pageSize, 0)
// } else {
// this.setData({
// noMoreCouponInvalid: true
// })
// }
this.setData({
noMoreCouponInvalid: true
})
}
},
})
\ No newline at end of file
......@@ -13,7 +13,12 @@ wxService.page({
pageNo: 1,
pageSize: 30,
integralList: [],
noMore: false
noMore: false,
memberPoint : {
total: '--',
expirePoint: 0,
expireDate: ''
}
},
/**
* 生命周期函数--监听页面加载
......@@ -23,6 +28,27 @@ wxService.page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
//查询会员积分信息
getMemberIntegrateInfo() {
// wx.showLoading({
// title: '数据请求中..',
// });
const { memberId } = wx.getStorageSync('_baseUserInfo')
if (!memberId) {
return;
}
wxService.get(`/member/memberPoint/getMemberPointInfo?memberId=${memberId}`).then(res => {
let data = res.data.data ? res.data.data : {};
this.data.memberPoint.total = data.point ? data.point : 0;
this.data.memberPoint.expirePoint = data.pointWillExpired ? data.pointWillExpired : 0;
let expireDate = data.pointExpiredTime ? data.pointExpiredTime : '';
this.data.memberPoint.expireDate = expireDate;
this.setData({
memberPoint: this.data.memberPoint
});
});
},
/**
* 生命周期函数--监听页面显示
*/
......@@ -31,6 +57,7 @@ wxService.page({
this.getIntegralList()
// 查询会员积分信息
this.getMemberPointInfo()
this.getMemberIntegrateInfo();
},
// 查询会员积分信息
getMemberPointInfo(){
......
<!--pages/integralWater.wxml-->
<view class='integral'>
<view class="integral-detail">
<!-- <view class="integral-detail">
<view class="integral-num">
<view class="num-current">{{integralNum}}</view>
<view class="num-title">当前积分</view>
</view>
<view class="integral-vip-rules" bindtap="handleGoMemberRulesRules">积分规则</view>
</view>
</view> -->
<view class='mall-title'>
<view class='title-num-point'>
<view class='title-img-point'>
<view class='img-point'>
<image class="point-img" src='/assets/imgs/point.png' mode="widthFix" />
</view>
<view class='text-point'>
{{memberPoint.total}}
</view>
</view>
<view class='integral-vip-rules' bindtap="handleGoMemberRulesRules">积分规则</view>
</view>
<view class='title-time-point' wx:if="{{memberPoint.expirePoint > 0}}">
{{memberPoint.expirePoint}} 积分将于 {{memberPoint.expireDate}} 清零
</view>
<view class='title-time-point' wx:if="{{memberPoint.expirePoint == 0}}">
暂无将过期积分
</view>
</view>
<view wx:if="{{!integralList.length}}" class="detail-list-no">还没有任何积分记录</view>
<view wx:if="{{integralList.length}}">
......
/* pages/integralWater.wxss */
page{
background: #ffffff;
}
.integral{
margin: 30rpx;
padding-bottom: 50rpx;
border-top: 1px solid rgba(151, 151, 151, 0.1);
}
.detail-left{
width: 50%;
}
.text-point {
color: rgba(51, 51, 51, 1);
font-size: 42rpx;
margin-left: 10rpx;
}
.mall-title {
height: 150rpx;
padding-left: 50rpx;
padding-right: 42rpx;
box-sizing: border-box;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 8px 5px rgba(0, 0, 0, 0.05),
0px 0px 3px 0px rgba(0, 0, 0, 0.03);
}
.title-num-point {
padding-top: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.integral-vip-rules {
width: 133rpx;
height: 42rpx;
line-height: 42rpx;
border-radius: 34rpx;
font-size: 23rpx;
text-align: center;
border: 1px solid rgba(204, 204, 204, 1);
}
.title-time-point {
color: rgba(102, 102, 102, 1);
font-size: 24rpx;
text-align: left;
padding-top: 3rpx;
margin-top: 15rpx;
}
.point-img {
width: 28rpx;
height: 36rpx;
}
.title-img-point {
display: flex;
align-items: center;
}
.integral-detail{
border-radius: 10rpx;
padding-left: 43%;
padding-left: 30rpx;
height: 150rpx;
box-shadow: 0 0 10px #ccc ;
background-repeat: no-repeat;
......@@ -21,7 +73,7 @@
text-align:center;
padding-top: 34rpx;
}
.integral-vip-rules{
/* .integral-vip-rules{
width:100rpx;
height:33rpx;
line-height: 33rpx;
......@@ -37,7 +89,7 @@
vertical-align:top;
margin-top: 25rpx;
margin-bottom: 40rpx;
}
} */
.num-current {
font-size: 36rpx;
color: #333;
......@@ -47,11 +99,12 @@
color:#666
}
.integral-tips {
padding: 45rpx 0
padding: 45rpx 30rpx;
}
.tips-detail{
font-size: 24rpx;
color: #333;
margin-bottom: 10rpx;
}
.tips-much {
font-size: 28rpx;
......@@ -75,7 +128,7 @@
.detail-num{
font-size: 25rpx;
text-align: left;
width:10%;
width: auto;
padding-top:20rpx;
}
.add {
......@@ -87,7 +140,7 @@
.detail-integral{
display: flex;
justify-content: space-between;
padding: 0 60rpx 0 30rpx;
padding: 0 40rpx;
margin-bottom: 20rpx;
}
.detail-list-no {
......
......@@ -5,7 +5,7 @@
<view class='title-num-point'>
<view class='title-img-point'>
<view class='img-point'>
<image class="point-img" src='/assets/imgs/integral_exchange/point.png' mode="widthFix" />
<image class="point-img" src='/assets/imgs/point.png' mode="widthFix" />
</view>
<view class='text-point'>
{{memberPoint.total}}
......
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