window.ResOverlay = function(data, fun){
this._data = data
this._content = data['type'].name + "|" + data['name']
this._point = new BMap.Point(data.coord[0], data.coord[1])
this._fun = e => {
fun(data)
if(typeof(e.preventDefault()) == 'function'){
e.preventDefault() // IE下去除地图点击事件的冒泡
}else{
e.stopPropagation() // chrome下去除地图点击事件的冒泡
}
}
this._color = data['type'].color || "#5cadff" // 不同类型的资源有不同的颜色,默认颜色为#5cadff。
}
this.$http.get('/api/search').then(rep => {
this.$refs.main.addResource(rep.data.data.resources, data => {
this.resourceName = data["name"]
this.resourceType = data["type"].name
this.resourceUpdata = data["uploader"]
this.resourcePosition = data["coord"]
console.log(data["attachment"])
let allList = []
data["attachment"].map(i => {
let tempList = []
tempList.push(i)
tempList.push(i.split("/")[i.split("/").length - 1])
allList.push(tempList)
})
this.resourceDetial = allList
// 为资源添加图像
for(let i=0; i<data["images"].length; i++){
this.resourceImage.push(data["images"][i])
}
if (data["images"].length > 0){
this.isExistImage = true
}else{
this.isExistImage = false
}
// 为资源添加附件
if (data["attachment"].length > 0){
this.isExistAttach = true
}else{
this.isExistAttach = false
}
// 显示模态框
this.modal1 = true
})
})
this._fun = e => {
fun(data)
if(typeof(e.preventDefault()) == 'function'){
e.preventDefault() // IE下去除地图点击事件的冒泡
}else{
e.stopPropagation() // chrome下去除地图点击事件的冒泡
}
}
wrapDiv.addEventListener("touchstart", this._fun);
wrapDiv.addEventListener("click", this._fun);
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有