Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
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
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
罗超
bigwood
Commits
0a28c0d4
Commit
0a28c0d4
authored
Jun 24, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
道旅酒店查询调整
parent
7ab44afb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
167 additions
and
57 deletions
+167
-57
quasar.conf.js
quasar.conf.js
+2
-3
didahotel.ts
src/api/didahotel.ts
+33
-28
DidaHeader.vue
src/components/scattered/dida/DidaHeader.vue
+132
-26
No files found.
quasar.conf.js
View file @
0a28c0d4
...
@@ -64,14 +64,13 @@ module.exports = configure(function (ctx) {
...
@@ -64,14 +64,13 @@ module.exports = configure(function (ctx) {
publicPath
:
ctx
.
dev
?
'/'
:
'./'
,
publicPath
:
ctx
.
dev
?
'/'
:
'./'
,
env
:
ctx
.
dev
env
:
ctx
.
dev
?
{
?
{
BASE_APP_API
:
'http://192.168.
10.214
/api/common/post'
,
BASE_APP_API
:
'http://192.168.
5.46
/api/common/post'
,
JAVA_URL_API
:
'http://efficient.oytour.com'
,
JAVA_URL_API
:
'http://efficient.oytour.com'
,
VERSION
:
require
(
'./package.json'
).
version
,
VERSION
:
require
(
'./package.json'
).
version
,
}
}
:
{
:
{
BASE_APP_API
:
"http://newerpapi.oytour.com/api/common/post"
,
//台湾使用
BASE_APP_API
:
"http://reborn.oytour.com/api/common/post"
,
//和平使用
//BASE_APP_API: 'https://reborn.oytour.com/api/common/post', //和平使用
JAVA_URL_API
:
'http://efficient.oytour.com'
,
JAVA_URL_API
:
'http://efficient.oytour.com'
,
VERSION
:
require
(
'./package.json'
).
version
VERSION
:
require
(
'./package.json'
).
version
},
},
...
...
src/api/didahotel.ts
View file @
0a28c0d4
...
@@ -10,6 +10,11 @@ class DidaService {
...
@@ -10,6 +10,11 @@ class DidaService {
return
request
(
'dmc_post_GetDiDaCityBaseInfo'
,
param
,
false
)
return
request
(
'dmc_post_GetDiDaCityBaseInfo'
,
param
,
false
)
}
}
//获取道旅国家
static
async
GetDiDaCountry
():
Promise
<
HttpResponse
>
{
return
request
(
'dmc_post_GetDiDaCountryExtList'
,
{},
false
)
}
//获取道旅酒店类型
//获取道旅酒店类型
static
async
GetDidaPropertyCategory
(
param
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetDidaPropertyCategory
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'dmc_post_GetDidaPropertyCategory'
,
param
,
false
)
return
request
(
'dmc_post_GetDidaPropertyCategory'
,
param
,
false
)
...
@@ -26,39 +31,39 @@ class DidaService {
...
@@ -26,39 +31,39 @@ class DidaService {
return
request
(
'dmc_post_GetDidaBedTypeBaseInfo'
,
param
,
false
)
return
request
(
'dmc_post_GetDidaBedTypeBaseInfo'
,
param
,
false
)
}
}
//道旅酒店详情
//道旅酒店详情
static
async
GetHotelRoomsList
(
param
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetHotelRoomsList
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'dmc_post_GetDiDaPriceSearchList'
,
param
)
return
request
(
'dmc_post_GetDiDaPriceSearchList'
,
param
)
}
}
//道旅酒店详情
//道旅酒店详情
static
async
GetHotelDetails
(
param
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetHotelDetails
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'dmc_post_GetDidaHotelDetails'
,
param
)
return
request
(
'dmc_post_GetDidaHotelDetails'
,
param
)
}
}
//道旅酒店下单确认
//道旅酒店下单确认
static
async
GetDiDaPriceConfirm
(
param
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetDiDaPriceConfirm
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'dmc_post_GetDiDaPriceConfirm'
,
param
)
return
request
(
'dmc_post_GetDiDaPriceConfirm'
,
param
)
}
}
//道旅酒店创建订单
//道旅酒店创建订单
static
async
GetDiDaBookingConfirm
(
param
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetDiDaBookingConfirm
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'dmc_post_GetDiDaBookingConfirm'
,
param
)
return
request
(
'dmc_post_GetDiDaBookingConfirm'
,
param
)
}
}
//散客订单取消确认
//散客订单取消确认
static
async
GetDiDaBookingCancelConfirm
(
param
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetDiDaBookingCancelConfirm
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'dmc_post_GetDiDaBookingCancelConfirm'
,
param
)
return
request
(
'dmc_post_GetDiDaBookingCancelConfirm'
,
param
)
}
}
//散客订单预取消
//散客订单预取消
static
async
GetDiDaBookingCancel
(
param
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetDiDaBookingCancel
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'dmc_post_GetDiDaBookingCancel'
,
param
)
return
request
(
'dmc_post_GetDiDaBookingCancel'
,
param
)
}
}
//散客订单详情
//散客订单详情
static
async
GetDiDaBookingSearchList
(
param
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetDiDaBookingSearchList
(
param
:
any
):
Promise
<
HttpResponse
>
{
return
request
(
'dmc_post_GetDiDaBookingSearchList'
,
param
)
return
request
(
'dmc_post_GetDiDaBookingSearchList'
,
param
)
}
}
// 道旅酒店列表
// 道旅酒店列表
static
async
GetDidaHotelList
(
param
:
any
):
Promise
<
HttpResponse
>
{
static
async
GetDidaHotelList
(
param
:
any
):
Promise
<
HttpResponse
>
{
param
.
reviewRatingUpperLimits
=
param
.
reviewRatingUpperLimits
&&
param
.
reviewRatingUpperLimits
!=
''
?
param
.
reviewRatingUpperLimits
:
0
param
.
reviewRatingUpperLimits
=
param
.
reviewRatingUpperLimits
&&
param
.
reviewRatingUpperLimits
!=
''
?
param
.
reviewRatingUpperLimits
:
0
...
...
src/components/scattered/dida/DidaHeader.vue
View file @
0a28c0d4
...
@@ -4,15 +4,35 @@
...
@@ -4,15 +4,35 @@
v-if=
"$q.platform.is.desktop"
v-if=
"$q.platform.is.desktop"
style=
"min-width: 190px"
style=
"min-width: 190px"
unelevated
unelevated
v-model=
"search.C
it
yCode"
v-model=
"search.C
ountr
yCode"
dense
dense
:options=
"Areas"
:options=
"Areas"
emit-value
emit-value
option-label=
"CountryName_CN"
option-value=
"ISOCountryCode"
map-options
:label=
"$t('hotel.area')"
standout
@
update:model-value=
"changeCountry"
use-input
@
filter=
"filterCountry"
/>
<q-select
v-if=
"$q.platform.is.desktop"
class=
"q-ml-lg col-2"
style=
"min-width: 190px"
unelevated
v-model=
"search.CityCode"
dense
:options=
"CityList"
emit-value
option-label=
"CityName_CN"
option-label=
"CityName_CN"
option-value=
"CityCode"
option-value=
"CityCode"
map-options
map-options
:label=
"$t('hotel.area')"
:label=
"$t('hotel.area')"
standout
standout
use-input
@
filter=
"filterCity"
/>
/>
<q-field
<q-field
v-if=
"$q.platform.is.desktop"
v-if=
"$q.platform.is.desktop"
...
@@ -37,7 +57,7 @@
...
@@ -37,7 +57,7 @@
></q-date>
></q-date>
</q-popup-proxy>
</q-popup-proxy>
</q-field>
</q-field>
<div
class=
"col"
></div>
<div
class=
"col"
></div>
<q-btn
unelevated
class=
"bg-grey-3 hover q-mr-md"
:title=
"$t('morequery')"
>
<q-btn
unelevated
class=
"bg-grey-3 hover q-mr-md"
:title=
"$t('morequery')"
>
<q-badge
<q-badge
...
@@ -99,7 +119,7 @@
...
@@ -99,7 +119,7 @@
</q-popup-proxy>
</q-popup-proxy>
</q-field>
</q-field>
</div>
</div>
<div
class=
"q-my-md row items-center"
>
<div
class=
"q-my-md row items-center"
>
<q-input
<q-input
v-model=
"search.MinPrice"
v-model=
"search.MinPrice"
...
@@ -128,13 +148,27 @@
...
@@ -128,13 +148,27 @@
dense
dense
:options=
"HotelRoomTypes"
:options=
"HotelRoomTypes"
emit-value
emit-value
option-label=
"Name_CN"
option-value=
"ID"
option-value=
"ID"
clearable
clearable
map-options
map-options
:label=
"$t('v101.scattered.fangxingtype')"
:label=
"$t('v101.scattered.fangxingtype')"
standout
standout
/>
>
<template
v-slot:option=
"scope"
>
<q-item
v-bind=
"scope.itemProps"
>
<q-item-section>
<q-item-label>
<template
v-if=
"scope.opt.Name_CN && scope.opt.Name_CN != ''"
>
{{
scope
.
opt
.
Name_CN
}}
</
template
>
<
template
v-else
>
{{
scope
.
opt
.
Name
}}
</
template
>
</q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</div>
<div
class=
"q-my-md"
>
<div
class=
"q-my-md"
>
<q-select
<q-select
...
@@ -186,8 +220,13 @@
...
@@ -186,8 +220,13 @@
</q-card>
</q-card>
</q-popup-proxy>
</q-popup-proxy>
</q-btn>
</q-btn>
<q-btn
color=
"primary"
unelevated
:label=
"$t('query')"
:loading=
"loading"
@
click=
"setData"
/>
<q-btn
color=
"primary"
unelevated
:label=
"$t('query')"
:loading=
"loading"
@
click=
"setData"
/>
</div>
</div>
</template>
</template>
...
@@ -205,7 +244,7 @@ import {
...
@@ -205,7 +244,7 @@ import {
onMounted
,
onMounted
,
watch
,
watch
,
}
from
"vue"
;
}
from
"vue"
;
import
message
from
'../../../utils/message'
import
message
from
"../../../utils/message"
;
import
{
NCascader
,
NSelect
}
from
"naive-ui"
;
import
{
NCascader
,
NSelect
}
from
"naive-ui"
;
import
{
date
}
from
"quasar"
;
import
{
date
}
from
"quasar"
;
import
{
HotelRate
,
HotelArea
,
useHotel
}
from
"../../../utils/hotelRate"
;
import
{
HotelRate
,
HotelArea
,
useHotel
}
from
"../../../utils/hotelRate"
;
...
@@ -221,7 +260,10 @@ export default defineComponent({
...
@@ -221,7 +260,10 @@ export default defineComponent({
const
{
t
}
=
useI18n
();
const
{
t
}
=
useI18n
();
const
data
=
reactive
({
const
data
=
reactive
({
scrollStyle
:
{}
as
any
,
scrollStyle
:
{}
as
any
,
Areas
:
[]
as
any
,
//区域
Areas
:
[]
as
any
,
//国家列表
AllAreas
:
[]
as
any
,
//所有国家
CityList
:
[]
as
any
,
//城市列表
AllCityList
:
[]
as
any
,
//所有城市列表
cascader
:
{
cascader
:
{
addressValue
:
null
,
addressValue
:
null
,
}
as
any
,
}
as
any
,
...
@@ -241,9 +283,10 @@ export default defineComponent({
...
@@ -241,9 +283,10 @@ export default defineComponent({
HotelLiveRates
:
[]
as
Array
<
HotelRate
>
,
//住宿类型
HotelLiveRates
:
[]
as
Array
<
HotelRate
>
,
//住宿类型
HotelRoomTypes
:
[]
as
Array
<
HotelRate
>
,
//房类型
HotelRoomTypes
:
[]
as
Array
<
HotelRate
>
,
//房类型
HotelMealTypes
:
[]
as
Array
<
HotelRate
>
,
//餐型
HotelMealTypes
:
[]
as
Array
<
HotelRate
>
,
//餐型
HotelDidaPropertyCategory
:[]
as
Array
<
HotelRate
>
,
HotelDidaPropertyCategory
:
[]
as
Array
<
HotelRate
>
,
keyWords
:
""
as
stringify
,
keyWords
:
""
as
stringify
,
CityCode
:
''
as
stringify
,
CityCode
:
""
as
stringify
,
CountryCode
:
""
as
stringify
,
});
});
for
(
let
i
=
1
;
i
<
11
;
i
++
)
{
for
(
let
i
=
1
;
i
<
11
;
i
++
)
{
data
.
theRooms
.
push
(
i
);
data
.
theRooms
.
push
(
i
);
...
@@ -278,7 +321,7 @@ export default defineComponent({
...
@@ -278,7 +321,7 @@ export default defineComponent({
data
.
hotelsRates
=
useHotel
.
getHotelRate
();
data
.
hotelsRates
=
useHotel
.
getHotelRate
();
data
.
HotelMealTypes
=
useHotel
.
getHotelMeal
();
data
.
HotelMealTypes
=
useHotel
.
getHotelMeal
();
data
.
HotelConceptTypes
=
useHotel
.
getHotelConcept
();
data
.
HotelConceptTypes
=
useHotel
.
getHotelConcept
();
data
.
CityCode
=
data
.
CityCode
;
data
.
CityCode
=
data
.
CityCode
;
const
methods
=
{
const
methods
=
{
dateRangeHandler
(
e
:
any
)
{
dateRangeHandler
(
e
:
any
)
{
search
.
CheckInDate
=
`
${
e
.
from
.
year
}
/
${
e
.
from
.
month
}
/
${
e
.
from
.
day
}
`
;
search
.
CheckInDate
=
`
${
e
.
from
.
year
}
/
${
e
.
from
.
month
}
/
${
e
.
from
.
day
}
`
;
...
@@ -297,8 +340,11 @@ export default defineComponent({
...
@@ -297,8 +340,11 @@ export default defineComponent({
CheckInDate
:
search
.
CheckInDate
,
CheckInDate
:
search
.
CheckInDate
,
CheckOutDate
:
search
.
CheckOutDate
,
CheckOutDate
:
search
.
CheckOutDate
,
};
};
// 先不缓存
// 先不缓存
localStorage
.
setItem
(
DirtionmaryHelper
.
SCATTERED_DiDaHOTEL_DATE
,
JSON
.
stringify
(
d
));
localStorage
.
setItem
(
DirtionmaryHelper
.
SCATTERED_DiDaHOTEL_DATE
,
JSON
.
stringify
(
d
)
);
},
},
//获取道旅餐食类型
//获取道旅餐食类型
getdidaMealType
()
{
getdidaMealType
()
{
...
@@ -316,10 +362,67 @@ export default defineComponent({
...
@@ -316,10 +362,67 @@ export default defineComponent({
}
}
});
});
},
},
filterCountry
(
val
:
string
,
update
:
any
)
{
console
.
log
(
"val"
,
val
);
if
(
update
)
{
update
(()
=>
{
if
(
val
===
""
)
{
data
.
Areas
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
AllAreas
));
}
else
{
const
needle
=
val
.
toLowerCase
();
data
.
Areas
=
data
.
AllAreas
.
filter
(
(
v
)
=>
v
.
CountryName_CN
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
});
}
},
//国家切换
changeCountry
(
e
:
any
)
{
if
(
e
)
{
methods
.
getdidaCity
();
}
else
{
data
.
CityList
=
[];
search
.
CityCode
=
""
;
}
},
//获取道旅国家
getdidaCountry
()
{
DidaService
.
GetDiDaCountry
().
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempArray
=
res
.
data
.
data
;
data
.
Areas
=
tempArray
;
data
.
AllAreas
=
tempArray
;
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
if
(
tempArray
.
findIndex
((
item
)
=>
item
.
ISOCountryCode
==
"JP"
)
!=
-
1
)
{
search
.
CountryCode
=
"JP"
;
}
else
{
search
.
CountryCode
=
data
.
Areas
[
0
].
ISOCountryCode
;
}
}
methods
.
getdidaCity
();
}
});
},
//城市筛选
filterCity
(
val
:
string
,
update
:
any
)
{
if
(
update
)
{
update
(()
=>
{
if
(
val
===
""
)
{
data
.
CityList
=
JSON
.
parse
(
JSON
.
stringify
(
data
.
AllCityList
));
}
else
{
const
needle
=
val
.
toLowerCase
();
data
.
CityList
=
data
.
AllCityList
.
filter
(
(
v
)
=>
v
.
CityName_CN
.
toLowerCase
().
indexOf
(
needle
)
>
-
1
);
}
});
}
},
//获取道旅城市
//获取道旅城市
getdidaCity
()
{
getdidaCity
()
{
var
cityParm
=
{
var
cityParm
=
{
CountryCode
:
"JP"
,
CountryCode
:
search
.
CountryCode
,
};
};
var
newCity
=
[]
as
any
;
var
newCity
=
[]
as
any
;
DidaService
.
GetDidaCity
(
cityParm
).
then
((
res
)
=>
{
DidaService
.
GetDidaCity
(
cityParm
).
then
((
res
)
=>
{
...
@@ -328,16 +431,19 @@ export default defineComponent({
...
@@ -328,16 +431,19 @@ export default defineComponent({
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
tempArray
.
forEach
((
item
)
=>
{
tempArray
.
forEach
((
item
)
=>
{
if
(
item
.
Type
==
"City"
)
{
if
(
item
.
Type
==
"City"
)
{
var
obj
=
{
var
obj
=
{
CityCode
:
item
.
CityCode
,
CityCode
:
item
.
CityCode
,
CityName_CN
:
item
.
CityName_CN
,
CityName_CN
:
item
.
CityName_CN
,
}
}
;
newCity
.
push
(
obj
);
newCity
.
push
(
obj
);
}
}
});
});
}
}
data
.
Areas
=
newCity
;
data
.
CityList
=
newCity
;
search
.
CityCode
=
data
.
Areas
[
0
].
CityCode
;
data
.
AllCityList
=
newCity
;
if
(
data
.
CityList
&&
data
.
CityList
.
length
>
0
)
{
search
.
CityCode
=
data
.
CityList
[
0
].
CityCode
;
}
}
}
});
});
},
},
...
@@ -359,11 +465,11 @@ export default defineComponent({
...
@@ -359,11 +465,11 @@ export default defineComponent({
search
.
Name_CN
=
data
.
keyWords
;
search
.
Name_CN
=
data
.
keyWords
;
return
setCnt
;
return
setCnt
;
});
});
watch
(
search
,
(
n
,
o
)
=>
{
watch
(
search
,
(
n
,
o
)
=>
{
methods
.
setData
()
methods
.
setData
()
;
})
})
;
onMounted
(()
=>
{
onMounted
(()
=>
{
methods
.
getdidaC
it
y
();
methods
.
getdidaC
ountr
y
();
methods
.
getdidaBedType
();
methods
.
getdidaBedType
();
methods
.
getdidaMealType
();
methods
.
getdidaMealType
();
methods
.
setData
();
methods
.
setData
();
...
...
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