Commit 75b3d33f by 高淑倩

个人中心

parent c3a9014c
...@@ -28,7 +28,7 @@ wxService.page({ ...@@ -28,7 +28,7 @@ wxService.page({
pageBackgroundColor: 0, pageBackgroundColor: 0,
guidePageModalShow: false, guidePageModalShow: false,
currHomePageId: '', currHomePageId: '',
skuVOList:[] skuVOList: []
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -86,9 +86,9 @@ wxService.page({ ...@@ -86,9 +86,9 @@ wxService.page({
isAuthorization: false isAuthorization: false
}, () => { }, () => {
// 积分数量 // 积分数量
// this.getMemberPointInfo() this.getMemberPointInfo()
// 优惠券数量 // 优惠券数量
// this.getMemberCouponInfo() this.getMemberCouponInfo()
}) })
} }
else if (!baseUserInfo && reLoginErrFlag) { else if (!baseUserInfo && reLoginErrFlag) {
...@@ -101,23 +101,6 @@ wxService.page({ ...@@ -101,23 +101,6 @@ wxService.page({
isAuthorization: true isAuthorization: true
}) })
} }
// if (baseUserInfo){
// this.setData({
// token: wx.getStorageSync('token'),
// baseUserInfo,
// // cardMember,
// isAuthorization: false
// })
// // 积分数量
// this.getMemberPointInfo()
// // 优惠券数量
// this.getMemberCouponInfo()
// } else {
// this.setData({
// isAuthorization: true
// })
// }
// 获取plus购买信息 // 获取plus购买信息
this.getPlusPurchase() this.getPlusPurchase()
// 获取手机信息 // 获取手机信息
...@@ -134,12 +117,59 @@ wxService.page({ ...@@ -134,12 +117,59 @@ 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 信息 // page 信息
initPage(pageId) { initPage() {
this.setData({ this.setData({
products: [] pages: [],
products: [],
groupLoadState: 'complete', // 活动分组加载标志
homeApiLoading: true,
render: null, // 渲染页面数据对象(安全渲染)
isLastPage: false, // 页面段落加载完成
renderPageOver: false, // 渲染页面结束
// isAuthorization: true,
outoHeigth: 500,
}) })
handlerDataOnPage = new utils.HandlerDataOnPage()
renderPage = require('../../utils/renderPage').getRenderPage()
handlerDataOnPage.init(this, 'pages')
this.initHomePage()
},
initHomePage() {
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
}) })
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)--> <!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem"> <block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<view wx:if="{{pItem.type == 1}}"> <view wx:if="{{pItem.type == 1}}">
<image-swiper image-data="{{pItem.rotationchart.images}}" /> <image-swiper image-data="{{pItem.rotationchart.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 2}}"> <view class="" wx:if="{{pItem.type == 2}}">
<person-center person-data="{{pItem.customer}}" /> <person-center isVip="{{isVip}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 3}}"> <view class="" wx:if="{{pItem.type == 3}}">
<pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"/> <pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 4}}"> <view class="" wx:if="{{pItem.type == 4}}">
<bottom bottom="{{pItem.bottom}}" /> <bottom bottom="{{pItem.bottom}}" />
...@@ -17,18 +17,18 @@ ...@@ -17,18 +17,18 @@
<bottom-tabs currHomePageId="{{currHomePageId}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" tab-bar="{{pItem.tabBar}}" bind:updatePage="updatePage"/> <bottom-tabs currHomePageId="{{currHomePageId}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" tab-bar="{{pItem.tabBar}}" bind:updatePage="updatePage"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 6}}"> <view class="" wx:if="{{pItem.type == 6}}">
<announcement notice="{{pItem.notice}}" /> <announcement notice="{{pItem.notice}}"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 7}}"> <view class="" wx:if="{{pItem.type == 7}}">
<tab-sort category-type="{{pItem.categoryType}}" /> <tab-sort currHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view> </view>
<view class="" wx:if="{{pItem.type == 8}}"> <view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" /> <attention focus-wx="{{pItem.focusWx}}" />
</view> </view>
<view class="" wx:if="{{pItem.type == 9}}"> <view class="" wx:if="{{pItem.type == 9}}">
<plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}" currentHasUserInfo="{{currentHasUserInfo}}"/> <plus sku-list="{{skuVOList}}" plus-bgi="{{pItem.plus}}" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
</view> </view>
</block> </block>
</view> </view>
<guide-page-modal show="{{guidePageModalShow}}" /> <guide-page-modal show="{{guidePageModalShow}}" />
<!--<authorization-modal isAuthorization='{{isAuthorization}}'/>--> <share-benefit-modal show="{{shareBenefitModalShow}}" benefit-data="{{benefitData}}"/>
\ No newline at end of file
...@@ -299,7 +299,6 @@ wxService.page({ ...@@ -299,7 +299,6 @@ wxService.page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function (res) { onShareAppMessage: function (res) {
//修改为参数memberId //修改为参数memberId
const { memberId, member } = wx.getStorageSync('_baseUserInfo') const { memberId, member } = wx.getStorageSync('_baseUserInfo')
var path = `pages/userCenter/userCenter`; var path = `pages/userCenter/userCenter`;
......
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