Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-07-24 15:09:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4c25cc5bcb9f81f427960bd51ba3abcfc2cdbaa3
4c25cc5b
1 parent
00a5736a
fix 定位样式和条件调整
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
94 deletions
publish.sh
src/common/members.js
src/views/inner.vue
publish.sh
View file @
4c25cc5
...
...
@@ -20,12 +20,12 @@ output=map
npm run build
# 移除Git服务器目录下项目文件夹
rm -r
$path
"/
${
output
:?
}
/images"
#
rm -r $path"/${output:?}/images"
rm -r
$path
"/
${
output
:?
}
/index.html"
rm -r
$path
"/
${
output
:?
}
/static"
# 把本地编译输出文件夹添加到服务器目录
mv
"
${
output
:?
}
/images"
$path
"/
${
output
:?
}
"
#
mv "${output:?}/images" $path"/${output:?}"
mv
"
${
output
:?
}
/index.html"
$path
"/
${
output
:?
}
"
mv
"
${
output
:?
}
/static"
$path
"/
${
output
:?
}
"
...
...
@@ -33,7 +33,7 @@ mv "${output:?}/static" $path"/${output:?}"
cd
$path
"/
${
output
:?
}
"
git pull
git add -A
git commit -m
'前端
网页
更新'
git commit -m
'前端
地图
更新'
git push
# 更新SSH服务器上文件
...
...
src/common/members.js
View file @
4c25cc5
/*
* @Date: 2023-07-10 16:14:10
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-
19 14:35:12
* @LastEditTime: 2023-07-
24 14:42:33
* @FilePath: /map-demo/src/common/members.js
* @Description: 文件描述
*/
...
...
@@ -26,39 +26,27 @@ const testInfo = {
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
},
{
id
:
'0'
,
name
:
'王大发(慧东)'
,
contact
:
'1331234567'
,
group
:
'拈花堂组'
,
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
name
:
'陆丽君(惟君)'
,
contact
:
'1331234567'
,
group
:
'
弘法部接待
组'
,
group
:
'
后厨
组'
,
},
{
id
:
'0'
,
name
:
'
王大发(慧东
)'
,
name
:
'
刘兴兴(惟兴
)'
,
contact
:
'1331234567'
,
group
:
'
拈花堂
组'
,
group
:
'
后厨
组'
,
},
{
id
:
'0'
,
name
:
'
潘苗苗
'
,
name
:
'
杜铁军(心吾)
'
,
contact
:
'1331234567'
,
group
:
'
弘法部接待
组'
,
group
:
'
后厨
组'
,
},
{
id
:
'0'
,
name
:
'
王大发(慧东
)'
,
name
:
'
徐国珍(心珍
)'
,
contact
:
'1331234567'
,
group
:
'
拈花堂
组'
,
group
:
'
后厨
组'
,
},
{
id
:
'0'
,
...
...
@@ -76,63 +64,15 @@ const testInfo = {
details
:
[
{
id
:
'0'
,
name
:
'
潘苗苗
'
,
name
:
'
俞昌敏
'
,
contact
:
'1331234567'
,
group
:
'
弘法部接待
组'
,
group
:
'
安保
组'
,
},
{
id
:
'
0
'
,
name
:
'
潘苗苗
'
,
id
:
'
1
'
,
name
:
'
殷国平
'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
},
{
id
:
'0'
,
name
:
'潘苗苗'
,
contact
:
'1331234567'
,
group
:
'弘法部接待组'
,
group
:
'安保组'
,
},
],
window_type
:
'member'
,
...
...
@@ -144,15 +84,15 @@ const testInfo = {
details
:
[
{
id
:
'0'
,
name
:
'
潘苗苗
'
,
name
:
'
刘莉蓓
'
,
contact
:
'1331234567'
,
group
:
'
弘法部接待
组'
,
group
:
'
维修
组'
,
},
{
id
:
'0'
,
name
:
'
潘苗苗
'
,
name
:
'
顾军芳
'
,
contact
:
'1331234567'
,
group
:
'
弘法部接待
组'
,
group
:
'
维修
组'
,
},
],
window_type
:
'member'
,
...
...
src/views/inner.vue
View file @
4c25cc5
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-07-2
1 14:32
:47
* @LastEditTime: 2023-07-2
4 15:06
:47
* @FilePath: /map-demo/src/views/inner.vue
* @Description: 地图主体页面
-->
...
...
@@ -518,19 +518,28 @@ export default {
if (!this.current_lng || !this.current_lat) {
this.getLocation()
} else {
// 使用纠正偏移后的地址,打一个定位标记
var marker = new AMap.Marker({
position: new AMap.LngLat(this.current_lng, this.current_lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
});
this.map.add(marker);
// 定位到地图中心-西园寺
// this.map.setCenter([120.587334, 31.314823]);
this.map.setZoomAndCenter(this.zoom, [this.current_lng, this.current_lat]);
// 判断是否在范围内
// if (!this.isPointInRing()) {
// this.dialog_show = true;
// this.dialog_text = '您不在景区范围内';
// }
if (!this.isPointInRing()) {
this.dialog_show = true;
this.dialog_text = '您不在景区范围内';
} else {
// 使用纠正偏移后的地址,打一个定位标记
var marker = new AMap.Marker({
icon: new AMap.Icon({
image: 'https://cdn.ipadbiz.cn/xys/map/%E5%AE%9A.png',
size: new AMap.Size(40, 40),
// 图标所用图片大小
imageSize: new AMap.Size(40, 40),
// 图标取图偏移量
imageOffset: new AMap.Pixel(0, 0)
}),
position: new AMap.LngLat(this.current_lng, this.current_lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
offset: new AMap.Pixel(-20, -20)
});
this.map.add(marker);
// 定位到地图中心-西园寺
this.map.setZoomAndCenter(this.zoom, [this.current_lng, this.current_lat]);
}
}
},
getLocation() { // 获取经纬度
...
...
Please
register
or
login
to post a comment