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
60646f01
Commit
60646f01
authored
Jun 06, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: coupon_code
parent
466049b0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
11 deletions
+19
-11
couponCodeDetail.js
src/pages/couponCodeDetail/couponCodeDetail.js
+6
-4
couponCodeDetail.wxml
src/pages/couponCodeDetail/couponCodeDetail.wxml
+1
-1
couponDetail.js
src/pages/couponDetail/couponDetail.js
+9
-3
coupons.js
src/pages/coupons/coupons.js
+2
-2
coupons.wxml
src/pages/coupons/coupons.wxml
+1
-1
No files found.
src/pages/couponCodeDetail/couponCodeDetail.js
View file @
60646f01
...
...
@@ -10,17 +10,16 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
c
ouponDetailTitle
:
''
,
c
ardno
:
''
c
ardno
:
''
,
c
odeDetail
:
{}
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
const
{
title
,
cardno
}
=
this
.
options
const
{
cardno
}
=
this
.
options
this
.
setData
({
couponDetailTitle
:
title
,
cardno
})
this
.
getCouponDetail
(
cardno
)
...
...
@@ -37,6 +36,9 @@ wxService.page({
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
wx
.
hideLoading
()
this
.
setData
({
codeDetail
:
data
})
}
else
{
wx
.
hideLoading
()
wx
.
showToast
({
...
...
src/pages/couponCodeDetail/couponCodeDetail.wxml
View file @
60646f01
...
...
@@ -5,7 +5,7 @@
<view class='avatar-img'>
<image src='/assets/imgs/avatar.png'></image>
</view>
<view class='title fs-36'>{{co
uponDetailT
itle}}</view>
<view class='title fs-36'>{{co
deDetail.couponSetting.t
itle}}</view>
</view>
<view class='line'>
<image src='/assets/imgs/line.png'></image>
...
...
src/pages/couponDetail/couponDetail.js
View file @
60646f01
...
...
@@ -11,7 +11,8 @@ wxService.page({
*/
data
:
{
isExchange
:
false
,
couponDetail
:{}
couponDetail
:{},
cardno
:
''
},
/**
...
...
@@ -20,6 +21,9 @@ wxService.page({
onShow
()
{
const
{
cardno
}
=
this
.
options
this
.
getCouponDetail
(
cardno
)
this
.
setData
({
cardno
})
},
//立即兑换
...
...
@@ -49,7 +53,8 @@ wxService.page({
})
},
handelPresentCouponCode
(
e
)
{
let
data
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/couponCodeDetail/couponCodeDetail`
).
search
(
data
)
// let data = e.currentTarget.dataset
const
{
cardno
}
=
this
.
data
wxService
.
router
(
`/pages/couponCodeDetail/couponCodeDetail`
).
search
({
cardno
})
}
})
\ No newline at end of file
src/pages/coupons/coupons.js
View file @
60646f01
...
...
@@ -76,8 +76,8 @@ wxService.page({
wxService
.
router
(
`/pages/couponDetail/couponDetail`
).
search
({
cardno
})
},
handelPresentCouponCode
(
e
)
{
let
data
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/couponCodeDetail/couponCodeDetail`
).
search
(
data
)
let
{
cardno
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/couponCodeDetail/couponCodeDetail`
).
search
(
{
cardno
}
)
},
//获取优惠券列表
...
...
src/pages/coupons/coupons.wxml
View file @
60646f01
...
...
@@ -27,7 +27,7 @@
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<view class='coupon-desc fs-24'>{{item.notice}}</view>
</view>
<view class='coupon-code fs-24' bindtap="handelPresentCouponCode">出示劵码</view>
<view class='coupon-code fs-24'
data-cardNo="{{item.cardNo}}"
bindtap="handelPresentCouponCode">出示劵码</view>
</view>
</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