hookehuyr

fix 点击地图空白处关闭弹框

/*
* @Date: 2022-05-18 22:56:08
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-07-05 23:27:51
* @FilePath: /tswj/src/api/fn.js
* @LastEditTime: 2025-02-11 18:22:13
* @FilePath: /map-demo/src/api/fn.js
* @Description: 文件描述
*/
import axios from '@/utils/axios';
import { Toast } from 'vant';
import { showSuccessToast, showFailToast } 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;
}
})
......@@ -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;
}
})
......
......@@ -753,11 +753,14 @@ export default {
e.lnglat.getLat() +
"],"
console.log(text);
/*// 关闭浮动面板
/*// 点击空白处,关闭弹框
if (this.info_height) {
// 关闭浮动面板
this.info_height = 0;
$('.van-floating-panel').css('boxShadow', 'none');
// 还原样式
this.resetMarkStyle();*/
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 () {
......
<!--
* @Date: 2023-05-19 14:54:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-02-10 17:45:00
* @LastEditTime: 2025-02-11 18:36:30
* @FilePath: /map-demo/src/views/by/map.vue
* @Description: 公众地图主体页面
-->
......@@ -761,11 +761,14 @@ export default {
e.lnglat.getLat() +
"],"
console.log(text);
/*// 关闭浮动面板
// 点击空白处,关闭弹框
if (this.info_height) {
// 关闭浮动面板
this.info_height = 0;
$('.van-floating-panel').css('boxShadow', 'none');
// 还原样式
this.resetMarkStyle();*/
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 () {
......