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
Show 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) {
publicPath
:
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'
,
VERSION
:
require
(
'./package.json'
).
version
,
}
:
{
BASE_APP_API
:
"http://newerpapi.oytour.com/api/common/post"
,
//台湾使用
//BASE_APP_API: 'https://reborn.oytour.com/api/common/post', //和平使用
BASE_APP_API
:
"http://reborn.oytour.com/api/common/post"
,
//和平使用
JAVA_URL_API
:
'http://efficient.oytour.com'
,
VERSION
:
require
(
'./package.json'
).
version
},
...
...
src/api/didahotel.ts
View file @
0a28c0d4
...
...
@@ -10,6 +10,11 @@ class DidaService {
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
>
{
return
request
(
'dmc_post_GetDidaPropertyCategory'
,
param
,
false
)
...
...
@@ -26,39 +31,39 @@ class DidaService {
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
)
}
//道旅酒店详情
static
async
GetHotelDetails
(
param
:
any
):
Promise
<
HttpResponse
>
{
}
//道旅酒店详情
static
async
GetHotelDetails
(
param
:
any
):
Promise
<
HttpResponse
>
{
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
)
}
}
//道旅酒店创建订单
static
async
GetDiDaBookingConfirm
(
param
:
any
):
Promise
<
HttpResponse
>
{
//道旅酒店创建订单
static
async
GetDiDaBookingConfirm
(
param
:
any
):
Promise
<
HttpResponse
>
{
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
)
}
}
//散客订单预取消
static
async
GetDiDaBookingCancel
(
param
:
any
):
Promise
<
HttpResponse
>
{
//散客订单预取消
static
async
GetDiDaBookingCancel
(
param
:
any
):
Promise
<
HttpResponse
>
{
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
)
}
}
// 道旅酒店列表
static
async
GetDidaHotelList
(
param
:
any
):
Promise
<
HttpResponse
>
{
param
.
reviewRatingUpperLimits
=
param
.
reviewRatingUpperLimits
&&
param
.
reviewRatingUpperLimits
!=
''
?
param
.
reviewRatingUpperLimits
:
0
...
...
src/components/scattered/dida/DidaHeader.vue
View file @
0a28c0d4
...
...
@@ -4,15 +4,35 @@
v-if=
"$q.platform.is.desktop"
style=
"min-width: 190px"
unelevated
v-model=
"search.C
it
yCode"
v-model=
"search.C
ountr
yCode"
dense
:options=
"Areas"
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-value=
"CityCode"
map-options
:label=
"$t('hotel.area')"
standout
use-input
@
filter=
"filterCity"
/>
<q-field
v-if=
"$q.platform.is.desktop"
...
...
@@ -128,13 +148,27 @@
dense
:options=
"HotelRoomTypes"
emit-value
option-label=
"Name_CN"
option-value=
"ID"
clearable
map-options
:label=
"$t('v101.scattered.fangxingtype')"
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
class=
"q-my-md"
>
<q-select
...
...
@@ -186,8 +220,13 @@
</q-card>
</q-popup-proxy>
</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>
</template>
...
...
@@ -205,7 +244,7 @@ import {
onMounted
,
watch
,
}
from
"vue"
;
import
message
from
'../../../utils/message'
import
message
from
"../../../utils/message"
;
import
{
NCascader
,
NSelect
}
from
"naive-ui"
;
import
{
date
}
from
"quasar"
;
import
{
HotelRate
,
HotelArea
,
useHotel
}
from
"../../../utils/hotelRate"
;
...
...
@@ -221,7 +260,10 @@ export default defineComponent({
const
{
t
}
=
useI18n
();
const
data
=
reactive
({
scrollStyle
:
{}
as
any
,
Areas
:
[]
as
any
,
//区域
Areas
:
[]
as
any
,
//国家列表
AllAreas
:
[]
as
any
,
//所有国家
CityList
:
[]
as
any
,
//城市列表
AllCityList
:
[]
as
any
,
//所有城市列表
cascader
:
{
addressValue
:
null
,
}
as
any
,
...
...
@@ -241,9 +283,10 @@ export default defineComponent({
HotelLiveRates
:
[]
as
Array
<
HotelRate
>
,
//住宿类型
HotelRoomTypes
:
[]
as
Array
<
HotelRate
>
,
//房类型
HotelMealTypes
:
[]
as
Array
<
HotelRate
>
,
//餐型
HotelDidaPropertyCategory
:[]
as
Array
<
HotelRate
>
,
HotelDidaPropertyCategory
:
[]
as
Array
<
HotelRate
>
,
keyWords
:
""
as
stringify
,
CityCode
:
''
as
stringify
,
CityCode
:
""
as
stringify
,
CountryCode
:
""
as
stringify
,
});
for
(
let
i
=
1
;
i
<
11
;
i
++
)
{
data
.
theRooms
.
push
(
i
);
...
...
@@ -278,7 +321,7 @@ export default defineComponent({
data
.
hotelsRates
=
useHotel
.
getHotelRate
();
data
.
HotelMealTypes
=
useHotel
.
getHotelMeal
();
data
.
HotelConceptTypes
=
useHotel
.
getHotelConcept
();
data
.
CityCode
=
data
.
CityCode
;
data
.
CityCode
=
data
.
CityCode
;
const
methods
=
{
dateRangeHandler
(
e
:
any
)
{
search
.
CheckInDate
=
`
${
e
.
from
.
year
}
/
${
e
.
from
.
month
}
/
${
e
.
from
.
day
}
`
;
...
...
@@ -298,7 +341,10 @@ export default defineComponent({
CheckOutDate
:
search
.
CheckOutDate
,
};
// 先不缓存
localStorage
.
setItem
(
DirtionmaryHelper
.
SCATTERED_DiDaHOTEL_DATE
,
JSON
.
stringify
(
d
));
localStorage
.
setItem
(
DirtionmaryHelper
.
SCATTERED_DiDaHOTEL_DATE
,
JSON
.
stringify
(
d
)
);
},
//获取道旅餐食类型
getdidaMealType
()
{
...
...
@@ -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
()
{
var
cityParm
=
{
CountryCode
:
"JP"
,
CountryCode
:
search
.
CountryCode
,
};
var
newCity
=
[]
as
any
;
DidaService
.
GetDidaCity
(
cityParm
).
then
((
res
)
=>
{
...
...
@@ -328,16 +431,19 @@ export default defineComponent({
if
(
tempArray
&&
tempArray
.
length
>
0
)
{
tempArray
.
forEach
((
item
)
=>
{
if
(
item
.
Type
==
"City"
)
{
var
obj
=
{
var
obj
=
{
CityCode
:
item
.
CityCode
,
CityName_CN
:
item
.
CityName_CN
,
}
newCity
.
push
(
obj
);
}
;
newCity
.
push
(
obj
);
}
});
}
data
.
Areas
=
newCity
;
search
.
CityCode
=
data
.
Areas
[
0
].
CityCode
;
data
.
CityList
=
newCity
;
data
.
AllCityList
=
newCity
;
if
(
data
.
CityList
&&
data
.
CityList
.
length
>
0
)
{
search
.
CityCode
=
data
.
CityList
[
0
].
CityCode
;
}
}
});
},
...
...
@@ -360,10 +466,10 @@ export default defineComponent({
return
setCnt
;
});
watch
(
search
,
(
n
,
o
)
=>
{
methods
.
setData
()
})
methods
.
setData
()
;
})
;
onMounted
(()
=>
{
methods
.
getdidaC
it
y
();
methods
.
getdidaC
ountr
y
();
methods
.
getdidaBedType
();
methods
.
getdidaMealType
();
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