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
2025-02-11 18:37:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4ce35165e96ee7d87e5ad4886ac36cce03835d2e
4ce35165
1 parent
be31679e
fix 点击地图空白处关闭弹框
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
26 deletions
src/api/fn.js
src/views/bieyuan/map.vue
src/views/by/map.vue
src/api/fn.js
View file @
4ce3516
/*
* @Date: 2022-05-18 22:56:08
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 202
2-07-05 23:27:51
* @FilePath: /
tswj
/src/api/fn.js
* @LastEditTime: 202
5-02-11 18:22:13
* @FilePath: /
map-demo
/src/api/fn.js
* @Description: 文件描述
*/
import
axios
from
'@/utils/axios'
;
import
{
Toast
}
from
'vant'
;
import
{
showSuccessToast
,
showFail
Toast
}
from
'vant'
;
import
qs
from
'Qs'
/**
...
...
@@ -23,10 +23,7 @@ export const fn = (api) => {
// tslint:disable-next-line: no-console
console
.
warn
(
res
);
if
(
!
res
.
data
.
show
)
return
false
;
Toast
({
icon
:
'close'
,
message
:
res
.
data
.
msg
});
showFailToast
(
res
.
data
.
msg
)
return
false
;
}
})
...
...
@@ -41,8 +38,8 @@ export const fn = (api) => {
/**
* 七牛返回格式
* @param {*} api
* @returns
* @param {*} api
* @returns
*/
export
const
uploadFn
=
(
api
)
=>
{
return
api
...
...
@@ -53,10 +50,7 @@ export const uploadFn = (api) => {
// tslint:disable-next-line: no-console
console
.
warn
(
res
);
if
(
!
res
.
data
.
show
)
return
false
;
Toast
({
icon
:
'close'
,
message
:
res
.
data
.
msg
});
showFailToast
(
res
.
data
.
msg
)
return
false
;
}
})
...
...
src/views/bieyuan/map.vue
View file @
4ce3516
...
...
@@ -753,11 +753,14 @@ export default {
e.lnglat.getLat() +
"],"
console.log(text);
/*// 关闭浮动面板
this.info_height = 0;
$('.van-floating-panel').css('boxShadow', 'none');
// 还原样式
this.resetMarkStyle();*/
/*// 点击空白处,关闭弹框
if (this.info_height) {
// 关闭浮动面板
this.info_height = 0;
$('.van-floating-panel').css('boxShadow', 'none');
// 还原样式
this.resetMarkStyle();
}*/
},
scanQrcode() { // 扫码跳转详情页
wx.scanQRCode({
...
...
@@ -813,7 +816,7 @@ export default {
},
resetMarkStyle () {
this.markerSum.forEach(item => {
item.setStyle(
this.markerStyle1
);
item.setStyle(
item._x['writing-mode'] === 'vertical-rl' ? this.markerStyle1 : this.markerStyle1_horizontal
);
})
},
onCloseFloat () {
...
...
src/views/by/map.vue
View file @
4ce3516
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-02-1
0 17:45:0
0
* @LastEditTime: 2025-02-1
1 18:36:3
0
* @FilePath: /map-demo/src/views/by/map.vue
* @Description: 公众地图主体页面
-->
...
...
@@ -761,11 +761,14 @@ export default {
e.lnglat.getLat() +
"],"
console.log(text);
/*// 关闭浮动面板
this.info_height = 0;
$('.van-floating-panel').css('boxShadow', 'none');
// 还原样式
this.resetMarkStyle();*/
// 点击空白处,关闭弹框
if (this.info_height) {
// 关闭浮动面板
this.info_height = 0;
$('.van-floating-panel').css('boxShadow', 'none');
// 还原样式
this.resetMarkStyle();
}
},
scanQrcode() { // 扫码跳转详情页
wx.scanQRCode({
...
...
@@ -821,7 +824,7 @@ export default {
},
resetMarkStyle () {
this.markerSum.forEach(item => {
item.setStyle(
this.markerStyle1
);
item.setStyle(
item._x['writing-mode'] === 'vertical-rl' ? this.markerStyle1 : this.markerStyle1_horizontal
);
})
},
onCloseFloat () {
...
...
Please
register
or
login
to post a comment