|
@@ -2,10 +2,12 @@
|
|
<view class="container">
|
|
<view class="container">
|
|
<view class="header">
|
|
<view class="header">
|
|
<view class="now-location">
|
|
<view class="now-location">
|
|
|
|
+ <image class='location' src="/static/img/liangmai/icon_ditu.png" mode=""></image>
|
|
<!-- <u-icon name="map" size="36" class="icon"></u-icon> -->
|
|
<!-- <u-icon name="map" size="36" class="icon"></u-icon> -->
|
|
<text class="text Medium title">{{position.name}}</text>
|
|
<text class="text Medium title">{{position.name}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="selectType">
|
|
<view class="selectType">
|
|
|
|
+
|
|
<picker @change="bindPickerChange" :value="index" :range="typeList">
|
|
<picker @change="bindPickerChange" :value="index" :range="typeList">
|
|
<text class="uni-input header-type">{{typeList[index]}}</text>
|
|
<text class="uni-input header-type">{{typeList[index]}}</text>
|
|
</picker>
|
|
</picker>
|
|
@@ -30,7 +32,7 @@
|
|
</view>
|
|
</view>
|
|
<scroll-view :scroll-top="scrollTop" :scroll-y="isscroll" @scrolltoupper="upper" @scrolltolower="lower"
|
|
<scroll-view :scroll-top="scrollTop" :scroll-y="isscroll" @scrolltoupper="upper" @scrolltolower="lower"
|
|
@scroll="scroll" :class="{'active':isActive}" class="scroll-style">
|
|
@scroll="scroll" :class="{'active':isActive}" class="scroll-style">
|
|
- <view class="bottom-list-item" v-for="(item,index) in datalist" :key="index">
|
|
|
|
|
|
+ <view class="bottom-list-item" v-for="(item,index) in datalist" @click='coordinate(item)' :key="index">
|
|
<view class='left'>
|
|
<view class='left'>
|
|
<img class="left-img" :src="item.attachmentAddress" alt="">
|
|
<img class="left-img" :src="item.attachmentAddress" alt="">
|
|
<view class="middle">
|
|
<view class="middle">
|
|
@@ -95,13 +97,18 @@
|
|
onLoad(e) {
|
|
onLoad(e) {
|
|
if (Object.keys(e).length) {
|
|
if (Object.keys(e).length) {
|
|
this.position = JSON.parse(e.position)
|
|
this.position = JSON.parse(e.position)
|
|
- // this.nowLocation.latitude = this.position.location.split(',')[1]
|
|
|
|
- // this.nowLocation.longitude = this.position.location.split(',')[0]
|
|
|
|
|
|
+ this.nowLocation.latitude = this.position.location.split(',')[1]
|
|
|
|
+ this.nowLocation.longitude = this.position.location.split(',')[0]
|
|
//获取列表数据
|
|
//获取列表数据
|
|
}
|
|
}
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ coordinate(item){
|
|
|
|
+ this.nowLocation.latitude = item.latitude
|
|
|
|
+ this.nowLocation.longitude = item.longitude
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
getList(val) {
|
|
getList(val) {
|
|
this.metreList = []
|
|
this.metreList = []
|
|
let detailedAddress = ""
|
|
let detailedAddress = ""
|
|
@@ -126,21 +133,23 @@
|
|
for(let i = 0;i<this.datalist.length;i++){
|
|
for(let i = 0;i<this.datalist.length;i++){
|
|
let lat2 = this.datalist[i].latitude
|
|
let lat2 = this.datalist[i].latitude
|
|
let lng2 = this.datalist[i].longitude
|
|
let lng2 = this.datalist[i].longitude
|
|
-
|
|
|
|
-
|
|
|
|
- let maker= {
|
|
|
|
- id: id++,
|
|
|
|
- latitude: this.datalist[i].latitude,
|
|
|
|
- longitude:this.datalist[i].longitude,
|
|
|
|
- iconPath: '../../../static/img/weizhi@2x.png',
|
|
|
|
- }
|
|
|
|
- newmarker.push(maker)
|
|
|
|
-
|
|
|
|
|
|
+ let maker= {
|
|
|
|
+ id: id++,
|
|
|
|
+ latitude: this.datalist[i].latitude,
|
|
|
|
+ longitude:this.datalist[i].longitude,
|
|
|
|
+ iconPath: '../../../static/img/location.png',
|
|
|
|
+ callout: {
|
|
|
|
+ content:this.datalist[i].title,
|
|
|
|
+ padding:10,
|
|
|
|
+ borderRadius:5,
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ newmarker.push(maker)
|
|
console.log("lat1,lng1,lat2,lng2",lat1,lng1,lat2,lng2)
|
|
console.log("lat1,lng1,lat2,lng2",lat1,lng1,lat2,lng2)
|
|
let _metre = getApp().getDistance(lat1,lng1,lat2,lng2)
|
|
let _metre = getApp().getDistance(lat1,lng1,lat2,lng2)
|
|
this.metreList.push(_metre)
|
|
this.metreList.push(_metre)
|
|
}
|
|
}
|
|
- // this.covers = newmarker
|
|
|
|
|
|
+ this.covers = newmarker
|
|
console.log(this.covers)
|
|
console.log(this.covers)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -232,14 +241,6 @@
|
|
// }
|
|
// }
|
|
// });
|
|
// });
|
|
},
|
|
},
|
|
- markertap(e) {
|
|
|
|
- console.log(e)
|
|
|
|
- uni.showToast({
|
|
|
|
- title: "点击id为" + e.detail.markerId + "的坐标",
|
|
|
|
- icon: 'none',
|
|
|
|
- duration: 2000
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
getLst() {
|
|
getLst() {
|
|
console.log("加载数据")
|
|
console.log("加载数据")
|
|
}
|
|
}
|
|
@@ -248,6 +249,14 @@
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
+ .now-location{
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ }
|
|
|
|
+ .location{
|
|
|
|
+ width:27rpx;
|
|
|
|
+ height:31rpx;
|
|
|
|
+ margin-right:10rpx;
|
|
|
|
+ }
|
|
.active {
|
|
.active {
|
|
height: 583rpx !important;
|
|
height: 583rpx !important;
|
|
}
|
|
}
|
|
@@ -354,7 +363,7 @@
|
|
}
|
|
}
|
|
.line{
|
|
.line{
|
|
border-right:1px solid #EEEEEE;
|
|
border-right:1px solid #EEEEEE;
|
|
- height:80rpx;
|
|
|
|
|
|
+ height:100rpx;
|
|
}
|
|
}
|
|
.left {
|
|
.left {
|
|
flex-direction: row;
|
|
flex-direction: row;
|