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
29f1b575
Commit
29f1b575
authored
Apr 24, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复
parent
88690202
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
13 deletions
+68
-13
searchCity.vue
pages/hotel/components/address/searchCity.vue
+4
-4
search.vue
pages/hotel/components/search.vue
+8
-4
index.vue
pages/hotel/components/time/index.vue
+0
-1
mapList.vue
pages/hotel/mapList.vue
+54
-2
order.vue
pages/hotel/order.vue
+2
-2
No files found.
pages/hotel/components/address/searchCity.vue
View file @
29f1b575
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
if
(
val
.
CityCode
)
{
if
(
val
.
CityCode
)
{
this
.
parameters
.
CityCode
=
val
.
CityCode
;
this
.
parameters
.
CityCode
=
val
.
CityCode
;
}
}
this
.
parameters
.
KeyWords
=
val
.
KeyWords2
//
this.parameters.KeyWords = val.KeyWords2
},
},
deep
:
true
,
deep
:
true
,
},
},
...
@@ -206,9 +206,9 @@
...
@@ -206,9 +206,9 @@
searchKey
()
{
searchKey
()
{
if
(
this
.
parameters
.
KeyWords
==
''
||
!
this
.
parameters
.
KeyWords
)
return
if
(
this
.
parameters
.
KeyWords
==
''
||
!
this
.
parameters
.
KeyWords
)
return
this
.
$emit
(
'searchKey'
,
1
,
this
.
parameters
.
KeyWords
)
this
.
$emit
(
'searchKey'
,
1
,
this
.
parameters
.
KeyWords
)
this
.
HotelList
=
[]
//
this.HotelList = []
this
.
KeyCityList
=
[]
//
this.KeyCityList = []
this
.
parameters
.
KeyWords
=
''
//
this.parameters.KeyWords = ''
},
},
searchCity
()
{
searchCity
()
{
if
(
this
.
showLoading
)
return
if
(
this
.
showLoading
)
return
...
...
pages/hotel/components/search.vue
View file @
29f1b575
...
@@ -359,32 +359,36 @@
...
@@ -359,32 +359,36 @@
searchClose
()
{
searchClose
()
{
this
.
showSearchCity
=
false
this
.
showSearchCity
=
false
this
.
showCityList
=
false
this
.
showCityList
=
false
this
.
parameters
.
hotelId
=
null
this
.
research
(
2
)
this
.
research
(
2
)
},
},
searchKey
(
type
,
key
,
City
)
{
searchKey
(
type
,
key
,
City
)
{
if
(
type
==
1
)
{
if
(
type
==
1
)
{
this
.
parameters
.
hotelId
=
null
this
.
parameters
.
hotelId
=
null
if
(
this
.
parameters
.
KeyWords
!=
key
)
{
if
(
this
.
parameters
.
KeyWords
!=
key
)
{
this
.
parameters
.
KeyWords
=
key
this
.
parameters
.
KeyWords
=
key
}
}
}
else
if
(
type
==
2
)
{
}
else
if
(
type
==
2
)
{
this
.
parameters
.
KeyWords
=
null
this
.
parameters
.
KeyWords
=
null
this
.
parameters
.
KeyWords2
=
City
this
.
parameters
.
CityCode
=
null
// this.parameters.KeyWords2 = City
if
(
this
.
parameters
.
hotelId
!=
key
)
{
if
(
this
.
parameters
.
hotelId
!=
key
)
{
this
.
parameters
.
hotelId
=
key
this
.
parameters
.
hotelId
=
key
}
}
}
else
if
(
type
==
3
)
{
}
else
if
(
type
==
3
)
{
this
.
parameters
.
KeyWords
=
null
this
.
parameters
.
KeyWords
=
null
this
.
parameters
.
hotelId
=
null
this
.
parameters
.
hotelId
=
null
this
.
parameters
.
KeyWords2
=
City
//
this.parameters.KeyWords2 = City
if
(
this
.
parameters
.
CityCode
!=
key
)
{
if
(
this
.
parameters
.
CityCode
!=
key
)
{
this
.
city
=
this
.
parameters
.
CityName
=
City
this
.
city
=
this
.
parameters
.
CityName
=
City
this
.
parameters
.
CityCode2
=
key
this
.
parameters
.
CityCode2
=
key
this
.
parameters
.
CityCode
=
key
this
.
parameters
.
CityCode
=
key
}
}
}
}
this
.
searchClose
()
this
.
showSearchCity
=
false
this
.
showCityList
=
false
this
.
parameters
.
pageIndex
=
1
this
.
research
(
11
)
this
.
getRegion
()
this
.
getRegion
()
},
},
...
...
pages/hotel/components/time/index.vue
View file @
29f1b575
...
@@ -206,7 +206,6 @@ export default {
...
@@ -206,7 +206,6 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
console
.
log
(
"进入了...."
);
this
.
userDefaultDate
=
this
.
defaultDate
;
this
.
userDefaultDate
=
this
.
defaultDate
;
uni
.
getSystemInfo
({
uni
.
getSystemInfo
({
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
...
...
pages/hotel/mapList.vue
View file @
29f1b575
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
:latitude="center.latitude"
:latitude="center.latitude"
:include-points="includePoints.points"
:include-points="includePoints.points"
-->
-->
<map
id=
"m
ap
"
style=
"width: 100%; height: 100%;"
<map
id=
"m
yMap"
ref=
"myMapRef
"
style=
"width: 100%; height: 100%;"
:longitude=
"center.longitude"
:longitude=
"center.longitude"
:latitude=
"center.latitude"
:latitude=
"center.latitude"
:markers=
"markers"
:markers=
"markers"
...
@@ -162,6 +162,7 @@
...
@@ -162,6 +162,7 @@
points
:
[],
points
:
[],
},
},
scale
:
13
,
scale
:
13
,
mapData
:
{},
};
};
},
},
components
:
{
components
:
{
...
@@ -199,8 +200,46 @@
...
@@ -199,8 +200,46 @@
uni
.
setNavigationBarTitle
({
uni
.
setNavigationBarTitle
({
title
:
"酒店"
,
title
:
"酒店"
,
});
});
},
},
methods
:
{
methods
:
{
calculateBounds
(
markers
)
{
if
(
markers
.
length
===
0
)
return
null
;
let
minLat
=
markers
[
0
].
lat
;
let
maxLat
=
markers
[
0
].
lat
;
let
minLng
=
markers
[
0
].
lng
;
let
maxLng
=
markers
[
0
].
lng
;
markers
.
forEach
(
marker
=>
{
minLat
=
Math
.
min
(
minLat
,
marker
.
lat
);
maxLat
=
Math
.
max
(
maxLat
,
marker
.
lat
);
minLng
=
Math
.
min
(
minLng
,
marker
.
lng
);
maxLng
=
Math
.
max
(
maxLng
,
marker
.
lng
);
});
return
{
southWest
:
this
.
mapData
.
LatLng
(
minLat
,
minLng
),
northEast
:
this
.
mapData
.
LatLng
(
maxLat
,
maxLng
)
};
},
adjustMapToFitMarkers
(
markers
)
{
const
bounds
=
this
.
calculateBounds
(
markers
);
if
(
!
bounds
)
return
;
// 创建 LatLngBounds 对象
const
latLngBounds
=
this
.
mapData
.
LatLngBounds
(
bounds
.
southWest
,
bounds
.
northEast
);
// 调整地图视图
map
.
fitBounds
(
latLngBounds
);
// 可选:添加动画效果
map
.
panToBounds
(
latLngBounds
);
},
getItem
(
parameters
,
obj
)
{
getItem
(
parameters
,
obj
)
{
this
.
searchObj
=
parameters
this
.
searchObj
=
parameters
this
.
dayObj
=
{
this
.
dayObj
=
{
...
@@ -318,7 +357,6 @@
...
@@ -318,7 +357,6 @@
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
showLoading
=
false
this
.
showLoading
=
false
let
length
=
0
let
length
=
0
if
(
this
.
searchObj
.
pageIndex
===
1
)
{
if
(
this
.
searchObj
.
pageIndex
===
1
)
{
this
.
HotelList
=
res
.
data
.
pageData
;
this
.
HotelList
=
res
.
data
.
pageData
;
...
@@ -374,6 +412,20 @@
...
@@ -374,6 +412,20 @@
}
}
this
.
markers
.
push
(
obj
)
this
.
markers
.
push
(
obj
)
}
}
setTimeout
(()
=>
{
let
that
=
this
// const query = wx.createSelectorQuery().in(this);
// query.select('#myMap').fields({
// node: true,
// size: true
// }, (res) => {
// const mapContext = res.node.getMapContext();
// mapContext.moveToLocation();
// that.mapData = res.node.getMapContext()
// that.adjustMapToFitMarkers(that.markers)
// }).exec();
},
300
)
this
.
$forceUpdate
()
this
.
$forceUpdate
()
}
}
},
},
...
...
pages/hotel/order.vue
View file @
29f1b575
...
@@ -74,8 +74,8 @@
...
@@ -74,8 +74,8 @@
<
/view
>
<
/view
>
<
view
class
=
"LastNameBox column val"
style
=
"width: 1px;flex: 1;"
>
<
view
class
=
"LastNameBox column val"
style
=
"width: 1px;flex: 1;"
>
<
view
class
=
"row items-center"
v
-
for
=
"(sItem,i) in item.GuestInfo"
:
key
=
"i"
>
<
view
class
=
"row items-center"
v
-
for
=
"(sItem,i) in item.GuestInfo"
:
key
=
"i"
>
<
input
type
=
"text"
v
-
model
=
"sItem.LastName"
:
placeholder
=
"`${sItem.IsAdult?'住客'
:sItem.Age+'岁儿童'
}
${i+1
}
姓`"
/>
<
input
type
=
"text"
v
-
model
=
"sItem.LastName"
:
placeholder
=
"`${sItem.IsAdult?'住客'
+(i+1):sItem.Age+'岁儿童'
}
姓`"
/>
<
input
type
=
"text"
v
-
model
=
"sItem.FirstName"
:
placeholder
=
"`${sItem.IsAdult?'住客'
:sItem.Age+'岁儿童'
}
${i+1
}
名`"
/>
<
input
type
=
"text"
v
-
model
=
"sItem.FirstName"
:
placeholder
=
"`${sItem.IsAdult?'住客'
+(i+1):sItem.Age+'岁儿童'
}
名`"
/>
<!--
<
view
class
=
"row"
style
=
"margin-left:20rpx;"
>
<!--
<
view
class
=
"row"
style
=
"margin-left:20rpx;"
>
<
image
v
-
if
=
"item.GuestInfo.length>1"
<
image
v
-
if
=
"item.GuestInfo.length>1"
style
=
"width: 27rpx;height: 27rpx;display: block;"
style
=
"width: 27rpx;height: 27rpx;display: block;"
...
...
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