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
42261b59
Commit
42261b59
authored
May 27, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 券码详情页
parent
6bfd1a61
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
25 deletions
+44
-25
couponDetail.js
src/pages/couponDetail/couponDetail.js
+23
-8
couponDetail.wxml
src/pages/couponDetail/couponDetail.wxml
+1
-1
coupons.js
src/pages/coupons/coupons.js
+5
-0
coupons.wxml
src/pages/coupons/coupons.wxml
+15
-16
No files found.
src/pages/couponDetail/couponDetail.js
View file @
42261b59
...
@@ -9,23 +9,38 @@ wxService.page({
...
@@ -9,23 +9,38 @@ wxService.page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
couponDetailTitle
:
''
,
},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
const
{
title
,
cardno
}
=
this
.
options
this
.
setData
({
couponDetailTitle
:
title
})
this
.
getCouponDetail
(
cardno
)
},
},
// 查询单个优惠券
// 查询单个优惠券
getCouponDetail
(){
getCouponDetail
(
cardno
){
wxService
.
post
(
`/coupon/coupon/setting/get/
${
id
}
`
).
then
(
res
=>
{
wx
.
showLoading
({
this
.
setData
({
title
:
'加载中'
couponDetail
:
res
.
data
.
data
.
content
})
})
wxService
.
post
(
`/coupon/coupon/get?cardNo=
${
cardno
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
wx
.
hideLoading
()
console
.
log
(
'dddd'
,
data
)
}
else
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
`
${
res
.
desc
}
`
,
icon
:
'none'
})
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
})
})
...
...
src/pages/couponDetail/couponDetail.wxml
View file @
42261b59
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<view class='avatar-img'>
<view class='avatar-img'>
<image src='/assets/imgs/avatar.png'></image>
<image src='/assets/imgs/avatar.png'></image>
</view>
</view>
<view class='title fs-36'>
阳光柠檬茶1.5元购
</view>
<view class='title fs-36'>
{{couponDetailTitle}}
</view>
</view>
</view>
<view class='line'>
<view class='line'>
<image src='/assets/imgs/line.png'></image>
<image src='/assets/imgs/line.png'></image>
...
...
src/pages/coupons/coupons.js
View file @
42261b59
...
@@ -76,6 +76,11 @@ wxService.page({
...
@@ -76,6 +76,11 @@ wxService.page({
// this.getCouponList(this.data.pageNo,this.data.pageSize)
// this.getCouponList(this.data.pageNo,this.data.pageSize)
// },
// },
handelPresentCouponCode
(
e
)
{
let
data
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/couponDetail/couponDetail`
).
search
(
data
)
},
//获取优惠券列表
//获取优惠券列表
getCouponList
(
pageNo
,
pageSize
){
getCouponList
(
pageNo
,
pageSize
){
wx
.
showLoading
({
wx
.
showLoading
({
...
...
src/pages/coupons/coupons.wxml
View file @
42261b59
...
@@ -19,27 +19,26 @@
...
@@ -19,27 +19,26 @@
wx:for-index="k"
wx:for-index="k"
wx:key="{{k}}"
wx:key="{{k}}"
>
>
<
navigator hover-class='none' url='/pages/couponDetail/couponDetail'
>
<
view data-title="{{item.title}}" data-cardNo="{{item.cardNo}}" bindtap="handelPresentCouponCode"
>
<view wx:if="{{invalidCouponList.length}}">
<view wx:if="{{invalidCouponList.length}}">
<view class='invalid-coupon' />
<view class='invalid-coupon' />
<image src='/assets/imgs/invalid.png' class='invalid-img' />
<image src='/assets/imgs/invalid.png' class='invalid-img' />
</view>
</view>
<image class='coupon-bg' src='/assets/imgs/coupon-bg.png' />
<image class='coupon-bg' src='/assets/imgs/coupon-bg.png' />
<view class='coupon-img'>
<view class='coupon-img'>
<image src='/assets/imgs/qr-code.png' />
<image src='/assets/imgs/qr-code.png' />
</view>
</view>
<view class='coupon-info'>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<view class='coupon-desc fs-24'>{{item.notice}}</view>
<view class='coupon-desc fs-24'>{{item.notice}}</view>
</view>
</view>
<view class='coupon-code fs-24'>出示劵码</view>
<view class='coupon-code fs-24'>出示劵码</view>
</
navigator
>
</
view
>
</view>
</view>
</view>
</view>
<no-more wx:if="{{noMoreCoupon}}" />
<no-more wx:if="{{noMoreCoupon}}" />
</scroll-view>
</scroll-view>
<view class='empty-wrap' wx:if="{{!couponList.length}}">
<view class='empty-wrap' wx:if="{{!couponList.length}}">
<view class='empty-info'>
<view class='empty-info'>
...
...
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