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
2ca9cf72
Commit
2ca9cf72
authored
Sep 11, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人中心
parent
8a4aaf8b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
4 deletions
+38
-4
personCenter.wxss
src/component/personCenter/personCenter.wxss
+1
-0
userCenter.js
src/pages/userCenter/userCenter.js
+36
-3
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+1
-1
No files found.
src/component/personCenter/personCenter.wxss
View file @
2ca9cf72
...
...
@@ -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;
...
...
src/pages/userCenter/userCenter.js
View file @
2ca9cf72
...
...
@@ -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
({
...
...
src/pages/userCenter/userCenter.wxml
View file @
2ca9cf72
...
...
@@ -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}}"/>
...
...
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