Commit 2ca9cf72 by 高淑倩

个人中心

parent 8a4aaf8b
......@@ -14,6 +14,7 @@
margin: 18rpx 0;
border-radius: 7rpx;
box-shadow: 0 0 40rpx 1rpx #ccc;
margin: 0 auto;
}
.person-num {
margin-bottom: 20rpx;
......
......@@ -86,9 +86,9 @@ wxService.page({
isAuthorization: false
}, () => {
// 积分数量
// this.getMemberPointInfo()
this.getMemberPointInfo()
// 优惠券数量
// this.getMemberCouponInfo()
this.getMemberCouponInfo()
})
}
else if (!baseUserInfo && reLoginErrFlag) {
......@@ -134,7 +134,40 @@ wxService.page({
})
}
},
// 查询积分信息
getMemberPointInfo() {
wx.showLoading({
title: '加载中'
})
wxService.get(`/member/memberPoint/getMyPointInfo`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
wx.hideLoading()
this.setData({
integralNum: data && data.point || 0
})
}
}
})
},
// 查询优惠券数量
getMemberCouponInfo() {
wx.showLoading({
title: '加载中'
})
wxService.post(`/coupon/coupon/memberCouponCount`).then(res => {
if (res) {
const { result, data } = res && res.data
if (result == 0) {
wx.hideLoading()
this.setData({
couponNum: data && data[1] || 0
})
}
}
})
},
// page 信息
initPage(pageId) {
this.setData({
......
......@@ -6,7 +6,7 @@
<image-swiper image-data="{{pItem.rotationchart.images}}" />
</view>
<view class="" wx:if="{{pItem.type == 2}}">
<person-center person-data="{{pItem.customer}}" />
<person-center base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
</view>
<view class="" wx:if="{{pItem.type == 3}}">
<pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"/>
......
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