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
dd12a3b0
Commit
dd12a3b0
authored
Aug 05, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:集点接口
parent
16ae0662
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
19 deletions
+58
-19
pointDetail.js
src/pages/pointDetail/pointDetail.js
+44
-5
pointList.js
src/pages/pointList/pointList.js
+14
-14
No files found.
src/pages/pointDetail/pointDetail.js
View file @
dd12a3b0
...
@@ -16,7 +16,7 @@ wxService.page({
...
@@ -16,7 +16,7 @@ wxService.page({
content
:
'积分流水'
,
content
:
'积分流水'
,
tip
:
'立即查看'
tip
:
'立即查看'
},
},
desc
:
[{
"label"
:
"优惠详情"
,
"value"
:
"使用100积分可兑换一张维记鲜牛奶优惠券,凭券可以4.8元优惠价换购维记鲜牛奶236ML一盒!"
,
"type"
:
2
},{
"label"
:
"有效时间"
,
"value"
:
"2019-07-12 至 2019-08-06"
,
"type"
:
2
},{
"label"
:
"兑换说明"
,
"value"
:
"1、点击【立即兑换】,即可兑换成功,每人限兑换10张券
\
n2、在【会员小程序-优惠券】中可查询到已兑换的券;"
,
"type"
:
2
},{
"label"
:
"使用须知"
,
"value"
:
"1、凭此优惠券,前往广东7-Eleven有售门店,可以优惠价4.8元换购维记鲜牛奶236ML一盒!2、成功领到优惠券后,请务必在有效期内使用,逾期无效;3、一张券限兑换维记鲜牛奶236ML一盒;4、优惠券不设找零、不可兑换现金; 5、请于交易前向收银员出示此优惠券; 6、使用优惠券发生的交易,广东7-Eleven仅按实际支付金额开具发票;7、如发生退货,仅按顾客实际支付金额退款。 "
,
"type"
:
2
}]
desc
:
[{
"label"
:
"优惠详情"
,
"value"
:
"使用100积分可兑换一张维记鲜牛奶优惠券,凭券可以4.8元优惠价换购维记鲜牛奶236ML一盒!"
,
"type"
:
2
},
{
"label"
:
"有效时间"
,
"value"
:
"2019-07-12 至 2019-08-06"
,
"type"
:
2
},
{
"label"
:
"兑换说明"
,
"value"
:
"1、点击【立即兑换】,即可兑换成功,每人限兑换10张券
\
n2、在【会员小程序-优惠券】中可查询到已兑换的券;"
,
"type"
:
2
},
{
"label"
:
"使用须知"
,
"value"
:
"1、凭此优惠券,前往广东7-Eleven有售门店,可以优惠价4.8元换购维记鲜牛奶236ML一盒!2、成功领到优惠券后,请务必在有效期内使用,逾期无效;3、一张券限兑换维记鲜牛奶236ML一盒;4、优惠券不设找零、不可兑换现金; 5、请于交易前向收银员出示此优惠券; 6、使用优惠券发生的交易,广东7-Eleven仅按实际支付金额开具发票;7、如发生退货,仅按顾客实际支付金额退款。 "
,
"type"
:
2
}]
},
},
...
@@ -26,12 +26,51 @@ wxService.page({
...
@@ -26,12 +26,51 @@ wxService.page({
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
},
},
getPointDetail
()
{
wx
.
showLoading
({
title
:
'加载中'
})
const
params
=
{
activityId
:
''
,
memberId
:
''
}
wxService
.
post
(
`/sale/touchpoints/pointConsumptionCount/getPointConsumptionCount`
,
params
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
console
.
log
(
data
)
this
.
setData
({
})
}
}
})
},
handleCheckGoods
()
{
handleCheckGoods
()
{
wxService
.
router
(
`/subPackage/page/pages/pointGoodsList/pointGoodsList`
)
wxService
.
router
(
`/subPackage/page/pages/pointGoodsList/pointGoodsList`
)
},
},
handleGo
(){
handleGo
()
{
console
.
log
(
'handleGo'
)
// 兑换成功跳转 触点有礼-消费集点兑换
wxService
.
router
(
`/pages/coupons/coupons`
)
// wxService.router(`/pages/coupons/coupons`)
// /touchpoints/pointConsumptionExchange/exchange
this
.
getPointExchange
()
},
getPointExchange
()
{
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
get
(
`/sale/touchpoints/pointConsumptionExchange/exchange?activityId=
${
1
}
&memberId=
${
1
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
console
.
log
(
data
)
this
.
setData
({
})
}
}
})
},
},
handleToGet
()
{
handleToGet
()
{
let
dialog
=
this
.
data
.
dialog
let
dialog
=
this
.
data
.
dialog
...
@@ -51,7 +90,7 @@ wxService.page({
...
@@ -51,7 +90,7 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
this
.
getPointDetail
()
},
},
/**
/**
...
...
src/pages/pointList/pointList.js
View file @
dd12a3b0
...
@@ -33,20 +33,20 @@ wxService.page({
...
@@ -33,20 +33,20 @@ wxService.page({
this
.
getPointList
()
this
.
getPointList
()
},
},
getPointList
()
{
getPointList
()
{
//
wx.showLoading({
wx
.
showLoading
({
//
title: '加载中'
title
:
'加载中'
//
})
})
// wxService.get(`/member/memberPoint/getMyPointInfo
`).then(res => {
wxService
.
get
(
`/sale/touchpoints/pointConsumptionActivity/findAllValidActivityList
`
).
then
(
res
=>
{
//
if(res) {
if
(
res
)
{
//
const { result, data } = res.data
const
{
result
,
data
}
=
res
.
data
//
if (result == 0) {
if
(
result
==
0
)
{
//
wx.hideLoading()
wx
.
hideLoading
()
// this.setData({
console
.
log
(
data
)
// integralNum: data && data.point || 0
this
.
setData
({
//
})
})
//
}
}
//
}
}
//
})
})
},
},
handleDetail
(
e
)
{
handleDetail
(
e
)
{
const
{
index
}
=
e
.
currentTarget
.
dataset
const
{
index
}
=
e
.
currentTarget
.
dataset
...
...
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