|
|
|
@ -331,6 +331,7 @@ import MzCard from "@/components/MzCard/index.vue";
|
|
|
|
|
import {imghost} from "@/config/host"; |
|
|
|
|
import shop from "@/pages/Shop/index.vue"; |
|
|
|
|
import MzMap from "@/components/MzMap/index.vue"; |
|
|
|
|
import {roomMapList} from "../../../../api/shop"; |
|
|
|
|
|
|
|
|
|
const img = 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/logo.png'; |
|
|
|
|
export default { |
|
|
|
@ -593,6 +594,7 @@ export default {
|
|
|
|
|
mapData:{}, |
|
|
|
|
userInfo:{}, |
|
|
|
|
showMap:false, |
|
|
|
|
mapList:[], |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onReady() { |
|
|
|
@ -626,10 +628,29 @@ export default {
|
|
|
|
|
this.tabCheck = e.id |
|
|
|
|
if(this.tabCheck === 'room'){ |
|
|
|
|
this.getRoomList(true); |
|
|
|
|
this.getRoomMapList(); |
|
|
|
|
}else{ |
|
|
|
|
this.getItemList(true); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getRoomMapList(){ |
|
|
|
|
roomMapList({}).then((res) => { |
|
|
|
|
this.mapList = res.data; |
|
|
|
|
let data = []; |
|
|
|
|
res.data.map(item => { |
|
|
|
|
const coordinate = item.coordinate.split(','); |
|
|
|
|
data.push({ |
|
|
|
|
id:item.id, |
|
|
|
|
latitude:parseFloat(coordinate[1]), |
|
|
|
|
longitude:parseFloat(coordinate[0]), |
|
|
|
|
width:'88rpx', |
|
|
|
|
height:'88rpx' |
|
|
|
|
}); |
|
|
|
|
return item; |
|
|
|
|
}); |
|
|
|
|
this.roomCoordinate = this.roomCoordinate.concat(this.roomCoordinate,data); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
getRoomList(clear = false) { |
|
|
|
|
if (clear) { |
|
|
|
|
this.status = 'loadmore' |
|
|
|
@ -647,18 +668,18 @@ export default {
|
|
|
|
|
roomList(this.pages).then(res => { |
|
|
|
|
console.log('roomCoordinate',this.roomCoordinate) |
|
|
|
|
let data = []; |
|
|
|
|
res.data.map(item => { |
|
|
|
|
const coordinate = item.coordinate.split(','); |
|
|
|
|
data.push({ |
|
|
|
|
id:item.id, |
|
|
|
|
latitude:parseFloat(coordinate[1]), |
|
|
|
|
longitude:parseFloat(coordinate[0]), |
|
|
|
|
width:'88rpx', |
|
|
|
|
height:'88rpx' |
|
|
|
|
}); |
|
|
|
|
return item; |
|
|
|
|
}); |
|
|
|
|
this.roomCoordinate = this.roomCoordinate.concat(this.roomCoordinate,data); |
|
|
|
|
// res.data.map(item => { |
|
|
|
|
// const coordinate = item.coordinate.split(','); |
|
|
|
|
// data.push({ |
|
|
|
|
// id:item.id, |
|
|
|
|
// latitude:parseFloat(coordinate[1]), |
|
|
|
|
// longitude:parseFloat(coordinate[0]), |
|
|
|
|
// width:'88rpx', |
|
|
|
|
// height:'88rpx' |
|
|
|
|
// }); |
|
|
|
|
// return item; |
|
|
|
|
// }); |
|
|
|
|
// this.roomCoordinate = this.roomCoordinate.concat(this.roomCoordinate,data); |
|
|
|
|
this.listWater.push.apply(this.listWater, res.data); |
|
|
|
|
if (res.data.length === 0) { |
|
|
|
|
this.status = 'nomore' |
|
|
|
@ -747,10 +768,10 @@ export default {
|
|
|
|
|
let that = this |
|
|
|
|
let id = e.markerId; |
|
|
|
|
console.log(e) |
|
|
|
|
this.mapData = that.listWater.find(line => id === line.id); |
|
|
|
|
this.mapData = that.mapList.find(line => id === line.id); |
|
|
|
|
|
|
|
|
|
this.popMapShow = true; |
|
|
|
|
console.log(that.listWater) |
|
|
|
|
console.log(that.mapList) |
|
|
|
|
}, |
|
|
|
|
mapTap() { |
|
|
|
|
this.popMapShow = false; |
|
|
|
@ -812,6 +833,7 @@ export default {
|
|
|
|
|
this.getItemList(true); |
|
|
|
|
this.getGoodsType(); |
|
|
|
|
this.getRoomList(true); |
|
|
|
|
this.getRoomMapList(); |
|
|
|
|
this.getStreet(); |
|
|
|
|
|
|
|
|
|
uni.hideLoading(); |
|
|
|
|