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
2c437d61
Commit
2c437d61
authored
Jun 04, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 积分优惠券接口
parent
c872cc1c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
9 deletions
+54
-9
exchange-coupon-modal.js
src/component/exchange-coupon-modal/exchange-coupon-modal.js
+10
-2
personCenter.js
src/component/personCenter/personCenter.js
+37
-1
personCenter.wxml
src/component/personCenter/personCenter.wxml
+6
-5
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+1
-1
No files found.
src/component/exchange-coupon-modal/exchange-coupon-modal.js
View file @
2c437d61
...
...
@@ -75,11 +75,19 @@ Component({
const
params
=
{
activateId
:
this
.
data
.
exchangeId
}
wxService
.
post
(
`/coupon/pointsRedemptionCouponSetting/exchange`
,
params
).
then
(
res
=>
{
wxService
.
post
(
`/coupon/pointsRedemptionCouponSetting/exchange`
,
this
.
data
.
exchangeId
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
wx
.
hideLoading
()
wx
.
showToast
({
title
:
`
${
res
.
desc
}
`
,
icon
:
'success'
})
}
else
{
wx
.
showToast
({
title
:
`
${
res
.
desc
}
`
,
icon
:
'none'
})
}
})
}
...
...
src/component/personCenter/personCenter.js
View file @
2c437d61
...
...
@@ -16,7 +16,9 @@ Component({
data
:
{
personCenter
:
{},
memberCardNo
:
""
,
memberActivateStatus
:
false
memberActivateStatus
:
false
,
integralNum
:
0
,
couponNum
:
0
},
attached
()
{
this
.
setData
({
...
...
@@ -28,8 +30,42 @@ Component({
memberCardNo
,
memberActivateStatus
})
// 积分数量
this
.
getMemberPointInfo
()
// 优惠券数量
this
.
getMemberCouponInfo
()
},
methods
:
{
// 查询积分信息
getMemberPointInfo
(){
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/member/memberPoint/getMyPointInfo`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
this
.
setData
({
integralNum
:
data
.
point
})
}
})
},
// 查询优惠券数量
getMemberCouponInfo
(){
wx
.
showLoading
({
title
:
'加载中'
})
// wxService.post(`/member/memberPoint/getMyPointInfo`).then(res => {
// const { result, data } = res.data
// if (result == 0) {
// wx.hideLoading()
// this.setData({
// couponNum: data.point
// })
// }
// })
},
toBonusDetails
()
{
wxService
.
router
(
`/pages/integralWater/integralWater`
)
},
...
...
src/component/personCenter/personCenter.wxml
View file @
2c437d61
...
...
@@ -49,13 +49,13 @@
</view>
</view>
</view>
<view class='df tc
' wx:if='{{memberActivateStatus}}
'>
<view class='df-1 point person-right' bindtap="toBonusDetails">
<view class='point-number' style="color:{{personCenter.fontColor}};">{{
personCenter.bonus
}}</view>
<view class='df tc
person-detail
'>
<view class='df-1 point person-right' bindtap="toBonusDetails"
wx:if="{{personCenter.bonus == 0}}"
>
<view class='point-number' style="color:{{personCenter.fontColor}};">{{
integralNum
}}</view>
<view class='point-desc' style="color:{{personCenter.fontColor}};">积分</view>
</view>
<view class='df-1 point' bindtap="toCouponList">
<view class='point-number' style="color:{{personCenter.fontColor}};">{{
personCenter.coupon
}}</view>
<view class='df-1 point' bindtap="toCouponList"
wx:if="{{personCenter.coupon == 0}}"
>
<view class='point-number' style="color:{{personCenter.fontColor}};">{{
couponNum
}}</view>
<view class='point-desc' style="color:{{personCenter.fontColor}};">优惠券</view>
</view>
</view>
\ No newline at end of file
src/pages/userCenter/userCenter.wxml
View file @
2c437d61
...
...
@@ -22,7 +22,7 @@
<!-- 底部 -->
<view class="images-tab" wx:if="{{pItem.type == 4}}">
<view class='footer-content' style="background:{{pItem.bottom.color}};color:{{pItem.bottom.color}}">
<text class="footer-arrow" style="color:{{pItem.bottom.fontColor}}">
<<
</text>
<text class="footer-arrow" style="color:{{pItem.bottom.fontColor}}">
<<
</text>
<text class='footer-text' style="color:{{pItem.bottom.fontColor}}">{{pItem.bottom.title}}</text>
</view>
</view>
...
...
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