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
4835ac4b
Commit
4835ac4b
authored
Oct 28, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫码_卡券详情
parent
a3d9ea5f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
12 deletions
+61
-12
scanCoupon.js
src/subPackage/page/pages/scanCoupon/scanCoupon.js
+51
-2
scanCoupon.wxml
src/subPackage/page/pages/scanCoupon/scanCoupon.wxml
+9
-9
scanCoupon.wxss
src/subPackage/page/pages/scanCoupon/scanCoupon.wxss
+1
-1
No files found.
src/subPackage/page/pages/scanCoupon/scanCoupon.js
View file @
4835ac4b
...
@@ -6,6 +6,10 @@ wxService.page({
...
@@ -6,6 +6,10 @@ wxService.page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
id
:
''
,
couponDetail
:
null
,
productData
:
[],
subStoreData
:
[],
proData
:
[
proData
:
[
{
{
"id"
:
"636202018767245312"
,
"id"
:
"636202018767245312"
,
...
@@ -54,9 +58,54 @@ wxService.page({
...
@@ -54,9 +58,54 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
console
.
log
(
'--------'
,
this
.
options
)
this
.
setData
({
id
:
'638467647583031296'
},()
=>
{
this
.
getCouponDetail
(
this
.
data
.
id
)
})
},
getCouponDetail
(
id
){
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
get
(
`/marketing/shoppingguide/coupon/detail?id=
${
id
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
this
.
setData
({
couponDetail
:
data
})
this
.
getCouponGoods
(
data
.
couponId
)
}
})
},
// 卡券详情
getCouponGoods
(
id
){
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/coupon/coupon/setting/get/
${
id
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
wx
.
hideLoading
()
// data.coupon.startTime = data.coupon.startTime.substring(0,10)
// data.coupon.endTime = data.coupon.endTime.substring(0,10)
// data.couponSetting.notice = JSON.parse(data.couponSetting.notice)
// for (let i in data.couponSetting.notice){
// if (data.couponSetting.notice[i].type == 1){
// data.couponSetting.notice[i].value = data.coupon.startTime.substring(0, 10) + ' 至 ' + data.coupon.endTime.substring(0, 10)
// }
// }
this
.
setData
({
productData
:
data
.
couponDetail
&&
data
.
couponDetail
.
useCondition
&&
data
.
couponDetail
.
useCondition
.
productData
,
subStoreData
:
data
.
couponDetail
&&
data
.
couponDetail
.
useCondition
&&
data
.
couponDetail
.
useCondition
.
subStoreData
})
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
...
...
src/subPackage/page/pages/scanCoupon/scanCoupon.wxml
View file @
4835ac4b
...
@@ -3,19 +3,19 @@
...
@@ -3,19 +3,19 @@
<view class="scan-title clearfix">
<view class="scan-title clearfix">
<view class="title-btn">立即领取</view>
<view class="title-btn">立即领取</view>
<view class="title-name">
优惠券名称
</view>
<view class="title-name">
{{couponDetail.couponName}}
</view>
<view class="title-desc">
优惠券使用说明优惠券使用说明优惠券使用说明
</view>
<view class="title-desc">
{{couponDetail.title}}
</view>
<view class="title-others">
其他优惠券使用说明优惠券使用说明优惠券使用说明优惠券使用说明
</view>
<view class="title-others">
{{couponDetail.remark}}
</view>
</view>
</view>
<view class="scan-stores">
<view class="scan-stores">
<view class="store-title">
<view class="store-title">
<view class="store-num">适用门店
<view class="store-num">适用门店
<text class="store-num-tips">(
13
)</text>
<text class="store-num-tips">(
{{subStoreData.length}}
)</text>
</view>
</view>
<view class="store-more">查看更多></view>
<view class="store-more"
wx:if="{{subStoreData.length}}"
>查看更多></view>
</view>
</view>
<view class="store-address">
<view class="store-address"
wx:if="{{subStoreData.length}}"
>
<view class="store-detail">
<view class="store-detail">
<view class="detail-name">浦东家里哦</view>
<view class="detail-name">浦东家里哦</view>
<view class="detail-address">详细地址详细地址详细地址详细地址</view>
<view class="detail-address">详细地址详细地址详细地址详细地址</view>
...
@@ -30,12 +30,12 @@
...
@@ -30,12 +30,12 @@
<view class="scan-goods">
<view class="scan-goods">
<view class="goods-title">
<view class="goods-title">
<view class="goods-num">适用商品</view>
<view class="goods-num">适用商品</view>
<view class="goods-more">查看更多></view>
<view class="goods-more"
wx:if="{{productData.length}}"
>查看更多></view>
</view>
</view>
<water-flow-layout
<water-flow-layout
wx:if="{{proData.length}}"
wx:if="{{pro
duct
Data.length}}"
type="2"
type="2"
image-data="{{proData}}"
image-data="{{pro
duct
Data}}"
/>
/>
<view class="goods-no-more" wx:else>没有更多哦</view>
<view class="goods-no-more" wx:else>没有更多哦</view>
</view>
</view>
...
...
src/subPackage/page/pages/scanCoupon/scanCoupon.wxss
View file @
4835ac4b
...
@@ -75,7 +75,7 @@ page {
...
@@ -75,7 +75,7 @@ page {
}
}
.scan-title .title-name {
.scan-title .title-name {
width: 160rpx;
min-
width: 160rpx;
height: 32rpx;
height: 32rpx;
color: rgba(0, 145, 255, 1);
color: rgba(0, 145, 255, 1);
font-size: 32rpx;
font-size: 32rpx;
...
...
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