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
28d1b0a4
Commit
28d1b0a4
authored
Mar 06, 2023
by
youjie
Browse files
Options
Browse Files
Download
Plain Diff
no message
parents
1ae5c56f
4a757fff
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
913 additions
and
271 deletions
+913
-271
quasar.conf.js
quasar.conf.js
+2
-1
auth.png
src/assets/img/nonedata/auth.png
+0
-0
data.png
src/assets/img/nonedata/data.png
+0
-0
order.png
src/assets/img/nonedata/order.png
+0
-0
pay.png
src/assets/img/nonedata/pay.png
+0
-0
user.js
src/boot/user.js
+34
-0
utils.js
src/boot/utils.js
+6
-2
auth.vue
src/components/common/auth.vue
+57
-0
noneData.vue
src/components/common/noneData.vue
+36
-0
calendar.vue
src/components/trip/calendar.vue
+8
-0
flight.vue
src/components/trip/flight.vue
+112
-0
orderPreview.vue
src/components/trip/orderPreview.vue
+134
-42
startCity.vue
src/components/trip/startCity.vue
+40
-0
quasar.variables.scss
src/css/quasar.variables.scss
+8
-14
detailsNew.vue
src/pages/detailsNew.vue
+50
-9
orderPreview.vue
src/pages/line/orderPreview.vue
+425
-203
login.vue
src/pages/login.vue
+1
-0
No files found.
quasar.conf.js
View file @
28d1b0a4
...
...
@@ -169,7 +169,8 @@ module.exports = function( /* ctx */ ) {
'QStepper'
,
'QStep'
,
'QToggle'
,
'QTime'
'QTime'
,
'QSpace'
],
directives
:
[
...
...
src/assets/img/nonedata/auth.png
0 → 100644
View file @
28d1b0a4
14.6 KB
src/assets/img/nonedata/data.png
0 → 100644
View file @
28d1b0a4
12.4 KB
src/assets/img/nonedata/order.png
0 → 100644
View file @
28d1b0a4
10.7 KB
src/assets/img/nonedata/pay.png
0 → 100644
View file @
28d1b0a4
10 KB
src/boot/user.js
0 → 100644
View file @
28d1b0a4
const
user
=
{
get
userInfo
()
{
if
(
localStorage
.
b2bUser
)
{
let
u
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'b2bUser'
))
console
.
log
(
'鑒定權限........'
,
u
)
debugger
;
if
(
u
.
token
)
{
return
u
}
else
{
localStorage
.
removeItem
(
'b2bUser'
)
return
null
}
}
else
{
return
null
}
},
set
userInfo
(
u
)
{
if
(
u
)
{
localStorage
.
setItem
(
'b2bUser'
,
JSON
.
stringify
(
u
))
}
},
loginOut
()
{
localStorage
.
setItem
(
'b2bUser'
,
JSON
.
stringify
(
u
))
},
appraisal
()
{
if
(
!
user
.
userInfo
)
{
this
.
CommonJump
(
'/login'
,
{
r
:
encodeURIComponent
(
location
.
href
)
});
}
}
}
export
default
user
\ No newline at end of file
src/boot/utils.js
View file @
28d1b0a4
...
...
@@ -4,11 +4,15 @@ import md5 from 'js-md5'
// import {eventBus} from './eventBus'
// import VueCoreVideoPlayer from 'vue-core-video-players'
import
'viewerjs/dist/viewer.css'
import
Vuelidate
from
'vuelidate'
import
user
from
'./user'
import
VueViewer
from
'v-viewer'
// import VueCoreVideoPlayer from 'vue-core-video-player'
Vue
.
prototype
.
$EventBus
=
new
Vue
()
// Vue.use(VueCoreVideoPlayer)
Vue
.
use
(
VueViewer
)
Vue
.
prototype
.
$md5
=
md5
;
Vue
.
use
(
Vuelidate
)
//域名管理对象
Vue
.
prototype
.
domainManager
=
function
()
{
let
domainUrl
=
''
;
...
...
@@ -20,7 +24,7 @@ Vue.prototype.domainManager = function() {
domainUrl
=
"http://testapi.oytour.com"
;
}
else
if
(
domainNameUrl
.
indexOf
(
'oytour'
)
!==
-
1
)
{
domainUrl
=
"http://reborn.oytour.com"
;
domainUrl
=
'http://192.168.10.206:8015'
domainUrl
=
'http://192.168.10.206:8015'
//'http://192.168.10.206:8015' ''http://192.168.10.11:8083' '
}
var
obj
=
{
//主地址
...
...
@@ -196,7 +200,7 @@ Vue.prototype.CommonJump = function(path, obj) {
query
:
obj
});
}
Vue
.
prototype
.
$user
=
user
Vue
.
prototype
.
createCalendar
=
function
(
dateStr
)
{
var
days
=
[];
var
date
;
...
...
src/components/common/auth.vue
0 → 100644
View file @
28d1b0a4
<
template
>
<q-dialog
v-model=
"isShow"
persistent
>
<q-card
flat
class=
"light-shadow q-pa-md"
>
<q-card-section>
<div
class=
"text-h6 text-weight-bold"
>
登錄提示
</div>
</q-card-section>
<q-card-section>
<div
class=
"text-center"
>
<img
src=
"../../assets/img/nonedata/auth.png"
width=
"267"
>
<div
class=
"q-mt-lg text-grey-8"
>
你還沒有登錄哦,登錄或註冊後可以享受更多權益
</div>
</div>
</q-card-section>
<q-card-actions
align=
"right"
>
<q-btn
flat
label=
"前往註冊"
color=
"primary"
class=
"q-px-lg"
@
click=
"goRegist"
/>
<q-btn
unelevated
label=
"立即登錄"
color=
"primary"
class=
"q-px-lg"
@
click=
"goLogin"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
isShow
:
true
}
},
created
()
{
try
{
let
u
=
localStorage
.
getItem
(
"b2bUser"
)
if
(
u
){
u
=
JSON
.
parse
(
u
)
if
(
u
.
token
){
this
.
isShow
=
false
}
}
}
catch
(
error
)
{
}
},
methods
:
{
goLogin
(){
this
.
CommonJump
(
'/login'
,
{
r
:
encodeURIComponent
(
location
.
href
)});
},
goRegist
(){
this
.
CommonJump
(
'/login'
,
{
r
:
encodeURIComponent
(
location
.
href
),
t
:
1
});
}
},
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/components/common/noneData.vue
0 → 100644
View file @
28d1b0a4
<
template
>
<div
:style=
"
{'width':size}" class="inline-block">
<img
src=
"../../assets/img/nonedata/data.png"
width=
"100%"
class=
"q-mb-lg"
v-if=
"iconType=='data'"
>
<img
src=
"../../assets/img/nonedata/order.png"
width=
"100%"
class=
"q-mb-lg"
v-if=
"iconType=='order'"
>
<img
src=
"../../assets/img/nonedata/pay.png"
width=
"100%"
class=
"q-mb-lg"
v-if=
"iconType=='pay'"
>
<div
class=
"text-center text-subtitle1 text-weight-bolder"
>
{{
title
}}
</div>
<div
class=
"text-center text-grey-6 q-mt-lg"
v-if=
"subtitle!=''"
>
{{
subtitle
}}
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:{
size
:{
type
:
String
,
default
:
"267px"
},
iconType
:{
type
:
String
,
default
:
""
},
title
:{
type
:
String
,
default
:
"暂无信息"
},
subtitle
:{
type
:
String
,
default
:
""
}
}
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/components/trip/calendar.vue
View file @
28d1b0a4
...
...
@@ -182,6 +182,14 @@ export default {
this
.
$emit
(
"change"
,
item
);
}
},
changePriceHandler
(
dateStr
,
money
){
//this.currentDate.price.originalB2CPrice=money
this
.
col
.
forEach
(
x
=>
{
if
(
x
.
value
==
dateStr
){
x
.
price
.
originalB2CPrice
=
money
}
})
},
reset
()
{
this
.
currentDate
=
""
;
},
...
...
src/components/trip/flight.vue
0 → 100644
View file @
28d1b0a4
<
template
>
<div
v-if=
"m && m.priceFlight && m.priceFlight.length > 0"
>
<div
class=
"text-h5 text-weight-bold text-left"
ref=
"feature"
:class=
"
{
'q-px-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
>
航班資訊
</div>
<div
class=
"q-my-lg rounded-borders bg-white q-pa-md"
>
<div
v-for=
"(x,i) in m.priceFlight"
:key=
"i"
>
<div
class=
"row items-center"
>
<q-chip
size=
"10px"
square
color=
"positive"
outline
v-if=
"x.flightType==1"
>
去程
</q-chip>
<q-chip
size=
"10px"
square
color=
"accent"
outline
v-if=
"x.flightType==2"
>
中轉
</q-chip>
<q-chip
size=
"10px"
square
color=
"negative"
outline
v-if=
"x.flightType==3"
>
回程
</q-chip>
<div
class=
"q-ml-md text-grey-7"
>
<div
class=
"row"
>
<div
class=
"text-subtitle2"
>
{{
formatDateHandler
(
x
.
arriveDate
)
}}
</div>
<div
class=
"q-ml-lg row items-center"
>
<span>
{{
x
.
departureName
}}
</span>
<q-icon
name=
"iconfont iconswap-right"
class=
"q-mx-sm"
size=
"20px"
/>
<span>
{{
x
.
arrivalCityName
}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"q-pl-lg q-mt-md row "
style=
"height:66px; margin-left: 0px;"
>
<div
class=
"column text-weight-bold"
>
<div
class=
"col"
>
{{
formatDateHandler
(
x
.
arriveDate
,
"MM月DD日"
)
}}
</div>
<div>
{{
x
.
departureTime
>
x
.
arrivalTime
?
formatAddDateHandler
(
x
.
arriveDate
,
1
,
"MM月DD日"
):
formatDateHandler
(
x
.
arriveDate
,
"MM月DD日"
)
}}
</div>
</div>
<div
class=
"column text-weight-bold q-ml-md"
>
<div
class=
"col"
>
{{
x
.
departureTime
}}
</div>
<div>
{{
x
.
arrivalTime
}}
</div>
</div>
<div
class=
"column items-center q-ml-md"
>
<div
style=
"width: 8px;height: 8px;border-radius: 8px;background: #ccd6e5;"
class=
"q-mt-sm"
></div>
<div
class=
"col"
style=
"background: #ccd6e5;width:2px"
></div>
<div
style=
"width: 8px;height: 8px;border-radius: 8px;background: #ccd6e5;"
class=
"q-mb-sm"
></div>
</div>
<div
class=
"column text-weight-bold q-ml-md"
>
<div
class=
"col"
>
{{
x
.
departureAirPortName
}}
</div>
<div>
{{
x
.
arrivalAirPortName
}}
</div>
</div>
<q-space
/>
<div
class=
"column"
>
<div
class=
"col row"
>
<q-img
:src=
"`http://pic.tripcdn.com/airline_logo/32/$
{x.flightNumber.substring(0,2).toLowerCase()}.png`" spinner-color="white" style="height: 18px; width: 18px" />
<div
class=
"q-ml-sm"
style=
"font-size:16px;"
>
{{
x
.
alName
}}
</div>
</div>
<div
class=
"q-pl-lg text-grey-5"
>
<span
style=
"text-decoration: dashed;text-decoration-line: underline;"
>
{{
x
.
flightNumber
}}
</span>
<span
class=
"q-ml-md"
>
經濟艙
</span>
</div>
</div>
</div>
<q-separator
color=
"grey-2"
class=
"q-my-md"
v-if=
"i
<m
.
priceFlight
.
length-1
"
/>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
date
}
from
"quasar"
;
export
default
{
props
:
[
"price"
],
watch
:
{
price
:
{
handler
(
n
,
o
)
{
this
.
m
=
n
;
console
.
log
(
n
)
},
deep
:
true
,
immediate
:
true
,
},
},
data
()
{
return
{
m
:
null
,
};
},
created
()
{
this
.
m
=
this
.
price
;
},
methods
:
{
formatDateHandler
(
dateStr
,
formatStr
=
null
){
formatStr
=
formatStr
?
formatStr
:
"YYYY年MM月DD日(dddd)"
return
date
.
formatDate
(
dateStr
,
formatStr
)
},
formatAddDateHandler
(
dateStr
,
day
,
formatStr
=
null
){
formatStr
=
formatStr
?
formatStr
:
"YYYY年MM月DD日(dddd)"
return
date
.
formatDate
(
date
.
addToDate
(
dateStr
,{
days
:
day
}),
formatStr
)
}
},
};
</
script
>
<
style
></
style
>
src/components/trip/orderPreview.vue
View file @
28d1b0a4
<
template
>
<div
class=
"column full-height"
>
<div
class=
"col"
>
<div
class=
"text-right"
>
<div
class=
"text-right"
v-if=
"$q.platform.is.desktop"
>
<q-btn
color=
"primary"
icon=
"refresh"
label=
"全部重選"
@
click=
"resetHandler"
flat
/>
</div>
<div
v-if=
"p && p.unionCityList"
>
<div
class=
"text-grey-6 f12 q-my-md"
>
出發城市
</div>
<div
class=
"row q-col-gutter-sm"
>
<div
v-for=
"(x,i) in p.unionCityList"
:key=
"i"
>
<q-chip
size=
"14px"
clickable
@
click=
"changeCityHandler(x)"
:text-color=
"currentUnionCity.cityId==x.cityId?'white':'dark'"
:color=
"currentUnionCity.cityId==x.cityId?'primary':'grey-3'"
square
>
{{
x
.
cityName
}}
</q-chip>
</div>
</div>
</div>
<div
class=
"text-grey-6 f12 q-my-md"
>
選擇數量
</div>
<div
class=
"row items-end"
>
<div
class=
"col"
:class=
"
{
'column':$q.platform.is.mobile
}">
<div
class=
"col"
:class=
"
{
column: $q.platform.is.mobile
}">
<div>
<span
class=
"text-subtitle2 text-weight-bold"
>
成人
</span>
<span
class=
"text-grey-6 f12 q-ml-sm"
>
(12-99歲)
</span>
...
...
@@ -24,7 +33,11 @@
</div>
</div>
<div
class=
"row items-end"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY
{{
moneyFormat
(
p
.
originalB2CPrice
,
0
)
}}
/每人
</span>
<q-input
...
...
@@ -66,7 +79,7 @@
</div>
</div>
<div
class=
"row items-end q-mt-md"
v-if=
"p.isSupportChildren == 1"
>
<div
class=
"col"
:class=
"{
'column':$q.platform.is.mobile
}"
>
<div
class=
"col"
:class=
"{
column: $q.platform.is.mobile
}"
>
<div>
<span
class=
"text-subtitle2 text-weight-bold"
>
儿童
</span>
<span
class=
"text-grey-6 f12 q-ml-sm"
>
(2-11歲,不占床)
</span>
...
...
@@ -74,12 +87,19 @@
<div
v-if=
"$q.platform.is.mobile"
>
<span
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY
{{ moneyFormat(p.originalB2CPrice - p.childNoNeedPrice, 0) }} /每人
{{
moneyFormat(p.originalB2CPrice - p.childNoNeedPrice, 0)
}}
/每人
</span>
</div>
</div>
<div
class=
"row items-end"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY
{{ moneyFormat(p.originalB2CPrice - p.childNoNeedPrice, 0) }} /每人
</span>
...
...
@@ -123,7 +143,7 @@
</div>
<div
class=
"row items-end q-mt-md"
v-if=
"p.isSupportChildren == 1"
>
<div
class=
"col"
:class=
"{
'column':$q.platform.is.mobile
}"
>
<div
class=
"col"
:class=
"{
column: $q.platform.is.mobile
}"
>
<div>
<span
class=
"text-subtitle2 text-weight-bold"
>
儿童
</span>
<span
class=
"text-grey-6 f12 q-ml-sm"
>
(2-11歲,占床)
</span>
...
...
@@ -131,14 +151,18 @@
<div
v-if=
"$q.platform.is.mobile"
>
<span
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY
{{ moneyFormat(p.childNeedPrice
+
p.originalB2CPrice, 0) }} /每人
{{ moneyFormat(p.childNeedPrice
+
p.originalB2CPrice, 0) }} /每人
</span>
</div>
</div>
<div
class=
"row items-end"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY
{{ moneyFormat(
p.childNeedPrice+
p.originalB2CPrice, 0) }} /每人
{{ moneyFormat(
p.childNeedPrice +
p.originalB2CPrice, 0) }} /每人
</span>
<q-input
style=
"width: 150px"
...
...
@@ -180,19 +204,27 @@
</div>
<div
class=
"row items-end q-mt-md"
v-if=
"p.isSupportChildren == 1"
>
<div
class=
"col"
:class=
"{
'column':$q.platform.is.mobile
}"
>
<div
class=
"col"
:class=
"{
column: $q.platform.is.mobile
}"
>
<div>
<span
class=
"text-subtitle2 text-weight-bold"
>
婴儿
</span>
<span
class=
"text-grey-6 f12 q-ml-sm"
>
(2歲以下)
</span>
</div>
<div
v-if=
"$q.platform.is.mobile"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY {{ moneyFormat(p.babyPrice, 0) }} /每人
</span>
</div>
</div>
<div
class=
"row items-end"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY {{ moneyFormat(p.babyPrice, 0) }} /每人
</span>
<q-input
...
...
@@ -243,7 +275,7 @@
>
<div
class=
"text-grey-6 f12"
>
單房服務
</div>
<div
class=
"row items-end"
>
<div
class=
"col"
:class=
"{
'column':$q.platform.is.mobile
}"
>
<div
class=
"col"
:class=
"{
column: $q.platform.is.mobile
}"
>
<div>
<span
class=
"text-subtitle2 text-weight-bold"
>
單房服務
</span>
<span
class=
"text-grey-6 f12 q-ml-sm"
>
(獨立單間住宿)
</span>
...
...
@@ -255,7 +287,11 @@
</div>
</div>
<div
class=
"row items-end"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
<span
v-if=
"$q.platform.is.desktop"
class=
"text-grey-7 product-price"
style=
"font-size: 13px"
>
CNY {{ moneyFormat(p.singleRoomPrice, 0) }} /每人
</span>
<q-input
...
...
@@ -309,11 +345,26 @@
<div
class=
"q-mt-md q-pt-md"
style=
"border-top: 1px dashed #eee"
>
<div
class=
"row items-center"
>
<span
class=
"text-subtitle2 text-grey-6 col"
>
總金額
</span>
<span
class=
"text-h6 text-primary product-price"
>
CNY {{ moneyFormat(sumPrice,0) }}
</span>
<span
class=
"text-h6 text-primary product-price"
>
CNY {{ moneyFormat(sumPrice, 0) }}
</span
>
</div>
<div
class=
"q-mt-md text-right"
>
<span
class=
"q-mr-lg f12 text-negative"
v-if=
"!p.startDate"
>
{{$q.platform.is.mobile?'請選擇上面的出行日期':'請選擇左側的出行日期'}}
</span>
<q-btn
color=
"primary"
label=
"立即訂購"
unelevated
class=
"q-px-lg"
:disable=
"sumPrice==0"
/>
<span
class=
"q-mr-lg f12 text-negative"
v-if=
"!p.startDate"
>
{{
$q.platform.is.mobile
? "請選擇上面的出行日期"
: "請選擇左側的出行日期"
}}
</span>
<q-btn
color=
"primary"
label=
"立即訂購"
unelevated
class=
"q-px-lg"
@
click=
"goOrderHandler"
:disable=
"sumPrice == 0"
/>
</div>
</div>
</div>
...
...
@@ -321,35 +372,47 @@
<
script
>
export
default
{
props
:
[
"price"
],
props
:
[
"price"
,
'travel'
],
watch
:
{
price
:
{
handler
(
n
,
o
)
{
this
.
p
=
n
;
this
.
chosenObj
.
startDate
=
n
.
startDate
;
this
.
calcMoney
()
console
.
log
(
n
)
this
.
p
=
n
?
n
:{};
if
(
this
.
p
.
startDate
)
{
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
();
if
(
this
.
p
.
unionCityList
&&
this
.
p
.
unionCityList
.
length
>
0
){
this
.
currentUnionCity
=
this
.
p
.
unionCityList
[
0
]
}
}
},
deep
:
true
,
immediate
:
false
,
deep
:
true
},
},
data
()
{
return
{
p
:
{},
chosenObj
:
null
,
sumPrice
:
0
sumPrice
:
0
,
currentUnionCity
:{}
};
},
created
()
{
this
.
initModel
();
if
(
this
.
p
.
startDate
){
this
.
p
=
this
.
price
if
(
this
.
p
&&
this
.
p
.
startDate
)
{
this
.
chosenObj
.
startDate
=
this
.
p
.
startDate
;
this
.
calcMoney
()
if
(
this
.
p
.
unionCityList
&&
this
.
p
.
unionCityList
.
length
>
0
){
this
.
currentUnionCity
=
this
.
p
.
unionCityList
[
0
]
}
}
},
methods
:
{
initModel
()
{
this
.
sumPrice
=
0
this
.
sumPrice
=
0
;
this
.
chosenObj
=
{
startDate
:
""
,
crCount
:
1
,
...
...
@@ -378,16 +441,16 @@ export default {
};
},
resetHandler
()
{
this
.
p
=
{}
;
this
.
initModel
()
this
.
p
=
null
;
this
.
initModel
()
;
this
.
$emit
(
"reset"
);
},
changePeople
(
val
)
{},
addPeople
(
m
,
i
,
isDf
=
false
)
{
this
.
chosenObj
[
m
]
=
parseInt
(
this
.
chosenObj
[
m
])
+
i
;
if
(
m
!=
'crCount'
)
{
if
(
m
!=
"crCount"
)
{
this
.
chosenObj
[
m
]
=
this
.
chosenObj
[
m
]
<
0
?
0
:
this
.
chosenObj
[
m
];
}
else
{
}
else
{
this
.
chosenObj
[
m
]
=
this
.
chosenObj
[
m
]
<
1
?
1
:
this
.
chosenObj
[
m
];
}
if
(
!
isDf
)
{
...
...
@@ -405,16 +468,24 @@ export default {
this
.
chosenObj
[
m
]
=
this
.
chosenObj
[
m
]
-
1
;
}
}
this
.
calcMoney
()
this
.
calcMoney
()
;
},
calcMoney
()
{
if
(
!
this
.
p
)
return
;
let
money
=
this
.
p
.
originalB2CPrice
*
this
.
chosenObj
.
crCount
;
if
(
!
this
.
p
||
!
this
.
p
.
originalB2CPrice
)
{
this
.
sumPrice
=
0
return
;
};
let
money
=
this
.
p
.
originalB2CPrice
*
this
.
chosenObj
.
crCount
;
money
+=
(
this
.
p
.
originalB2CPrice
-
this
.
p
.
childNoNeedPrice
+
this
.
p
.
babyChargePrice
)
*
this
.
chosenObj
.
etbzcCount
;
(
this
.
p
.
originalB2CPrice
-
this
.
p
.
childNoNeedPrice
+
this
.
p
.
babyChargePrice
)
*
this
.
chosenObj
.
etbzcCount
;
money
+=
(
this
.
p
.
originalB2CPrice
+
this
.
p
.
childNeedPrice
+
this
.
p
.
babyChargePrice
)
*
this
.
chosenObj
.
etzcCount
;
(
this
.
p
.
originalB2CPrice
+
this
.
p
.
childNeedPrice
+
this
.
p
.
babyChargePrice
)
*
this
.
chosenObj
.
etzcCount
;
money
+=
this
.
p
.
babyPrice
*
this
.
chosenObj
.
yeCount
;
money
+=
this
.
p
.
singleRoomPrice
*
this
.
chosenObj
.
df
;
...
...
@@ -422,10 +493,31 @@ export default {
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
+
this
.
chosenObj
.
lrCount
;
money
+=
this
.
p
.
visaPrice
*
sumCount
;
//
money += this.p.visaPrice * sumCount;
money
+=
this
.
p
.
otherPrice
*
sumCount
;
this
.
sumPrice
=
money
;
},
changeCityHandler
(
x
){
this
.
currentUnionCity
=
x
this
.
$emit
(
"changeCity"
,
x
)
},
goOrderHandler
(){
let
order
=
{
configId
:
this
.
travel
.
id
,
tcid
:
this
.
p
.
tcid
,
startCityId
:
this
.
currentUnionCity
?
this
.
currentUnionCity
.
cityId
:
this
.
travel
.
startCityId
,
orderInfo
:
this
.
chosenObj
}
let
key
=
this
.
$md5
(
JSON
.
stringify
(
order
))
let
lineCars
=
localStorage
.
getItem
(
'lineCars'
)
lineCars
=
lineCars
?
JSON
.
parse
(
lineCars
):[]
lineCars
.
push
({
key
,
order
})
localStorage
.
setItem
(
"lineCars"
,
JSON
.
stringify
(
lineCars
))
this
.
CommonJump
(
'/lineOrderPriview/'
+
key
,
{});
}
},
};
</
script
>
...
...
src/components/trip/startCity.vue
0 → 100644
View file @
28d1b0a4
<
template
>
<div
v-if=
"m && m.unionCityList"
>
<div
class=
"text-subtitle2 text-weight-bold"
>
選擇出發城市
</div>
<div
class=
"text-grey-6 f12 q-my-sm"
>
此行程包含多個出發城市
</div>
<div
class=
"row q-col-gutter-md"
>
<div
v-for=
"(x,i) in m.unionCityList"
:key=
"i"
><q-chip
size=
"14px"
square
>
{{
x
.
cityName
}}
</q-chip></div>
</div>
</div>
</
template
>
<
script
>
export
default
{
props
:
[
"price"
],
watch
:
{
price
:
{
handler
(
n
,
o
)
{
this
.
m
=
n
;
console
.
log
(
n
)
},
deep
:
true
,
immediate
:
true
,
},
},
data
()
{
return
{
m
:
null
,
};
},
created
()
{
this
.
m
=
this
.
price
;
},
methods
:
{
},
};
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/css/quasar.variables.scss
View file @
28d1b0a4
...
...
@@ -2,25 +2,19 @@
// --------------------------------------------------
// To customize the look and feel of this app, you can override
// the Sass/SCSS variables found in Quasar's source Sass/SCSS files.
// Check documentation for full list of Quasar variables
// Your own variables (that are declared here) and Quasar's own
// ones will be available out of the box in your .vue/.scss/.sass files
// It's highly recommended to change the default colors
// to match your app's branding.
// Tip: Use the "Theme Builder" on Quasar's documentation website.
// $primary : #1976D2;
//$primary : #31C3E0;
$primary
:
#F1416C
;
$secondary
:
#26A69A
;
$accent
:
#9C27B0
;
$dark
:
#1D1D1D
;
$positive
:
#21BA45
;
$negative
:
#C10015
;
$info
:
#31CCEC
;
$warning
:
#F2C037
;
$primary
:
#F1416C
;
$secondary
:
#26A69A
;
$accent
:
#9C27B0
;
$dark
:
#1D1D1D
;
$positive
:
#21BA45
;
$negative
:
#C10015
;
$info
:
#31CCEC
;
$warning
:
#F2C037
;
\ No newline at end of file
src/pages/detailsNew.vue
View file @
28d1b0a4
...
...
@@ -256,7 +256,7 @@
v-if=
"$q.platform.is.mobile"
>
<q-field
class=
"q-m
y
-md"
class=
"q-m
t
-md"
stack-label
label=
"選擇日期、選項"
standout
...
...
@@ -270,17 +270,17 @@
class=
"bg-white q-pa-md"
:priceList=
"dataList.priceList"
@
change=
"changeChosenDateHandler"
ref=
"calendar"
ref=
"calendar
Mobile
"
></calendar>
</q-popup-proxy>
</q-field>
<template
v-if=
"currentPrice && currentPrice.startDate"
>
<order-preview
class=
"q-pa-md
"
:travel=
"dataList
"
:price=
"currentPrice"
@
reset=
"resetHandler"
@
changeCity=
"changeCityHandler"
v-if=
"currentPrice && currentPrice.startDate"
></order-preview>
</
template
>
</div>
<div
class=
"text-h6 q-pt-lg"
v-if=
"$q.platform.is.mobile"
>
...
...
@@ -326,7 +326,7 @@
color=
"primary"
outline
:label=
"showOrderPreview ? '取消選擇' : '選擇'"
@
click=
"
showOrderPreview = !showOrderPreview
"
@
click=
"
changeShowOrderPreviewHandler
"
class=
"q-px-lg"
/>
</div>
...
...
@@ -369,6 +369,8 @@
<order-preview
:price=
"currentPrice"
@
reset=
"resetHandler"
:travel=
"dataList"
@
changeCity=
"changeCityHandler"
></order-preview>
</div>
</div>
...
...
@@ -411,6 +413,7 @@
<div
:class=
"
{ 'col-8': $q.platform.is.desktop, col: $q.platform.is.mobile }"
>
<flight
:price=
"currentPrice"
></flight>
<div
class=
"text-h5 text-weight-bold text-left"
ref=
"feature"
...
...
@@ -607,6 +610,7 @@ import Trip from "src/components/trip/trip.vue";
import
headStyle4
from
"../components/trip/style4"
;
import
headStyle5
from
"../components/trip/style5"
;
import
block
from
"src/components/trip/block/index"
;
import
Flight
from
'src/components/trip/flight.vue'
;
export
default
{
props
:
[],
data
()
{
...
...
@@ -717,6 +721,7 @@ export default {
smaple
,
Trip
,
block
,
Flight
},
watch
:
{
days
:
{
...
...
@@ -769,6 +774,13 @@ export default {
// this.getCarData();
},
methods
:
{
changeShowOrderPreviewHandler
(){
this
.
showOrderPreview
=!
this
.
showOrderPreview
if
(
!
this
.
showOrderPreview
){
this
.
currentPrice
=
null
this
.
changeTripShowHandler
()
}
},
getTopNum
(
x
)
{
this
.
days
=
JSON
.
parse
(
x
);
},
...
...
@@ -779,7 +791,6 @@ export default {
this
.
$refs
[
x
.
val
].
getBoundingClientRect
().
top
+
this
.
currentHeight
-
60
;
console
.
log
(
x
.
top
);
});
});
},
...
...
@@ -860,15 +871,30 @@ export default {
//console.log(e)
},
resetHandler
()
{
this
.
currentPrice
.
startDate
=
""
;
this
.
currentPrice
=
null
;
if
(
this
.
$q
.
platform
.
is
.
mobile
)
this
.
$refs
.
calendarMobile
.
reset
()
else
this
.
$refs
.
calendar
.
reset
();
},
changeChosenDateHandler
(
val
)
{
val
.
price
.
version
=
new
Date
().
getTime
();
this
.
currentPrice
=
JSON
.
parse
(
JSON
.
stringify
(
val
.
price
));
this
.
currentPrice
.
RealPrice
=
this
.
currentPrice
.
RealPrice
?
this
.
currentPrice
.
RealPrice
:
this
.
currentPrice
.
originalB2CPrice
this
.
currentPrice
.
originalB2CPrice
=
this
.
currentPrice
.
RealPrice
if
(
this
.
currentPrice
.
unionCityList
&&
this
.
currentPrice
.
unionCityList
.
length
>
0
){
this
.
currentPrice
.
unionCityList
.
splice
(
0
,
0
,{
cityId
:
this
.
dataList
.
startCityId
,
cityName
:
this
.
dataList
.
startCityName
})
}
if
(
this
.
$q
.
platform
.
is
.
mobile
){
this
.
$refs
.
qDateProxy
.
hide
();
}
this
.
$forceUpdate
()
this
.
$nextTick
(()
=>
{
this
.
changeTripShowHandler
()
});
},
showDialog
()
{
this
.
isShowDialog
=
true
;
...
...
@@ -982,6 +1008,21 @@ export default {
null
);
},
changeCityHandler
(
unionCity
){
this
.
currentPrice
.
originalB2CPrice
=
this
.
currentPrice
.
RealPrice
if
(
unionCity
.
cityId
!=
this
.
dataList
.
startCityId
){
if
(
unionCity
.
backFlight
&&
unionCity
.
backFlight
.
addPrice
){
this
.
currentPrice
.
originalB2CPrice
+=
unionCity
.
backFlight
.
addPrice
}
if
(
unionCity
.
goFlight
&&
unionCity
.
goFlight
.
addPrice
){
this
.
currentPrice
.
originalB2CPrice
+=
unionCity
.
goFlight
.
addPrice
}
}
console
.
log
(
this
.
$refs
)
if
(
this
.
$q
.
platform
.
is
.
desktop
)
this
.
$refs
.
calendar
.
changePriceHandler
(
this
.
currentPrice
.
startDate
,
this
.
currentPrice
.
originalB2CPrice
)
this
.
$forceUpdate
()
},
// 获取车的详情
getCarData
()
{
this
.
$q
.
loading
.
show
();
...
...
src/pages/line/orderPreview.vue
View file @
28d1b0a4
...
...
@@ -37,31 +37,39 @@
row: $q.screen.width >= 1200
&&
$q.platform.is.desktop,
column: $q.screen.width
<
1200
||
$
q
.
platform
.
is
.
mobile
,
}"
v-if=
"orderKey && orderKey != '' && trip && price"
>
<div
class=
"col"
>
<q-card
flat
class=
"q-pa-md"
>
<div
class=
"text-subtitle1 text-weight-bolder"
>
訂購人資訊
</div>
<div
class=
"text-subtitle1 text-weight-bolder"
ref=
"baseUserInfoTitle"
>
訂購人資訊
</div>
<q-separator
color=
"grey-2"
class=
"q-my-md"
/>
<q-form
ref=
"baseUserInfo"
>
<div
class=
"row q-col-gutter-md"
>
<div
:class=
"filedWidth"
>
<q-input
standout
v-model=
"userInfo.last
Name"
v-model=
"userInfo.
Name"
label=
"名字"
mask=
"A"
reverse-fill-mask
ref=
"name"
:rules=
"[(val) => !!val || '請輸入名字']"
/>
</div>
<div
:class=
"filedWidth"
>
<q-input
standout
v-model=
"userInfo.firstName"
v-model=
"userInfo.Surname"
ref=
"surname"
label=
"姓氏"
mask=
"A"
reverse-fill-mask
:rules=
"[(val) => !!val || '請輸入姓氏']"
/>
</div>
<div
:class=
"filedWidth"
>
<q-select
v-model=
"userInfo.c
ountry"
v-model=
"userInfo.C
ountry"
@
input=
"changeCountry"
:options=
"countrys"
emit-value
...
...
@@ -75,27 +83,34 @@
<div
:class=
"filedWidth"
>
<q-input
standout
v-model=
"userInfo.firstNam
e"
v-model=
"userInfo.Mobli
e"
label=
"電話"
mask=
"#"
reverse-fill-mask
ref=
"mobile"
:rules=
"[(val) => !!val || '請輸入行動電話']"
>
<template
v-slot:prepend
>
<div
class=
"text-subtitle2"
>
+
{{
userInfo
.
areaCode
}}
</div>
<div
class=
"text-subtitle2"
>
{{
userInfo
.
PhoneCountryStr
}}
</div>
</
template
>
</q-input>
</div>
<div
:class=
"filedWidth"
>
<q-input
standout
v-model=
"userInfo.mail
"
v-model=
"userInfo.Mailbox
"
label=
"郵箱地址"
:rules=
"[(val) => !!val || '請輸入郵箱地址']"
ref=
"mailbox"
:rules=
"[(val) => /^[a-zA-Z0-9]+([-_.][A-Za-zd]+)*@([a-zA-Z0-9]+[-.])+[A-Za-zd]{2,5}$/.test(val) || '請輸入正確的郵箱地址']"
/>
</div>
<div
:class=
"filedWidth"
>
<q-toggle
v-model=
"isUpdateUserInfo"
label=
"同步更新會員資料"
/>
</div>
</div>
</q-form>
</q-card>
<q-card
flat
class=
"q-pa-md q-mt-lg"
>
...
...
@@ -103,25 +118,24 @@
<div
class=
"row"
>
<q-img
src=
"https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg
"
:src=
"trip.imgCover[0].Url
"
class=
"rounded-borders"
spinner-color=
"grey-3"
style=
"width: 80px"
/>
<div
class=
"q-ml-md col"
>
<div
class=
"text-subtitle1 ellipsis"
>
【夏季限定】加拿大三日游 | 班夫
&
贾斯珀国家公园
&
哥伦比亚冰原 |
卡加利出发卡加利出发卡加利出发
{{ trip.title }}
</div>
<div
class=
"text-caption text-grey-6 ellipsis q-mt-sm"
>
加拿大三日游 | 班夫
&
贾斯珀国家公园
&
哥伦比亚冰原
{{ trip.ltName }}
</div>
</div>
</div>
<div
class=
"q-mt-md row"
>
<div
class=
"text-grey-9"
>
<q-icon
name=
"iconfont iconrili"
size=
"20px"
class=
"q-mr-sm"
/>
<span>
2023-02-27
</span>
<span>
{{ price.startDate }}
</span>
</div>
<div
class=
"text-grey-9 q-ml-md"
>
<q-icon
name=
"iconfont iconpeople"
size=
"20px"
class=
"q-mr-sm"
/>
...
...
@@ -147,8 +161,12 @@
class=
"bg-grey-1 rounded-borders q-pa-md q-mt-md guest-item"
v-for=
"(x, i) in guests"
:key=
"i"
:ref=
"`guest${i}Title`"
>
<div
class=
"text-subtitle1 q-pb-md text-weight-bold"
>
{{ x.FormatTypeName }}
</div>
<div
class=
"text-subtitle1 q-pb-md text-weight-bold"
>
{{ x.FormatTypeName }}
</div>
<q-form
:ref=
"`guest${i}`"
>
<div
class=
"row q-col-gutter-md"
>
<div
:class=
"filedGuestWidth"
>
<q-input
...
...
@@ -187,6 +205,8 @@
v-model=
"x.PassFirstName"
label=
"護照英文姓"
placeholder=
"例:ZHANG"
mask=
"A"
reverse-fill-mask
:rules=
"[(val) => !!val || '請輸護照英文姓']"
/>
</div>
...
...
@@ -196,6 +216,8 @@
v-model=
"x.PassLastName"
label=
"護照英文名"
placeholder=
"例:SAN"
mask=
"A"
reverse-fill-mask
:rules=
"[(val) => !!val || '請輸護照英文名']"
/>
</div>
...
...
@@ -204,6 +226,8 @@
standout
v-model=
"x.Passport"
label=
"護照號"
mask=
"X"
reverse-fill-mask
:rules=
"[(val) => !!val || '請輸護照號']"
/>
</div>
...
...
@@ -213,6 +237,7 @@
v-model=
"x.PassValidate"
label=
"護照有效期"
readonly
:rules=
"[(val) => !!val || '請選擇護照有效期']"
>
<
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
></q-icon>
...
...
@@ -231,27 +256,48 @@
<div
:class=
"filedGuestWidth"
v-if=
"x.GuestType == 1"
>
<q-input
standout
v-model=
"x.PassFirstNam
e"
v-model=
"x.MobilePhon
e"
label=
"聯絡電話"
mask=
"+# #"
reverse-fill-mask
placeholder=
"格式:國家區號+號碼,例如:+81 25xxxx"
/>
</div>
<div
:class=
"filedGuestWidth"
v-if=
"x.EnableSignRoom"
>
<q-toggle
v-model=
"x.IsSignRoom"
:disable=
"disableSign && !x.IsSignRoom"
@
input=
"changeRoomHandler"
label=
"入住單房"
/>
<q-toggle
v-model=
"x.IsSignRoom"
:disable=
"disableSign && !x.IsSignRoom"
@
input=
"changeRoomHandler"
label=
"入住單房"
/>
</div>
</div>
</q-form>
</div>
<div
class=
"text-subtitle1 q-my-md text-weight-bold"
>
特殊需求備註:
</div>
<div
class=
"text-subtitle1 q-my-md text-weight-bold"
>
特殊需求備註:
</div>
<q-input
standout
v-model=
"chosenObj.remark"
input-style=
"height:170px;"
type=
"textarea"
placeholder=
"此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供"
maxlength=
"200"
counter
/>
<q-input
standout
v-model=
"chosenObj.remark"
input-style=
"height:170px;"
type=
"textarea"
placeholder=
"此欄位僅限資料備註。不在商品規範內的個人需求,不保證提供"
maxlength=
"200"
counter
/>
</q-card>
<coupon></coupon>
</div>
<div
class=
"relative-position"
<div
class=
"relative-position"
:class=
"{
'q-ml-lg': !($q.screen.width < 1200 || $q.platform.is.mobile),
'q-mt-lg full-width': $q.screen.width < 1200 || $q.platform.is.mobile,
'q-mt-lg full-width':
$q.screen.width < 1200 || $q.platform.is.mobile,
}"
>
<div
...
...
@@ -262,97 +308,121 @@
$q.screen.width < 1200 || $q.platform.is.mobile
? 'unset'
: '300px',
position:
$q.platform.is.mobile?'unset':
'sticky',
top:
$q.platform.is.mobile?'unset':
'50px',
position:
$q.platform.is.mobile ? 'unset' :
'sticky',
top:
$q.platform.is.mobile ? 'unset' :
'50px',
}"
>
<div
class=
"text-subtitle1 text-weight-bolder"
>
付款明細
</div>
<div
class=
"row q-mt-md"
>
<q-img
src=
"https://image.kkday.com/v2/image/get/s1.kkday.com/product_138437/20230217083232_t5rcO/jpg
"
:src=
"trip.imgCover[0].Url
"
class=
"rounded-borders"
spinner-color=
"grey-3"
style=
"width: 80px"
/>
<div
class=
"q-ml-md col"
>
<div
class=
"text-subtitle1 ellipsis"
>
【夏季限定】加拿大三日游 | 班夫
&
贾斯珀国家公园
&
哥伦比亚冰原 |
卡加利出发卡加利出发卡加利出发
{{ trip.title }}
</div>
<div
class=
"text-caption text-grey-6 ellipsis q-mt-sm"
>
加拿大三日游 | 班夫
&
贾斯珀国家公园
&
哥伦比亚冰原
{{ trip.ltName }}
</div>
</div>
</div>
<div
class=
"q-mt-md text-grey-6"
>
<div
class=
"row"
>
<div
style=
"width: 80px"
>
出發城市:
</div>
<div
class=
"q-ml-md"
>
武漢
起止
</div>
<div
class=
"q-ml-md"
>
{{ unionCity?unionCity.cityName:trip.startCityName }}
起止
</div>
</div>
<div
class=
"row"
>
<div
style=
"width: 80px"
>
出發日期:
</div>
<div
class=
"q-ml-md"
>
2024-02-02
</div>
<div
class=
"q-ml-md"
>
{{ price.startDate }}
</div>
</div>
</div>
<q-separator
color=
"grey-2"
class=
"q-my-md"
/>
<q-separator
color=
"grey-2"
class=
"q-my-md"
/>
<div
class=
"text-grey-9"
>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.crCount
>
0"
>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.crCount
>
0"
>
<div
class=
"col"
>
成人佔床 x {{ chosenObj.crCount }}
</div>
<div>
CNY {{ moneyFormat(
9999,
2) }}
</div>
<div>
CNY {{ moneyFormat(
price.originalB2CPrice,
2) }}
</div>
</div>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.etzcCount
>
0"
>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.etzcCount
>
0"
>
<div
class=
"col"
>
兒童佔床 x {{ chosenObj.etzcCount }}
</div>
<div>
CNY {{ moneyFormat(
9999,
2) }}
</div>
<div>
CNY {{ moneyFormat(
price.originalB2CPrice+price.childNeedPrice,
2) }}
</div>
</div>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.etbzcCount
>
0"
>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.etbzcCount
>
0"
>
<div
class=
"col"
>
兒童不佔床 x {{ chosenObj.etbzcCount }}
</div>
<div>
CNY {{ moneyFormat(
9999,
2) }}
</div>
<div>
CNY {{ moneyFormat(
price.originalB2CPrice-price.childNoNeedPrice,
2) }}
</div>
</div>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.yeCount
>
0"
>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.yeCount
>
0"
>
<div
class=
"col"
>
嬰兒不佔床 x {{ chosenObj.yeCount }}
</div>
<div>
CNY {{ moneyFormat(
9999,
2) }}
</div>
<div>
CNY {{ moneyFormat(
price.babyPrice,
2) }}
</div>
</div>
<hr
style=
"border:none;border-top:1px dashed #EEE !important;"
class=
"bg-transparent q-mb-sm"
/>
<div
class=
"row q-mb-sm"
v-if=
"(chosenObj.etCount)>0"
>
<hr
style=
"border: none; border-top: 1px dashed #eee !important"
class=
"bg-transparent q-mb-sm"
/>
<div
class=
"row q-mb-sm"
v-if=
"chosenObj.etCount > 0"
>
<div
class=
"col"
>
兒童附加費 x {{ chosenObj.etCount }}
</div>
<div>
CNY {{ moneyFormat(
9999,
2) }}
</div>
<div>
CNY {{ moneyFormat(
price.babyChargePrice,
2) }}
</div>
</div>
<div
class=
"row q-mb-sm"
v-if=
"
(chosenObj.df)>
0"
>
<div
class=
"row q-mb-sm"
v-if=
"
chosenObj.df >
0"
>
<div
class=
"col"
>
單房差價 x {{ chosenObj.df }}
</div>
<div>
CNY {{ moneyFormat(
9999,
2) }}
</div>
<div>
CNY {{ moneyFormat(
price.singleRoomPrice,
2) }}
</div>
</div>
<div
class=
"row q-mb-sm items-center"
v-if=
"(chosenObj.df)>0"
>
<div
class=
"row q-mb-sm items-center"
>
<div
class=
"col"
>
總金額
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-primary"
>
CNY {{ moneyFormat(9999,2) }}
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-primary"
>
CNY {{ moneyFormat(sumPrice, 2) }}
</div>
<hr
style=
"border:none;border-top:1px dashed #EEE !important;"
class=
"bg-transparent q-mb-sm"
/>
<div
class=
"row q-mb-sm items-center"
v-if=
"(chosenObj.df)>0"
>
</div>
<hr
style=
"border: none; border-top: 1px dashed #eee !important"
class=
"bg-transparent q-mb-sm"
/>
<div
class=
"row q-mb-sm items-center"
>
<div
class=
"col"
>
優惠金額
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-teal"
>
CNY - {{ moneyFormat(9999,2) }}
</div>
<div
class=
"text-grey-5"
>
暫無優惠
</div>
<div
class=
"text-subtitle2 text-weight-bolder text-teal"
v-if=
"price.discountPrice>0"
>
CNY - {{ moneyFormat(9999, 2) }}
</div>
<div
class=
"text-grey-5"
v-else
>
暫無優惠
</div>
</div>
<div
class=
"row q-mb-sm items-center"
v-if=
"(chosenObj.df)>0"
>
<div
class=
"row q-mb-sm items-center"
>
<div
class=
"col"
>
支付金額
</div>
<div
class=
"text-h6 text-weight-bolder text-primary product-price"
>
CNY {{ moneyFormat(9999,2) }}
</div>
<div
class=
"text-h6 text-weight-bolder text-primary product-price"
>
CNY {{ moneyFormat(sumPrice-price.discountPrice, 2) }}
</div>
</div>
</div>
<div
class=
"text-right q-mt-md"
>
<q-btn
unelevated
color=
"primary"
label=
"立即支付"
/>
<q-btn
unelevated
color=
"primary"
label=
"立即支付"
:loading=
"submiting"
@
click=
"submitHandler"
/>
</div>
</div>
</div>
</div>
<div
v-if=
"!orderKey || orderKey == ''"
class=
"text-center q-my-xl"
>
<none-data
iconType=
"order"
title=
"沒有找到您的訂單信息哦"
subtitle=
"趕緊去挑選心儀的旅遊產品吧,三秒後自動跳轉到首頁"
></none-data>
</div>
<auth></auth>
</div>
</template>
<
script
>
import
{
json
}
from
"body-parser"
;
import
coupon
from
'../../components/common/coupon.vue'
import
coupon
from
"../../components/common/coupon.vue"
;
import
NoneData
from
"src/components/common/noneData.vue"
;
import
auth
from
"src/components/common/auth.vue"
;
export
default
{
components
:{
coupon
components
:
{
coupon
,
NoneData
,
auth
,
},
data
()
{
return
{
step
:
1
,
...
...
@@ -404,12 +474,19 @@ export default {
PassValidate
:
""
,
FormatTypeName
:
""
,
MobilePhone
:
""
,
RoomType
:
0
,
IsSignRoom
:
false
,
RoomType
:
0
,
IsSignRoom
:
false
,
Sex
:
0
,
},
guests
:
[],
disableSign
:
false
disableSign
:
false
,
orderKey
:
""
,
order
:
{},
trip
:
null
,
price
:
null
,
unionCity
:
null
,
sumPrice
:
0
,
submiting
:
false
};
},
computed
:
{
...
...
@@ -424,17 +501,95 @@ export default {
"col-12"
:
this
.
$q
.
screen
.
width
<
1200
,
"col-4"
:
this
.
$q
.
screen
.
width
>=
1200
,
};
}
},
},
created
()
{},
mounted
()
{
this
.
initCountry
();
created
()
{
if
(
this
.
checkParamsHandler
())
{
this
.
initGuestHandler
();
this
.
getTripData
();
this
.
getUserInfoHandler
();
}
},
mounted
()
{},
methods
:
{
changeRoomHandler
(){
let
currentSign
=
this
.
guests
.
filter
(
x
=>
x
.
IsSignRoom
)
this
.
disableSign
=
currentSign
==
this
.
chosenObj
.
df
async
submitHandler
(){
this
.
submiting
=
true
let
flag
=
true
flag
=
await
this
.
formValidateHandler
(
'baseUserInfo'
)
if
(
!
flag
){
this
.
goScrollToForm
(
'baseUserInfoTitle'
)
}
else
{
for
(
let
i
=
0
;
i
<
this
.
guests
.
length
;
i
++
)
{
flag
=
await
this
.
formValidateHandler
(
'guest'
+
i
)
if
(
!
flag
){
this
.
goScrollToForm
(
`guest
${
i
}
Title`
)
break
;
}
}
if
(
flag
){
}
}
this
.
submiting
=
false
},
async
formValidateHandler
(
formName
){
let
temp
=
this
.
$refs
[
formName
]
let
formObj
=
temp
instanceof
Array
?
temp
[
0
]
:
temp
return
formObj
.
validate
()
},
goScrollToForm
(
formName
){
let
temp
=
this
.
$refs
[
formName
]
let
formObj
=
temp
instanceof
Array
?
temp
[
0
]
:
temp
window
.
scrollTo
(
0
,
formObj
.
offsetTop
)
},
checkParamsHandler
()
{
try
{
if
(
this
.
$route
.
params
&&
this
.
$route
.
params
.
id
)
{
let
key
=
this
.
$route
.
params
.
id
;
let
lineCars
=
localStorage
.
getItem
(
"lineCars"
);
lineCars
=
lineCars
?
JSON
.
parse
(
lineCars
)
:
[];
if
(
lineCars
.
length
>
0
)
{
this
.
order
=
lineCars
.
find
((
x
)
=>
x
.
key
==
key
);
console
.
log
(
this
.
order
);
if
(
this
.
order
)
{
this
.
chosenObj
=
this
.
order
.
order
.
orderInfo
;
this
.
orderKey
=
key
;
}
}
}
}
catch
(
error
)
{
console
.
log
(
error
);
}
if
(
this
.
orderKey
==
""
)
{
setTimeout
(()
=>
{
//location.href=location.origin
},
3000
);
}
return
this
.
orderKey
!=
""
;
},
calcMoney
()
{
let
money
=
this
.
price
.
originalB2CPrice
*
this
.
chosenObj
.
crCount
;
money
+=
(
this
.
price
.
originalB2CPrice
-
this
.
price
.
childNoNeedPrice
+
this
.
price
.
babyChargePrice
)
*
this
.
chosenObj
.
etbzcCount
;
money
+=
(
this
.
price
.
originalB2CPrice
+
this
.
price
.
childNeedPrice
+
this
.
price
.
babyChargePrice
)
*
this
.
chosenObj
.
etzcCount
;
money
+=
this
.
price
.
babyPrice
*
this
.
chosenObj
.
yeCount
;
money
+=
this
.
price
.
singleRoomPrice
*
this
.
chosenObj
.
df
;
let
sumCount
=
this
.
chosenObj
.
crCount
+
this
.
chosenObj
.
etCount
//money += this.price.visaPrice * sumCount;
money
+=
this
.
price
.
otherPrice
*
sumCount
;
this
.
sumPrice
=
money
;
},
changeRoomHandler
()
{
let
currentSign
=
this
.
guests
.
filter
((
x
)
=>
x
.
IsSignRoom
);
this
.
disableSign
=
currentSign
==
this
.
chosenObj
.
df
;
},
initGuestHandler
()
{
for
(
let
i
=
0
;
i
<
this
.
chosenObj
.
crCount
;
i
++
)
{
...
...
@@ -479,15 +634,82 @@ export default {
let
temp
=
this
.
countrys
.
find
((
y
)
=>
y
.
ID
==
x
.
ID
);
x
.
EnName
=
`
${
temp
.
EnName
}
(
${
x
.
PhoneCode
}
)`
;
});
this
.
userInfo
.
Country
=
this
.
userInfo
.
Country
==
0
?
this
.
countrys
[
0
].
ID
:
this
.
userInfo
.
Country
;
this
.
changeCountry
(
this
.
userInfo
.
Country
);
});
},
changeCountry
(
id
)
{
this
.
userInfo
.
areaCode
=
this
.
areaCodes
.
find
((
x
)
=>
x
.
ID
==
id
).
PhoneCode
;
this
.
userInfo
.
PhoneCountry
=
this
.
areaCodes
.
find
(
(
x
)
=>
x
.
ID
==
id
).
PhoneCode
;
this
.
userInfo
.
PhoneCountryStr
=
"+"
+
this
.
userInfo
.
PhoneCountry
;
},
getUserInfoHandler
()
{
let
u
=
this
.
$user
.
userInfo
;
if
(
u
)
{
this
.
apipost
(
"GetCustomerInfo_post"
,
{
Id
:
u
.
id
},
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
console
.
log
(
r
.
data
.
data
);
this
.
userInfo
=
r
.
data
.
data
;
}
else
{
this
.
$user
.
userInfo
=
null
;
}
this
.
initCountry
();
});
}
},
getTripData
()
{
this
.
$q
.
loading
.
show
();
let
msg
=
{
cityId
:
this
.
order
.
order
.
startCityId
,
preview
:
0
,
tcid
:
this
.
order
.
order
.
tcid
,
teamType
:
0
,
isGetPriceFlight
:
true
,
pType
:
1
,
//类型 1 来源B2C
newConfigId
:
this
.
order
.
order
.
configId
,
//列表里的configId
};
this
.
apipost
(
"b2b_get_GetB2BTravelInfoV1"
,
msg
,
(
r
)
=>
{
if
(
r
.
data
.
resultCode
==
1
)
{
this
.
trip
=
r
.
data
.
data
;
this
.
trip
.
imgCover
=
JSON
.
parse
(
this
.
trip
.
imgCover
);
this
.
price
=
this
.
trip
.
priceList
[
0
];
if
(
this
.
order
.
order
.
startCityId
!=
this
.
trip
.
startCityId
){
this
.
unionCity
=
this
.
price
.
unionCityList
.
find
(
x
=>
x
.
cityId
==
this
.
order
.
order
.
startCityId
)
if
(
this
.
unionCity
.
backFlight
&&
this
.
unionCity
.
backFlight
.
addPrice
){
this
.
price
.
originalB2CPrice
+=
unionCity
.
backFlight
.
addPrice
}
if
(
this
.
unionCity
.
goFlight
&&
this
.
unionCity
.
goFlight
.
addPrice
){
this
.
price
.
originalB2CPrice
+=
this
.
unionCity
.
goFlight
.
addPrice
}
}
this
.
calcMoney
()
}
else
{
this
.
$q
.
notify
({
type
:
"negative"
,
message
:
r
.
data
.
message
,
position
:
"top"
,
timeout
:
2000
,
// 以毫秒为单位; 0意味着没有超时
});
}
this
.
$q
.
loading
.
hide
();
},
null
);
},
},
};
</
script
>
<
style
>
.order-preview
.q-stepper__content
{
display
:
none
!important
;
...
...
@@ -516,7 +738,7 @@ export default {
.order-preview
.q-toggle__label
{
margin-top
:
12px
;
}
.guest-item
:hover
{
background
:
rgba
(
241
,
65
,
108
,
.04
)
!important
;
.guest-item
:hover
{
background
:
rgba
(
241
,
65
,
108
,
0
.04
)
!important
;
}
</
style
>
src/pages/login.vue
View file @
28d1b0a4
...
...
@@ -270,6 +270,7 @@ export default {
var
jObj
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"baseifo"
));
this
.
logo
=
jObj
.
Config
.
Logo
;
}
this
.
isLogin
=!
this
.
$route
.
query
.
t
||
this
.
$route
.
query
.
t
!=
1
},
watch
:
{
loginType
:
function
()
{
...
...
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