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
81450a70
Commit
81450a70
authored
Feb 20, 2025
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成机票
parent
8a468cf3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1335 additions
and
233 deletions
+1335
-233
flex.css
asset/css/flex.css
+3
-0
tffont.css
asset/font/tffont.css
+19
-3
index.vue
components/coupon/index.vue
+20
-11
u-modal.vue
node_modules/uview-ui/components/u-modal/u-modal.vue
+1
-1
index.vue
pages/airTicket/components/guest/index.vue
+223
-6
list.vue
pages/airTicket/components/guest/list.vue
+427
-0
flightDetail.vue
pages/airTicket/flightDetail.vue
+635
-210
ticketList.vue
pages/airTicket/ticketList/ticketList.vue
+6
-1
jz_Reserve.vue
pages/jiuzhai/jz_Reserve.vue
+1
-1
No files found.
asset/css/flex.css
View file @
81450a70
...
...
@@ -132,6 +132,9 @@
.flexS
{
flex-shrink
:
0
;
}
.text-right
{
text-align
:
right
;
}
.column
{
display
:
flex
;
flex-direction
:
column
;
...
...
asset/font/tffont.css
View file @
81450a70
@font-face
{
font-family
:
"tffont"
;
/* Project id 4816119 */
src
:
url('//at.alicdn.com/t/c/font_4816119_
61ojoauzfi8.woff2?t=1739876734691
')
format
(
'woff2'
),
url('//at.alicdn.com/t/c/font_4816119_
61ojoauzfi8.woff?t=1739876734691
')
format
(
'woff'
),
url('//at.alicdn.com/t/c/font_4816119_
61ojoauzfi8.ttf?t=1739876734691
')
format
(
'truetype'
);
src
:
url('//at.alicdn.com/t/c/font_4816119_
3fhqn0zoshb.woff2?t=1739957291854
')
format
(
'woff2'
),
url('//at.alicdn.com/t/c/font_4816119_
3fhqn0zoshb.woff?t=1739957291854
')
format
(
'woff'
),
url('//at.alicdn.com/t/c/font_4816119_
3fhqn0zoshb.ttf?t=1739957291854
')
format
(
'truetype'
);
}
.tffont
{
...
...
@@ -13,6 +13,22 @@
-moz-osx-font-smoothing
:
grayscale
;
}
.tffont-baby
:before
{
content
:
"\e650"
;
}
.tffont-chengren
:before
{
content
:
"\e75f"
;
}
.tffont-ertong
:before
{
content
:
"\e760"
;
}
.tffont-pen_
:before
{
content
:
"\e8a5"
;
}
.tffont-qianwangx
:before
{
content
:
"\e608"
;
}
...
...
components/coupon/index.vue
View file @
81450a70
...
...
@@ -37,13 +37,13 @@
</scroll-view>
<view
class=
"btton-box"
>
<u-button
size=
"80"
:ripple=
"true"
shape=
"circle"
:custom-style=
"
{
backgroundColor: mc,
height: '80rpx',
color: '#FFF',
fontSize: '14px',
margin: '0 3vw',
width: '90vw',
}"
backgroundColor: mc,
height: '80rpx',
color: '#FFF',
fontSize: '14px',
margin: '0 3vw',
width: '90vw',
}"
@click="popupClose">确定
</u-button>
</view>
</view>
...
...
@@ -52,7 +52,7 @@
<
script
>
export
default
{
props
:
[
"list"
,
"current"
,
"currentPrice"
,
"order"
],
props
:
[
"list"
,
"current"
,
"
price"
,
"
currentPrice"
,
"order"
],
data
()
{
return
{
mc
:
""
,
...
...
@@ -75,7 +75,7 @@
},
methods
:
{
checkOrderCoupon
(){
if
(
this
.
currentPrice
.
teamType
==
1
)
{
if
(
this
.
currentPrice
&&
this
.
currentPrice
.
teamType
==
1
)
{
//totalSeat:总机位 isSubstitution:1 (可候补) leaderNum:领队
const
shengyu
=
this
.
currentPrice
.
totalSeat
-
this
.
currentPrice
.
leaderNum
...
...
@@ -90,9 +90,18 @@
this
.
ts
.
forEach
(
x
=>
{
if
(
x
.
couponsUseScope
==
10
)
x
.
err
=
errorMsg
})
console
.
log
(
this
.
ts
)
this
.
ts
.
sort
((
a
,
b
)
=>
{
const
aerr
=
(
a
.
err
?
a
.
err
:
''
).
length
const
berr
=
(
b
.
err
?
b
.
err
:
''
).
length
return
aerr
-
berr
})
}
this
.
ts
.
forEach
((
x
)
=>
{
if
(
!
x
.
err
&&
x
.
useCondition
>
this
.
price
){
x
.
err
=
'订单金额不满足'
}
})
console
.
log
(
'useCondition'
)
},
popupClose
()
{
if
(
this
.
currentChosen
!=
this
.
current
)
{
...
...
node_modules/uview-ui/components/u-modal/u-modal.vue
View file @
81450a70
<
template
>
<view>
<u-popup
:zoom=
"zoom"
mode=
"center"
:z-index=
"uZIndex"
v-model=
"value"
:length=
"width"
:mask-close-able=
"false"
:border-radius=
"borderRadius"
>
<view
class=
"u-model"
>
<view
class=
"u-model"
:style=
"
{'border-radius': `${borderRadius}rpx`}"
>
<view
v-if=
"showTitle"
class=
"u-model-title u-line-1"
:style=
"[titleStyle]"
>
{{
title
}}
</view>
<view
class=
"u-model-content"
>
<slot
v-if=
"contentSlot"
>
...
...
pages/airTicket/components/guest/index.vue
View file @
81450a70
<
template
>
<view>
<view
class=
"row items-center"
>
<u-radio-group
v-model=
"ia"
>
<u-radio
shape=
"circle"
>
月明人倚楼
</u-radio>
</u-radio-group>
<view
class=
"flight-guest"
>
<view
class=
"row items-center"
style=
"margin-top: 24rpx;"
>
<view
class=
"num row items-center"
>
<text
style=
"padding: 6rpx;"
>
剩余
</text>
<text
class=
"col text-center"
style=
"padding:6rpx;background-color: #B99846;"
>
{{
maxNum
}}
张
</text>
</view>
<view
v-if=
"(crCount+etCount+babyCount)>0"
class=
"col text-right"
style=
"font-size: 26rpx;color: #1D1D20;"
>
<text>
已选:
</text>
<text
class=
"q-ml-sm"
>
{{
crCount
}}
成人
</text>
<text
class=
"q-ml-sm"
>
{{
etCount
}}
儿童
</text>
<text
class=
"q-ml-sm"
>
{{
babyCount
}}
婴儿
</text>
</view>
</view>
<view
class=
"row items-center"
v-for=
"(x,i) in showGuests"
style=
"padding: 30rpx 0;"
>
<u-checkbox-group>
<u-checkbox
:disabled=
"!x.Checked && !canChecked && x.year>1"
shape=
"circle"
v-model=
"x.Checked"
active-color=
"#B99846"
></u-checkbox>
</u-checkbox-group>
<view
class=
"col q-ml-md q-mr-md"
>
<view
class=
"row items-center"
>
<view
class=
"guest-name"
>
{{
x
.
SurName
}}
/
{{
x
.
GivenName
}}
{{
x
.
Name
!=
''
?
`(${x.Name
}
)`
:
''
}}
<
/view
>
<
view
class
=
"guest-tag"
:
class
=
"{'cr':x.year>11,'et':x.year>1&&x.year<12,'baby':x.year<2
}
"
>
{{
x
.
year
>
11
?
'成人'
:(
x
.
year
>
2
?
'儿童'
:
'婴儿'
)
}}
<
/view
>
<
/view
>
<
view
class
=
"guest-card"
>
护照号
{{
x
.
Passport
}}
<
text
class
=
"q-ml-sm"
>
{{
x
.
Sex
==
'M'
?
'男'
:
'女'
}}
<
/text
>
<
/view
>
<
/view
>
<
view
@
click
=
"updateGuestHandle(x)"
style
=
"width: 50px;height: 50rpx;align-items: flex-end;"
class
=
"column justify-center"
>
<
u
-
icon
name
=
"pen_"
custom
-
prefix
=
"tffont"
color
=
"#B99846"
size
=
"30"
><
/u-icon
>
<
/view
>
<
/view
>
<
view
class
=
"add"
@
click
=
"listVisible=true"
>
{{
showGuests
.
length
==
0
?
'添加乘机人'
:
'更多乘机人'
}}
<
/view
>
<
u
-
popup
mode
=
"bottom"
border
-
radius
=
"20"
:
popup
=
"false"
v
-
model
=
"listVisible"
:
maskCloseAble
=
"true"
length
=
"auto"
:
safeAreaInsetBottom
=
"true"
@
close
=
"()=>listVisible=false"
:
z
-
index
=
"9999"
>
<
guest
-
list
:
list
=
"guests"
ref
=
"guestManagerRef"
:
max
-
num
=
"maxNum"
@
selected
=
"selectedHandle"
@
change
=
"guestChangeHandle"
><
/guest-list
>
<
/u-popup
>
<
/view
>
<
/template
>
<
script
>
import
GuestList
from
'./list.vue'
export
default
{
data
(){
return
{
ia
:
false
checked
:
false
,
guestObj
:{
Id
:
''
,
Name
:
''
,
SurName
:
''
,
GivenName
:
''
,
Sex
:
'M'
,
BrithDay
:
''
,
Country
:
''
,
IdCard
:
''
,
IdCardExpired
:
''
,
Passport
:
''
,
PassportExpired
:
''
,
Mobile
:
''
}
,
guests
:[],
listVisible
:
false
}
}
,
props
:{
maxNum
:{
type
:
Number
}
}
,
components
:{
GuestList
}
,
computed
:
{
showGuests
()
{
this
.
guests
.
forEach
(
x
=>
{
if
(
x
.
Checked
)
x
.
Display
=
true
}
)
const
r
=
this
.
guests
.
filter
(
x
=>
x
.
Display
)
return
r
}
,
crCount
(){
const
r
=
this
.
guests
.
filter
(
x
=>
x
.
year
>=
12
&&
x
.
Checked
)
return
r
.
length
}
,
etCount
(){
const
r
=
this
.
guests
.
filter
(
x
=>
x
.
year
>=
2
&&
x
.
year
<
12
&&
x
.
Checked
)
return
r
.
length
}
,
babyCount
(){
const
r
=
this
.
guests
.
filter
(
x
=>
x
.
year
<
2
&&
x
.
Checked
)
return
r
.
length
}
,
canChecked
(){
const
r
=
this
.
guests
.
filter
(
x
=>
x
.
year
>=
2
&&
x
.
Checked
)
return
r
.
length
<
this
.
maxNum
}
}
,
watch
:
{
guests
:
{
deep
:
true
,
immediate
:
true
,
handler
:
function
(
newVal
,
oldVal
)
{
this
.
checkedChange
()
}
,
}
,
}
,
created
()
{
if
(
uni
.
getStorageSync
(
'guest'
)){
this
.
guests
=
uni
.
getStorageSync
(
'guest'
).
filter
(
x
=>
x
.
Id
!=
''
)
this
.
guests
.
forEach
((
x
,
i
)
=>
{
x
.
Checked
=
false
x
.
Display
=
i
==
0
}
)
this
.
calcYearHandle
()
this
.
chosenGuest
=
this
.
guests
.
slice
(
0
,
1
)
}
}
,
methods
:{
guestChangeHandle
(
val
){
this
.
guests
=
val
}
,
checkedChange
(){
const
r
=
this
.
guests
.
filter
(
x
=>
x
.
Checked
)
this
.
$emit
(
'selected'
,
r
)
}
,
selectedHandle
(
val
){
this
.
guests
=
val
this
.
listVisible
=
false
}
,
calcYearHandle
(
date
){
this
.
guests
.
forEach
(
x
=>
{
x
.
year
=
this
.
calculateAge
(
x
.
BirthDay
)
}
)
}
,
updateGuestHandle
(
g
){
this
.
$refs
.
guestManagerRef
.
createNewGuest
(
g
)
this
.
listVisible
=
true
}
,
calculateAge
(
birthDate
)
{
const
birth
=
new
Date
(
birthDate
);
const
now
=
new
Date
();
let
birthYear
=
birth
.
getFullYear
();
let
birthMonth
=
birth
.
getMonth
();
let
birthDay
=
birth
.
getDate
();
let
currentYear
=
now
.
getFullYear
();
let
currentMonth
=
now
.
getMonth
();
let
currentDay
=
now
.
getDate
();
let
age
=
currentYear
-
birthYear
;
if
(
currentMonth
<
birthMonth
||
(
currentMonth
===
birthMonth
&&
currentDay
<
birthDay
))
{
age
--
;
}
return
age
;
}
}
}
<
/script
>
<
style
>
.
flight
-
guest
{
margin
:
10
px
;
}
.
flight
-
guest
*
{
line
-
height
:
1
;
}
.
flight
-
guest
.
guest
-
name
{
font
-
weight
:
bold
;
font
-
size
:
30
rpx
;
color
:
#
1
D1D20
;
line
-
height
:
1
;
}
.
flight
-
guest
.
guest
-
card
{
font
-
size
:
26
rpx
;
color
:
#
9999
A5
;
font
-
weight
:
300
;
margin
-
top
:
10
rpx
;
}
.
flight
-
guest
.
add
{
padding
:
22
rpx
;
background
-
color
:
#
00000009
;
font
-
size
:
26
rpx
;
font
-
weight
:
bold
;
text
-
align
:
center
;
color
:
#
000
;
border
-
radius
:
12
rpx
;
margin
-
top
:
30
rpx
;
}
.
flight
-
guest
.
num
{
margin
-
top
:
24
rpx
;
border
-
radius
:
7
rpx
;
background
-
color
:
#
080
A09
;
font
-
size
:
22
rpx
;
font
-
weight
:
400
;
color
:
#
FFF
;
overflow
:
hidden
;
padding
:
0
;
line
-
height
:
1
;
}
.
flight
-
guest
.
num
{
border
-
radius
:
7
rpx
;
background
-
color
:
#
080
A09
;
font
-
size
:
22
rpx
;
font
-
weight
:
400
;
color
:
#
FFF
;
overflow
:
hidden
;
padding
:
0
;
line
-
height
:
1
;
width
:
120
rpx
;
}
.
guest
-
tag
{
font
-
size
:
22
rpx
;
padding
:
6
rpx
14
rpx
;
line
-
height
:
1
;
border
-
radius
:
8
rpx
;
margin
-
left
:
20
rpx
;
}
.
guest
-
tag
.
cr
{
background
-
color
:
#
FFFFFF
;
color
:
#
2979
ff
;
border
:
1
px
solid
#
2979
ff
;
}
.
guest
-
tag
.
et
{
background
-
color
:
#
FFFFFF
;
color
:
#
f90
;
border
:
1
px
solid
#
f90
;
}
.
guest
-
tag
.
baby
{
background
-
color
:
#
FFFFFF
;
color
:
#
fa3534
;
border
:
1
px
solid
#
fa3534
;
}
<
/style>
\ No newline at end of file
pages/airTicket/components/guest/list.vue
0 → 100644
View file @
81450a70
This diff is collapsed.
Click to expand it.
pages/airTicket/flightDetail.vue
View file @
81450a70
This diff is collapsed.
Click to expand it.
pages/airTicket/ticketList/ticketList.vue
View file @
81450a70
...
...
@@ -49,7 +49,7 @@
</view>
<scroll-view
scroll-y=
"true"
class=
"col"
style=
"width: 100%;height: 1px;"
>
<view
style=
"padding:30rpx"
>
<view
class=
"flight-card"
v-for=
"(x,i) in flights"
>
<view
class=
"flight-card"
@
click=
"nativageToOrderHandle(x.TCID)"
v-for=
"(x,i) in flights"
>
<view
class=
"q-mt-md row items-start"
>
<view
class=
"col"
>
...
...
@@ -240,6 +240,11 @@
}
);
}
,
methods
:
{
nativageToOrderHandle
(
id
){
uni
.
navigateTo
({
url
:
'/pages/airTicket/flightDetail?id='
+
id
}
)
}
,
applySorting
(
flights
)
{
switch
(
this
.
sortBy
)
{
case
0
:
...
...
pages/jiuzhai/jz_Reserve.vue
View file @
81450a70
...
...
@@ -422,7 +422,7 @@
</view>
</view>
<view
class=
"empty-block"
></view>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:list=
"couponList"
:current=
"useCouponId"
@
close=
"closeCouponHandler"
:current-price=
"realCurrentPriceInfo"
:order=
"orderMsg"
></coupon>
<coupon
v-if=
"couponList.length > 0 && showCoupon"
:
price=
"price"
:
list=
"couponList"
:current=
"useCouponId"
@
close=
"closeCouponHandler"
:current-price=
"realCurrentPriceInfo"
:order=
"orderMsg"
></coupon>
<view
style=
"padding: 50rpx 40rpx"
v-if=
"tips != ''"
>
<view
class=
"big-title"
>
<text>
重要提示
</text>
...
...
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