Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
55c384f8
Commit
55c384f8
authored
Jan 16, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
839cd538
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
25 deletions
+62
-25
header.vue
components/header/header.vue
+1
-0
index.vue
pages/coupon/index/index.vue
+61
-25
No files found.
components/header/header.vue
View file @
55c384f8
...
...
@@ -49,6 +49,7 @@ export default {
.carrHeader-left
{
position
:
absolute
;
left
:
32
rpx
;
z-index
:
3
;
}
.carrHeaderBox
{
width
:
100%
;
...
...
pages/coupon/index/index.vue
View file @
55c384f8
<
template
>
<view
class=
"couponStyle"
:style=
"
{ height: contentHeight }" @click="
lin
eShow=false">
<view
class=
"couponStyle"
:style=
"
{ height: contentHeight }" @click="
CouponsUseScop
eShow=false">
<view
class=
"couponHeaderBox"
>
<view
class=
"couponHeader"
>
<view
class=
"couponHeadLeft"
>
<view
class=
"couponHeadLText"
@
click
.
stop=
"
lineShow=!lin
eShow"
>
<text
class=
"couponHeadLTextL"
>
{{
lin
eName
}}
</text>
<view
class=
"couponHeadLText"
@
click
.
stop=
"
CouponsUseScopeShow=!CouponsUseScop
eShow"
>
<text
class=
"couponHeadLTextL"
>
{{
CouponsUseScop
eName
}}
</text>
<view>
<u-icon
:name=
"!
lin
eShow?'arrow-down':'arrow-up'"
size=
"24"
></u-icon>
<u-icon
:name=
"!
CouponsUseScop
eShow?'arrow-down':'arrow-up'"
size=
"24"
></u-icon>
</view>
</view>
</view>
<view
class=
"couponHeadRight"
>
<text
v-for=
"(item,index) in couponStateList"
:key=
"index"
:class=
"[msg.CouponType==item.id?'active':'']"
@
click
.
stop=
"changeState()"
>
{{
item
.
name
}}
</text>
<text
v-for=
"(item,index) in couponStateList"
:key=
"index"
:class=
"[msg.Coupon
s
Type==item.id?'active':'']"
@
click
.
stop=
"changeState(
item
)"
>
{{
item
.
name
}}
</text>
</view>
</view>
<view
class=
"couponLine"
v-if=
"
lin
eShow"
>
<view
class=
"couponLineT"
v-for=
"(item,index) in
lin
eList"
>
<view
class=
"couponLineAllName"
:class=
"[msg.
lineId==item.id?'active':'']"
@
click
.
stop=
"msg.lineId=item.id,lineName=item.text
"
>
<text>
{{
item
.
text
}}
</text>
<view
class=
"couponLine"
v-if=
"
CouponsUseScop
eShow"
>
<view
class=
"couponLineT"
v-for=
"(item,index) in
ScopeOfUs
eList"
>
<view
class=
"couponLineAllName"
:class=
"[msg.
CouponsUseScope==item.Id?'active':'']"
@
click
.
stop=
"getScopeOfUseId(item)
"
>
<text>
{{
item
.
Name
}}
</text>
</view>
</view>
</view>
...
...
@@ -46,7 +46,7 @@
</Text>
<Text
class=
"small"
style=
"font-family: microsoft yahei ui light;margin-left: 5rpx;"
>
{{
x
.
couponsType
!=
1
?
"折"
:
""
}}
</Text>
</view>
<view
class=
"tiaojian"
>
抵扣券
</view>
<view
class=
"tiaojian"
>
{{
x
.
couponsType
==
1
?
'抵扣券'
:
'折扣卷'
}}
</view>
</view>
</view>
<view
class=
"detail"
>
...
...
@@ -57,7 +57,7 @@
</view>
<view
class=
"coupondLineTb"
>
<view
class=
"coupondLineTbt"
>
<template
v-if=
"x.
lineNameStr&&x.lineName!=''"
>
适用线路:
{{
x
.
lin
eNameStr
}}
</
template
>
<template
v-if=
"x.
CouponsUseScopeNameStr&&x.CouponsUseScopeName!=''"
>
适用线路:
{{
x
.
CouponsUseScop
eNameStr
}}
</
template
>
<
template
v-if=
"x.lineteamNameStr&&x.lineteamNameStr!=''"
>
适用系列:
{{
x
.
lineteamNameStr
}}
</
template
>
<
template
v-if=
"x.remark&&x.remark!=''"
>
{{
x
.
remark
}}
</
template
>
</view>
...
...
@@ -100,11 +100,11 @@
},
{
name
:
"折扣券"
,
id
:
1
,
id
:
2
,
},
{
name
:
"抵扣券"
,
id
:
2
,
id
:
1
,
},
{
name
:
"已过期"
,
...
...
@@ -122,9 +122,9 @@
"lineteamId"
:
0
,
//系列ID
"CustomerType"
:
0
,
//0-同行,1-直客
"CouponStatus"
:
1
,
//优惠券状态 1未使用 2已使用 3已过期
"CouponsUseScope"
:
0
,
//优惠券使用范围 有枚举
"CouponsUseScope"
:
-
1
,
//优惠券使用范围 有枚举
"FromPlatform"
:
"2"
,
//来源平台 1app 2小程序
"CouponType"
:
0
,
//优惠券类型 1:抵用券,2:折扣卷
"Coupon
s
Type"
:
0
,
//优惠券类型 1:抵用券,2:折扣卷
},
page_count
:
1
,
couponDataList
:
[],
...
...
@@ -136,7 +136,12 @@
nomore
:
"没有更多了"
,
},
showBar
:
true
,
lineList
:
[{
lineList
:
[
{
text
:
'不限'
,
id
:
-
1
},
{
text
:
'通用'
,
id
:
0
},
...
...
@@ -173,8 +178,8 @@
id
:
8
},
],
lineName
:
'通用
'
,
lin
eShow
:
false
,
CouponsUseScopeName
:
'不限
'
,
CouponsUseScop
eShow
:
false
,
lineImgs
:
[
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322574781584.png'
,
//跟团游
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322566159036.png'
,
//自由行
...
...
@@ -187,6 +192,7 @@
'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Upload/Goods/638726322569972025.png'
,
//美食2
],
b2bUserInfo
:
{},
ScopeOfUseList
:
[],
};
},
created
()
{
...
...
@@ -215,20 +221,44 @@
});
},
onLoad
:
function
(
option
)
{
this
.
getScopeOfUse
()
this
.
loading
=
true
this
.
init
()
},
methods
:
{
getScopeOfUseId
(
item
){
this
.
CouponsUseScopeShow
=
false
this
.
msg
.
CouponsUseScope
=
item
.
Id
this
.
CouponsUseScopeName
=
item
.
Name
this
.
ResetQuery
()
},
getScopeOfUse
()
{
this
.
apipost
(
"coupon_post_GetCouponAllotOrderTypeEnumList"
,
{},
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
ScopeOfUseList
=
res
.
data
this
.
ScopeOfUseList
.
unshift
({
Id
:
-
1
,
Name
:
'不限'
})
}
},
(
failed
)
=>
{
uni
.
showToast
({
title
:
failed
.
message
,
icon
:
"none"
,
});
},
(
error
)
=>
{
})
},
//状态切换
changeState
(
item
)
{
if
(
item
.
id
<=
2
)
{
this
.
msg
.
CouponType
=
item
.
id
,
this
.
msg
.
CouponStatus
=
1
;
this
.
msg
.
Coupon
s
Type
=
item
.
id
,
this
.
msg
.
CouponStatus
=
1
;
}
else
if
(
item
.
id
==
3
)
{
this
.
msg
.
CouponType
=
0
;
this
.
msg
.
Coupon
s
Type
=
0
;
this
.
msg
.
CouponStatus
=
3
;
}
this
.
ResetQuery
();
},
//重新查询
...
...
@@ -261,6 +291,7 @@
x
.
backGroubd
=
this
.
lineImgs
[
0
]
})
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
this
.
status
=
'nomore'
console
.
log
(
"this.couponDataList"
,
this
.
couponDataList
)
}
},
(
failed
)
=>
{
...
...
@@ -395,11 +426,15 @@
font-weight
:
bold
;
size
:
64px
;
text-align
:
center
;
display
:
flex
;
flex-wrap
:
nowrap
;
}
.couponStyle
.item
.miane
.money
.small
{
font-size
:
12px
;
font-weight
:
100
;
position
:
relative
;
top
:
12
rpx
;
}
.couponStyle
.item
.miane
.tiaojian
{
...
...
@@ -466,15 +501,16 @@
}
.couponHeadLText
{
width
:
210
rpx
;
display
:
flex
;
align-items
:
center
;
flex
:
1
;
justify-content
:
space-between
;
padding-left
:
43
rpx
;
border-right
:
1
rpx
solid
rgba
(
207
,
207
,
207
,
.4
);
}
.couponHeadLTextL
{
margin-right
:
42
rpx
;
//
margin-right
:
42
rpx
;
font-size
:
28
rpx
;
}
...
...
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