Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
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
viitto
million
Commits
d9875797
Commit
d9875797
authored
Apr 18, 2024
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化车产品详情
parent
f6cbbaa5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
45 deletions
+55
-45
orderPreview.vue
src/components/car/orderPreview.vue
+25
-25
calendar.vue
src/components/trip/calendar.vue
+10
-0
detailsCar.vue
src/pages/detailsCar.vue
+20
-20
No files found.
src/components/car/orderPreview.vue
View file @
d9875797
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇機場
</div>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇機場
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
v-for=
"(x,i) in dataList.AirportList"
:key=
"i"
>
<div
v-for=
"(x,i) in dataList.AirportList"
:key=
"i"
>
<q-chip
size=
"14px"
clickable
@
click=
"handleSelect(x,1)"
<q-chip
size=
"14px"
clickable
@
click=
"handleSelect(x,1)"
:text-color=
"selectedAirportObj&&selectedAirportObj.Id==x.Id?'white':'dark'"
:text-color=
"selectedAirportObj&&selectedAirportObj.Id==x.Id?'white':'dark'"
:color=
"selectedAirportObj&&selectedAirportObj.Id==x.Id?'primary':'grey-3'"
square
>
{{
x
.
AirportName
}}
</q-chip>
:color=
"selectedAirportObj&&selectedAirportObj.Id==x.Id?'primary':'grey-3'"
square
>
{{
x
.
AirportName
}}
</q-chip>
</div>
</div>
</div>
</div>
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
<div class="text-grey-6 f12 q-my-md">選擇上車範圍</div>
<div class="text-grey-6 f12 q-my-md">選擇上車範圍</div>
<div class="row wrap">
<div class="row wrap">
<div v-for="(x,i) in dataList.PlaceList" :key="i">
<div v-for="(x,i) in dataList.PlaceList" :key="i">
<q-chip size="14px" clickable @click="handleSelect(x,3)"
<q-chip size="14px" clickable @click="handleSelect(x,3)"
:text-color="onCarObj&&onCarObj.Id==x.Id?'white':'dark'"
:text-color="onCarObj&&onCarObj.Id==x.Id?'white':'dark'"
:color="onCarObj&&onCarObj.Id==x.Id?'primary':'grey-3'" square>{{ x.Name }}({{ x.Range }}m)</q-chip>
:color="onCarObj&&onCarObj.Id==x.Id?'primary':'grey-3'" square>{{ x.Name }}({{ x.Range }}m)</q-chip>
</div>
</div>
</div>
</div>
...
@@ -35,20 +35,20 @@
...
@@ -35,20 +35,20 @@
<div class="text-grey-6 f12 q-my-md">選擇下車範圍</div>
<div class="text-grey-6 f12 q-my-md">選擇下車範圍</div>
<div class="row wrap">
<div class="row wrap">
<div v-for="(x,i) in dataList.PlaceList" :key="i">
<div v-for="(x,i) in dataList.PlaceList" :key="i">
<q-chip size="14px" clickable @click="handleSelect(x,4)"
<q-chip size="14px" clickable @click="handleSelect(x,4)"
:text-color="unCarObj&&unCarObj.Id==x.Id?'white':'dark'"
:text-color="unCarObj&&unCarObj.Id==x.Id?'white':'dark'"
:color="unCarObj&&unCarObj.Id==x.Id?'primary':'grey-3'" square>{{ x.Name }}({{ x.Range }}m)</q-chip>
:color="unCarObj&&unCarObj.Id==x.Id?'primary':'grey-3'" square>{{ x.Name }}({{ x.Range }}m)</q-chip>
</div>
</div>
</div>
</div>
</div>
</div>
</div> -->
</div> -->
<
template
v-if=
"TicketIds&&TicketIds.length>0"
>
<
template
v-if=
"TicketIds&&TicketIds.length>0"
>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇車類型
</div>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇車類型
</div>
<div
class=
"row wrap"
>
<div
class=
"row wrap"
>
<div
v-for=
"(x,i) in dataList.CarTypeList"
:key=
"i"
>
<div
v-for=
"(x,i) in dataList.CarTypeList"
:key=
"i"
>
<q-chip
v-if=
"TicketIds.indexOf(x.Id)!=-1"
size=
"14px"
clickable
@
click=
"handleSelect(x,2)"
<q-chip
v-if=
"TicketIds.indexOf(x.Id)!=-1"
size=
"14px"
clickable
@
click=
"handleSelect(x,2)"
:text-color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'white':'dark'"
:text-color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'white':'dark'"
:color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'primary':'grey-3'"
square
>
{{
x
.
CarName
}}
(
{{
x
.
PeopleNum
}}
人)
</q-chip>
:color=
"selectedCarObj&&selectedCarObj.Id==x.Id?'primary':'grey-3'"
square
>
{{
x
.
CarName
}}
(
{{
x
.
PeopleNum
}}
人)
</q-chip>
</div>
</div>
</div>
</div>
...
@@ -116,23 +116,23 @@
...
@@ -116,23 +116,23 @@
<div
class=
"q-mt-md text-right"
<div
class=
"q-mt-md text-right"
:class=
"{'row wrap justify-end items-start':$q.platform.is.mobile}"
>
:class=
"{'row wrap justify-end items-start':$q.platform.is.mobile}"
>
<span
:class=
"{'col-12 q-mb-sm':$q.platform.is.mobile}"
>
<span
:class=
"{'col-12 q-mb-sm':$q.platform.is.mobile}"
>
<span
class=
"f12 text-negative"
v-if=
"!p.startDate"
<span
class=
"f12 text-negative"
v-if=
"!p.startDate"
:class=
"{'q-mr-lg':$q.platform.is.desktop}"
>
:class=
"{'q-mr-lg':$q.platform.is.desktop}"
>
{{$q.platform.is.mobile?'請選擇上面的出行日期':'請選擇左側的出行日期'}}
{{$q.platform.is.mobile?'請選擇上面的出行日期':'請選擇左側的出行日期'}}
</span>
</span>
<span
class=
"f12 text-negative"
<span
class=
"f12 text-negative"
:class=
"{'q-mr-lg':$q.platform.is.desktop}"
:class=
"{'q-mr-lg':$q.platform.is.desktop}"
v-if=
"(p.startDate&&!selectedCarObj)
v-if=
"(p.startDate&&!selectedCarObj)
||(p.startDate&&dataList.CarType==1&&!selectedAirportObj)
||(p.startDate&&dataList.CarType==1&&!selectedAirportObj)
||(p.startDate&&dataList.CarType==2&&!selectedAirportObj)"
>
||(p.startDate&&dataList.CarType==2&&!selectedAirportObj)"
>
{{`請選擇上面的${dataList.CarType==3?'車類型':dataList.CarType==1?'機場、車類型':'機場、車類型'}`}}
{{`請選擇上面的${dataList.CarType==3?'車類型':dataList.CarType==1?'機場、車類型':'機場、車類型'}`}}
</span>
</span>
</span>
</span>
<q-btn
color=
"primary"
label=
"立即訂購"
unelevated
class=
"q-px-lg"
<q-btn
color=
"primary"
label=
"立即訂購"
unelevated
class=
"q-px-lg"
:disable=
"sumPrice==0||!selectedCarObj
:disable=
"sumPrice==0||!selectedCarObj
||(dataList.CarType!=3&&!selectedAirportObj)"
||(dataList.CarType!=3&&!selectedAirportObj)"
@
click=
"goOrderHandler"
/>
@
click=
"goOrderHandler"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -154,7 +154,7 @@ export default {
...
@@ -154,7 +154,7 @@ export default {
}
}
}
}
this
.
calcMoney
()
this
.
calcMoney
()
},
},
deep
:
true
,
deep
:
true
,
immediate
:
false
immediate
:
false
...
@@ -162,7 +162,7 @@ export default {
...
@@ -162,7 +162,7 @@ export default {
dataList
:
{
dataList
:
{
handler
(
n
,
o
)
{
handler
(
n
,
o
)
{
this
.
dataList
=
n
;
this
.
dataList
=
n
;
this
.
handleSelect
(
n
.
AirportList
[
0
],
1
)
},
},
deep
:
true
,
deep
:
true
,
immediate
:
true
immediate
:
true
...
@@ -226,8 +226,8 @@ export default {
...
@@ -226,8 +226,8 @@ export default {
this
.
priceList
=
[]
this
.
priceList
=
[]
this
.
apipost
(
this
.
apipost
(
"b2c_get_GetCarSingleProductMonthPrice"
,
"b2c_get_GetCarSingleProductMonthPrice"
,
{
{
ProductId
:
this
.
configId
,
ProductId
:
this
.
configId
,
Month
:
this
.
Month
,
Month
:
this
.
Month
,
AirportId
:
''
,
AirportId
:
''
,
CarTypeId
:
this
.
selectedCarObj
.
Id
CarTypeId
:
this
.
selectedCarObj
.
Id
...
@@ -272,16 +272,16 @@ export default {
...
@@ -272,16 +272,16 @@ export default {
this
.
resetHandler
()
this
.
resetHandler
()
}
}
}
}
},
null
)
},
null
)
},
},
getCarPriceData
()
{
getCarPriceData
()
{
this
.
priceList
=
[]
this
.
priceList
=
[]
this
.
apipost
(
this
.
apipost
(
"b2c_get_GetCarSingleProductMonthPriceAll"
,
"b2c_get_GetCarSingleProductMonthPriceAll"
,
{
{
ProductId
:
this
.
configId
,
ProductId
:
this
.
configId
,
Month
:
this
.
Month
,
Month
:
this
.
Month
,
// AirportId: '',
// AirportId: '',
// CarTypeId: this.selectedCarObj.Id
// CarTypeId: this.selectedCarObj.Id
...
@@ -290,7 +290,7 @@ export default {
...
@@ -290,7 +290,7 @@ export default {
if
(
r
.
data
.
resultCode
==
1
)
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
dataAll
=
r
.
data
.
data
this
.
dataAll
=
r
.
data
.
data
}
}
},
null
)
},
null
)
},
},
handleSelectAirport
(
item
){
handleSelectAirport
(
item
){
...
@@ -307,7 +307,7 @@ export default {
...
@@ -307,7 +307,7 @@ export default {
}
else
if
(
type
==
4
){
}
else
if
(
type
==
4
){
this
.
unCarObj
=
item
this
.
unCarObj
=
item
}
}
},
},
initModel
()
{
initModel
()
{
this
.
sumPrice
=
0
this
.
sumPrice
=
0
...
...
src/components/trip/calendar.vue
View file @
d9875797
...
@@ -132,6 +132,7 @@ export default {
...
@@ -132,6 +132,7 @@ export default {
let
current
=
this
.
months
.
findIndex
((
x
)
=>
x
.
monthValue
==
firstMonth
)
let
current
=
this
.
months
.
findIndex
((
x
)
=>
x
.
monthValue
==
firstMonth
)
this
.
currentMonth
=
current
>-
1
?
current
:
0
;
this
.
currentMonth
=
current
>-
1
?
current
:
0
;
this
.
changeMonthHandler
();
this
.
changeMonthHandler
();
},
},
createChosenDateHandler
()
{
createChosenDateHandler
()
{
let
beginDate
=
new
Date
();
let
beginDate
=
new
Date
();
...
@@ -174,6 +175,15 @@ export default {
...
@@ -174,6 +175,15 @@ export default {
price
,
price
,
});
});
newBeginDate
=
date
.
addToDate
(
newBeginDate
,
{
days
:
1
});
newBeginDate
=
date
.
addToDate
(
newBeginDate
,
{
days
:
1
});
// 默认日期 价格
let
InitialOption
=
false
for
(
let
i
=
0
;
i
<
this
.
col
.
length
;
i
++
){
if
(
!
InitialOption
&&
this
.
col
[
i
].
price
&&
this
.
col
[
i
].
price
.
remainNum
>
0
)
{
this
.
currentDate
=
this
.
col
[
i
].
value
;
this
.
$emit
(
"change"
,
this
.
col
[
i
]);
InitialOption
=
true
}
}
}
}
let
after
=
6
-
date
.
formatDate
(
newBeginDate
,
"d"
);
let
after
=
6
-
date
.
formatDate
(
newBeginDate
,
"d"
);
for
(
let
i
=
0
;
i
<
after
;
i
++
)
{
for
(
let
i
=
0
;
i
<
after
;
i
++
)
{
...
...
src/pages/detailsCar.vue
View file @
d9875797
<
template
>
<
template
>
<div
style=
"min-height: 80vh"
>
<div
style=
"min-height: 80vh"
>
<div
<div
style=
"
style=
"
position: fixed;
position: fixed;
...
@@ -139,10 +139,10 @@
...
@@ -139,10 +139,10 @@
icon=
"iconfont iconOwner-1"
icon=
"iconfont iconOwner-1"
label=
" 直營產品"
label=
" 直營產品"
/>
/>
<q-chip
<q-chip
v-if=
"dataList.TravelHours>0"
class=
"transparent q-mr-xl no-padding"
v-if=
"dataList.TravelHours>0"
class=
"transparent q-mr-xl no-padding"
square
square
icon=
"iconfont icontime"
icon=
"iconfont icontime"
:label=
"`包車時長:$
{dataList.TravelHours} h`" />
:label=
"`包車時長:$
{dataList.TravelHours} h`" />
<q-chip
<q-chip
class=
"transparent q-mr-xl no-padding"
class=
"transparent q-mr-xl no-padding"
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
color=
"primary"
color=
"primary"
label=
"選擇方案"
label=
"選擇方案"
unelevated
unelevated
@
click=
"goScrollHandler(priceListHeight)"
@
click=
"goScrollHandler(priceListHeight)"
:class=
"
{ 'q-mt-md full-width': $q.platform.is.desktop }"
:class=
"
{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
/>
...
@@ -253,7 +253,7 @@
...
@@ -253,7 +253,7 @@
@
getPriceList=
"getPriceList"
@
getPriceList=
"getPriceList"
ref=
"orderPreview"
ref=
"orderPreview"
></order-preview>
></order-preview>
</div>
</div>
<!--方案选择区 -->
<!--方案选择区 -->
<div
class=
"text-h6 q-pt-lg"
v-if=
"$q.platform.is.mobile"
>
<div
class=
"text-h6 q-pt-lg"
v-if=
"$q.platform.is.mobile"
>
...
@@ -356,7 +356,7 @@
...
@@ -356,7 +356,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -418,7 +418,7 @@
...
@@ -418,7 +418,7 @@
'q-px-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
'q-px-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
}"
></div>
></div>
<div
<div
class=
"text-h5 text-weight-bold text-left q-mt-xl"
class=
"text-h5 text-weight-bold text-left q-mt-xl"
ref=
"warning"
ref=
"warning"
...
@@ -432,8 +432,8 @@
...
@@ -432,8 +432,8 @@
class=
"q-mt-lg trip-text bg-orange-1 q-pa-md rounded-borders q-mb-xl"
class=
"q-mt-lg trip-text bg-orange-1 q-pa-md rounded-borders q-mb-xl"
style=
"border: 1px dashed var(--q-color-warning)"
style=
"border: 1px dashed var(--q-color-warning)"
v-html=
"
v-html=
"
dataList.
feature
dataList.
BuyNotes
? dataList.
feature.importantTip
|| '暂无购买须知'
? dataList.
BuyNotes
|| '暂无购买须知'
: '暂无购买须知'
: '暂无购买须知'
"
"
:class=
"
{
:class=
"
{
...
@@ -548,7 +548,7 @@
...
@@ -548,7 +548,7 @@
</div>
</div>
<template
v-if=
"$q.platform.is.desktop"
>
<template
v-if=
"$q.platform.is.desktop"
>
<div
class=
"col-1"
></div>
<div
class=
"col-1"
></div>
<div
class=
"col q-ml-xl position-relative"
>
<div
class=
"col q-ml-xl position-relative"
>
<div
style=
"position: sticky; top: 100px"
>
<div
style=
"position: sticky; top: 100px"
>
...
@@ -645,7 +645,7 @@ export default {
...
@@ -645,7 +645,7 @@ export default {
"由於交通擁堵,時長可能會略有變化"
,
"由於交通擁堵,時長可能會略有變化"
,
"每增加 30 分鐘,將收取相應的延期費。 (現場支付)"
,
"每增加 30 分鐘,將收取相應的延期費。 (現場支付)"
,
],
],
showOrderPreview
:
fals
e
,
showOrderPreview
:
tru
e
,
videoPosition
:
0
,
videoPosition
:
0
,
currentHeight
:
0
,
currentHeight
:
0
,
isPictureInPicture
:
false
,
isPictureInPicture
:
false
,
...
@@ -818,7 +818,7 @@ export default {
...
@@ -818,7 +818,7 @@ export default {
window
.
removeEventListener
(
"scroll"
,
this
.
handleScroll
);
window
.
removeEventListener
(
"scroll"
,
this
.
handleScroll
);
}
}
},
},
getScroll
()
{
getScroll
()
{
return
{
return
{
left
:
left
:
...
@@ -949,7 +949,7 @@ export default {
...
@@ -949,7 +949,7 @@ export default {
// console.log('异常信息', error)
// console.log('异常信息', error)
}
}
});
});
}
else
{
}
else
{
this
.
$message
.
error
(
r
.
data
.
message
)
this
.
$message
.
error
(
r
.
data
.
message
)
}
}
...
@@ -965,11 +965,11 @@ export default {
...
@@ -965,11 +965,11 @@ export default {
this
.
currentYM
.
str
=
time
this
.
currentYM
.
str
=
time
this
.
$refs
.
orderPreview
.
resetHandler
()
this
.
$refs
.
orderPreview
.
resetHandler
()
}
}
this
.
apipost
(
this
.
apipost
(
"b2c_get_GetCarSingleProductMonthPrice"
,
"b2c_get_GetCarSingleProductMonthPrice"
,
{
{
ProductId
:
this
.
msg
.
configId
,
ProductId
:
this
.
msg
.
configId
,
Month
:
this
.
currentYM
.
str
,
Month
:
this
.
currentYM
.
str
,
AirportId
:
''
,
AirportId
:
''
,
CarTypeId
:
this
.
selectedCar
CarTypeId
:
this
.
selectedCar
...
@@ -1006,9 +1006,9 @@ export default {
...
@@ -1006,9 +1006,9 @@ export default {
this
.
priceList
=
[]
this
.
priceList
=
[]
this
.
priceList
=
JSON
.
parse
(
JSON
.
stringify
(
arr
))
this
.
priceList
=
JSON
.
parse
(
JSON
.
stringify
(
arr
))
}
}
}
}
},
null
)
},
null
)
},
},
menu
()
{
menu
()
{
...
@@ -1191,4 +1191,4 @@ export default {
...
@@ -1191,4 +1191,4 @@ export default {
margin
:
20px
0
;
margin
:
20px
0
;
border-radius
:
10px
;
border-radius
:
10px
;
}
}
</
style
>
</
style
>
\ 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