task#10595,crm系统跳转H5动态取参
This commit is contained in:
@ -53,7 +53,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.id = this.$route.params.id;
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
this.id = this.$route.params.id || urlParams.get('id');
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await this.batchOrderCount();
|
await this.batchOrderCount();
|
||||||
|
@ -193,6 +193,11 @@ export default {
|
|||||||
imageSize: new AMap.Size(43, 43) // 图片的实际尺寸
|
imageSize: new AMap.Size(43, 43) // 图片的实际尺寸
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
let infoWindow = new AMap.InfoWindow({
|
||||||
|
content: this.detailInfo?.apointAddress, // 替换为实际的地址文本
|
||||||
|
offset: new AMap.Pixel(0, -30) // 设置信息窗体的偏移量,使其显示在点的上方
|
||||||
|
});
|
||||||
|
infoWindow.open(this.map, [this.detailInfo?.apointLongtitude, this.detailInfo?.apointLongtitude]);
|
||||||
this.map.add(marker);
|
this.map.add(marker);
|
||||||
// 事发地,b点
|
// 事发地,b点
|
||||||
let marker1 = new AMap.Marker({
|
let marker1 = new AMap.Marker({
|
||||||
@ -203,6 +208,11 @@ export default {
|
|||||||
imageSize: new AMap.Size(43, 43) // 图片的实际尺寸
|
imageSize: new AMap.Size(43, 43) // 图片的实际尺寸
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
let infoWindow1 = new AMap.InfoWindow({
|
||||||
|
content: this.detailInfo?.bpointAddress, // 替换为实际的地址文本
|
||||||
|
offset: new AMap.Pixel(0, -30) // 设置信息窗体的偏移量,使其显示在点的上方
|
||||||
|
});
|
||||||
|
infoWindow1.open(this.map, [this.detailInfo?.bpointLongtitude, this.detailInfo?.bpointLongtitude]);
|
||||||
this.map.add(marker1);
|
this.map.add(marker1);
|
||||||
let marker2=''
|
let marker2=''
|
||||||
if(this.detailInfo.cpointLongtitude && this.detailInfo.cpointLatitude){
|
if(this.detailInfo.cpointLongtitude && this.detailInfo.cpointLatitude){
|
||||||
@ -214,7 +224,12 @@ export default {
|
|||||||
imageSize: new AMap.Size(28, 28) // 图片的实际尺寸
|
imageSize: new AMap.Size(28, 28) // 图片的实际尺寸
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
this.map.add(marker2);
|
let infoWindow2 = new AMap.InfoWindow({
|
||||||
|
content: this.detailInfo?.cpointAddress, // 替换为实际的地址文本
|
||||||
|
offset: new AMap.Pixel(0, -30) // 设置信息窗体的偏移量,使其显示在点的上方
|
||||||
|
});
|
||||||
|
infoWindow2.open(this.map, [this.detailInfo?.cpointLongtitude, this.detailInfo?.cpointLongtitude]);
|
||||||
|
this.map.add(marker2);
|
||||||
}
|
}
|
||||||
if(this.detailInfo.cpointLongtitude && this.detailInfo.cpointLatitude){
|
if(this.detailInfo.cpointLongtitude && this.detailInfo.cpointLatitude){
|
||||||
this.map.setFitView([marker,marker1,marker2])
|
this.map.setFitView([marker,marker1,marker2])
|
||||||
|
Reference in New Issue
Block a user