Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FlashMan
Project
Project
Details
Activity
Releases
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
华国豪
FlashMan
Commits
aea4e5cb
Commit
aea4e5cb
authored
Jul 09, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善优惠券列表
parent
f421c7cb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
149 additions
and
37 deletions
+149
-37
quanbg_2.png
images/menber/quanbg_2.png
+0
-0
quanbg_3.png
images/menber/quanbg_3.png
+0
-0
quanbg_4.png
images/menber/quanbg_4.png
+0
-0
quanbg_6.png
images/menber/quanbg_6.png
+0
-0
Coupon.js
pages/member/Coupon/Coupon.js
+50
-5
Coupon.wxml
pages/member/Coupon/Coupon.wxml
+31
-25
Coupon.wxss
pages/member/Coupon/Coupon.wxss
+68
-7
No files found.
images/menber/quanbg_2.png
deleted
100644 → 0
View file @
f421c7cb
1.5 KB
images/menber/quanbg_3.png
deleted
100644 → 0
View file @
f421c7cb
1.32 KB
images/menber/quanbg_4.png
deleted
100644 → 0
View file @
f421c7cb
1.55 KB
images/menber/quanbg_6.png
deleted
100644 → 0
View file @
f421c7cb
1.54 KB
pages/member/Coupon/Coupon.js
View file @
aea4e5cb
...
...
@@ -77,28 +77,73 @@ Page({
totalPage
:
1
,
count
:
0
,
},
formSubmit
:
function
(
e
)
{
wx
.
getStorage
({
key
:
'admin'
,
success
:
res
=>
{
console
.
log
(
e
)
let
type
=
e
.
detail
.
target
.
dataset
.
type
;
let
formId
=
e
.
detail
.
formId
let
url
=
''
;
if
(
url
==
1
||
type
==
2
)
{
url
=
'/pages/Home/home'
}
else
if
(
type
==
3
)
{
url
=
'/pages/visa/visa'
}
else
if
(
type
==
4
)
{
url
=
'/pages/Ticket/Ticket'
}
app
.
$apiSaveFormId
(
'survey_post_SaveFormId'
,
{
formId
:
formId
,
customerId
:
res
.
data
.
id
}).
then
(
res
=>
{
}).
catch
(
err
=>
{
})
if
(
url
==
1
||
type
==
2
)
{
url
=
'/pages/Home/home'
wx
.
switchTab
({
url
:
url
,
})
}
else
if
(
type
==
3
)
{
url
=
'/pages/visa/visa'
wx
.
navigateTo
({
url
:
url
,
})
}
else
if
(
type
==
4
)
{
url
=
'/pages/Ticket/Ticket'
wx
.
navigateTo
({
url
:
url
,
})
}
}
})
},
// 加载更多
scrollGetMore
:
function
()
{
this
.
setData
({
'
getOrderM
sg.pageIndex'
:
this
.
data
.
pageIndex
+
1
,
'
m
sg.pageIndex'
:
this
.
data
.
pageIndex
+
1
,
})
this
.
getList
(
1
)
},
// 获取数据
getList
:
function
(
type
)
{
console
.
log
(
this
.
data
.
pageIndex
,
this
.
data
.
totalPage
,
type
)
if
(
this
.
data
.
pageIndex
>=
this
.
data
.
totalPage
&&
type
)
{
return
}
app
.
$apiJavaNew
(
'api/b2b/user/getUserCouponAllotList'
,
this
.
data
.
msg
).
then
(
res
=>
{
let
arr
=
this
.
data
.
dataList
;
console
.
log
(
res
)
return
if
(
type
)
{
console
.
log
(
type
,
'组装数据'
)
let
arr2
=
res
.
pageData
;
if
(
type
)
{
for
(
let
i
=
0
;
i
<
arr2
.
length
;
i
++
)
{
arr2
[
i
].
effectDate
=
arr2
[
i
].
effectDate
.
split
(
' '
)[
0
]
arr2
[
i
].
expirationDate
=
arr2
[
i
].
expirationDate
.
split
(
' '
)[
0
]
arr
.
push
(
arr2
[
i
])
}
}
else
{
for
(
let
i
=
0
;
i
<
arr2
.
length
;
i
++
)
{
arr2
[
i
].
effectDate
=
arr2
[
i
].
effectDate
.
split
(
' '
)[
0
]
arr2
[
i
].
expirationDate
=
arr2
[
i
].
expirationDate
.
split
(
' '
)[
0
]
}
arr
=
arr2
}
this
.
setData
({
...
...
pages/member/Coupon/Coupon.wxml
View file @
aea4e5cb
...
...
@@ -18,42 +18,48 @@
</view>
</view>
<scroll-view class='data_body' scroll-y bindscrolltolower="scrollGetMore">
<view class='item'>
<view class='left' style="background: url('../../../images/menber/g_dangdi.png') no-repeat; background-size: 100% 100%;">
</view>
<view class='right'>
<view>
<text class='tit'>全线通用20元现金</text>
<text class='tag'>跟团游</text>
</view>
<view>
<text class='line'>适用XXXXX线路、xxxxxxxx系列x</text>
<view wx:for="{{dataList}}" wx:for-index="index" wx:for-item="item" wx:key="index" class='item {{item.couponEffectStatus!=1? "guoqi" :""}}'>
<view class='left' style="background: url({{item.couponEffectStatus!=1? '../../../images/menber/quanbg_8.png' : '../../../images/menber/quanbg_0'+ item.couponsUseScope +'.png'}}) no-repeat; background-size: 100% 100%;">
<view class='coupom_type' wx:if="{{item.couponsType == 1}}">
<view class='price' >
¥<text>{{item.denomination}}</text>
</view>
<view class='text'>
<text>抵扣券</text>
</view>
</view>
<view class='last_row'>
<text class='time'>2019.06.14 - 2019.06.16</text>
<text class='shiyong'>去使用</text>
<view class='coupom_type' wx:else>
<view class='price'>
<text>{{item.denomination}}</text>折
</view>
<view class='text'>
<text>折扣券</text>
</view>
</view>
</view>
</view>
<view class='item'>
<view class='left' style="background: url('../../../images/menber/g_dangdi.png') no-repeat; background-size: 100% 100%;">
</view>
<view class='right'>
<view>
<text class='tit'>全线通用20元现金</text>
<text class='tag'>跟团游</text>
<text class='tit'>{{item.couponsName}}</text>
<block>
<text class='tag tag{{item.couponsUseScope}}' wx:if="{{item.couponsUseScope == 1}}">通用</text>
<text class='tag tag{{item.couponsUseScope}}' wx:if="{{item.couponsUseScope == 2}}">跟团游</text>
<text class='tag tag{{item.couponsUseScope}}' wx:if="{{item.couponsUseScope == 3}}">签证</text>
<text class='tag tag{{item.couponsUseScope}}' wx:if="{{item.couponsUseScope == 4}}">机票</text>
</block>
</view>
<view>
<text class='line'>
适用XXXXX线路、xxxxxxxx系列x
</text>
<text class='line'>
{{item.lineName}}、{{item.lineTeamName}}
</text>
</view>
<view class='last_row'>
<text class='time'>2019.06.14 - 2019.06.16</text>
<text class='shiyong'>去使用</text>
<text class='time'>{{item.effectDate}}-{{item.expirationDate}}</text>
<form bindsubmit="formSubmit" report-submit>
<button hover-class="btn-hover" form-type="submit" data-type="{{item.couponsUseScope}}">
<text class='shiyong shiyong{{item.couponsUseScope}}'>去使用</text>
</button>
</form>
</view>
</view>
</view>
<view class='body_footer'>{{pageIndex >= totalPage ? '没有更多了...' : '上拉获取更多数据'}}</view>
</scroll-view>
<view class='body_footer'>{{pageIndex >= totalPage ? '没有更多了...' : '上拉获取更多数据'}}</view>
</view>
\ No newline at end of file
pages/member/Coupon/Coupon.wxss
View file @
aea4e5cb
...
...
@@ -34,14 +34,25 @@ page{background-color: #F8F5F5}
border-radius: 0 0 4rpx 4rpx;
color: #1D9890;
}
.data_body .item .right .
line
{
font-size: 22rpx
;
color: #
666
;
.data_body .item .right .
tag.tag1
{
background:rgba(31,193,62,.5)
;
color: #
378F47
;
}
.data_body .item .right .time{
font-size: 22rpx;
color: #C2C2C2;
padding-right: 80rpx;
.data_body .item .right .tag.tag2{
background:rgba(97,220,212,.5);
color: #1D9890;
}
.data_body .item .right .tag.tag3{
background:rgba(233,235,51,.5);
color: #B8A313;
}
.data_body .item .right .tag.tag4{
background:rgba(255,150,0,.5);
color: #BA6E01;
}
.data_body .item.guoqi .right .tag{
background:rgba(212,212,212,.5) !important;
color: #8F8F8F !important;
}
.data_body .item .right .shiyong{
font-size: 22rpx;
...
...
@@ -50,6 +61,30 @@ page{background-color: #F8F5F5}
background:linear-gradient(133deg,rgba(38,198,165,1),rgba(97,220,212,1));
border-radius:12rpx;
}
.data_body .item.guoqi .right .shiyong{
background:linear-gradient(133deg,rgb(160, 160, 160),rgb(230, 230, 230)) !important;
}
.data_body .item .right .shiyong.shiyong1{
background:linear-gradient(133deg,rgba(31,193,62,1),rgba(90,225,154,1));
}
.data_body .item .right .shiyong.shiyong2{
background:linear-gradient(133deg,rgba(38,198,165,1),rgba(97,220,212,1));
}
.data_body .item .right .shiyong.shiyong3{
background:linear-gradient(133deg,rgba(235,211,51,1),rgba(235,243,140,1));
}
.data_body .item .right .shiyong.shiyong4{
background:linear-gradient(133deg,rgba(255,150,0,1),rgba(255,198,0,1));
}
.data_body .item .right .line{
font-size: 22rpx;
color: #666;
}
.data_body .item .right .time{
font-size: 22rpx;
color: #C2C2C2;
padding-right: 80rpx;
}
.last_row{
display: flex;
align-items: flex-end;
...
...
@@ -127,4 +162,30 @@ page{background-color: #F8F5F5}
font-size: 12px;
color: #666666;
background-color:#F5F5F5;
}
.coupom_type{
text-align: center;
color: white
}
.coupom_type .price{
margin: 15rpx 0 0 0;
font-size: 20rpx;
}
.coupom_type .price text{
font-size: 48rpx;
}
.coupom_type .text{
font-size: 24rpx;
}
button{
padding: 0;
font-size: 22rpx;
border: none;
background-color: transparent;
}
button::after{
border: none
}
button:active{
background-color: transparent;
}
\ No newline at end of file
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