Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
75b3d33f
Commit
75b3d33f
authored
Oct 10, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人中心
parent
c3a9014c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
33 deletions
+63
-33
my.js
src/pages/my/my.js
+54
-24
my.wxml
src/pages/my/my.wxml
+9
-8
userCenter.js
src/pages/userCenter/userCenter.js
+0
-1
No files found.
src/pages/my/my.js
View file @
75b3d33f
...
...
@@ -28,7 +28,7 @@ wxService.page({
pageBackgroundColor
:
0
,
guidePageModalShow
:
false
,
currHomePageId
:
''
,
skuVOList
:[]
skuVOList
:
[]
},
/**
* 生命周期函数--监听页面加载
...
...
@@ -86,9 +86,9 @@ wxService.page({
isAuthorization
:
false
},
()
=>
{
// 积分数量
//
this.getMemberPointInfo()
this
.
getMemberPointInfo
()
// 优惠券数量
//
this.getMemberCouponInfo()
this
.
getMemberCouponInfo
()
})
}
else
if
(
!
baseUserInfo
&&
reLoginErrFlag
)
{
...
...
@@ -101,23 +101,6 @@ wxService.page({
isAuthorization
:
true
})
}
// if (baseUserInfo){
// this.setData({
// token: wx.getStorageSync('token'),
// baseUserInfo,
// // cardMember,
// isAuthorization: false
// })
// // 积分数量
// this.getMemberPointInfo()
// // 优惠券数量
// this.getMemberCouponInfo()
// } else {
// this.setData({
// isAuthorization: true
// })
// }
// 获取plus购买信息
this
.
getPlusPurchase
()
// 获取手机信息
...
...
@@ -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 信息
initPage
(
pageId
)
{
initPage
()
{
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
({
title
:
'加载中'
})
...
...
@@ -209,7 +239,7 @@ wxService.page({
wx
.
hideLoading
()
})
},
// 获取plus购买信息
getPlusPurchase
()
{
wxService
.
get
(
`/sale/premium/query`
).
then
(
res
=>
{
...
...
src/pages/my/my.wxml
View file @
75b3d33f
...
...
@@ -2,33 +2,33 @@
<!-- 1 轮播 2 个人中心 3 图片导航 4 底部左划 5 底部 Tab 6 公告 7 分类 8 关注公众号 9 plus(9/5-权重高)-->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<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 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 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 class="" wx:if="{{pItem.type == 4}}">
<bottom bottom="{{pItem.bottom}}" />
</view>
<view class="" wx:if="{{pItem.type == 5}}">
<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 class="" wx:if="{{pItem.type == 6}}">
<announcement notice="{{pItem.notice}}"
/>
<announcement notice="{{pItem.notice}}"/>
</view>
<view class="" wx:if="{{pItem.type == 7}}">
<tab-sort c
ategory-type="{{pItem.categoryType}}"
/>
<tab-sort c
urrHomePageId="{{currHomePageId}}" category-type="{{pItem.categoryType}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"
/>
</view>
<view class="" wx:if="{{pItem.type == 8}}">
<attention focus-wx="{{pItem.focusWx}}" />
</view>
<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>
</block>
</view>
<guide-page-modal show="{{guidePageModalShow}}" />
<
!--<authorization-modal isAuthorization='{{isAuthorization}}'/>--
>
<
share-benefit-modal show="{{shareBenefitModalShow}}" benefit-data="{{benefitData}}"/
>
\ No newline at end of file
src/pages/userCenter/userCenter.js
View file @
75b3d33f
...
...
@@ -299,7 +299,6 @@ wxService.page({
* 用户点击右上角分享
*/
onShareAppMessage
:
function
(
res
)
{
//修改为参数memberId
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
var
path
=
`pages/userCenter/userCenter`
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment