作者 xuqiang

提交

... ... @@ -42,7 +42,7 @@
<view class="userInfo">
<view class="userStar">
<image v-for="(item,index) in landList[0].starList" :key="index" style="width: 25rpx;height: 24rpx;margin-right: 5rpx;" src="../../static/image/xingji_2@2x.png" mode=""></image>
<image style="width: 26rpx;height: 31rpx;margin: 0 10rpx;" src="../../static/image/position_1@2x.png" mode=""></image>
<image style="width: 26rpx;height: 31rpx;margin-right: 5rpx;" src="../../static/image/position_1@2x.png" mode=""></image>
<text style="font-size: 25rpx;color: #fff;">{{landList[0].distance}}</text>
</view>
<view class="nameAddress">
... ... @@ -108,7 +108,7 @@
<view class="userInfo">
<view class="userStar">
<image v-for="(item,index) in landList[1].starList" :key="index" style="width: 25rpx;height: 24rpx;margin-right: 5rpx;" src="../../static/image/xingji_2@2x.png" mode=""></image>
<image style="width: 26rpx;height: 31rpx;margin: 0 11rpx 0 19rpx;" src="../../static/image/position_1@2x.png" mode=""></image>
<image style="width: 26rpx;height: 31rpx;margin-right: 5rpx;" src="../../static/image/position_1@2x.png" mode=""></image>
<text style="font-size: 25rpx;color: #fff;">{{landList[1].distance}}</text>
</view>
<view class="nameAddress">
... ... @@ -174,7 +174,7 @@
<view class="userInfo">
<view class="userStar">
<image v-for="(subItem,subIndex) in item.starList" :key="subIndex" style="width: 25rpx;height: 24rpx;margin-right: 5rpx;" src="../../static/image/xingji_2@2x.png" mode=""></image>
<image style="width: 26rpx;height: 31rpx;margin: 0 11rpx 0 19rpx;" src="../../static/image/position_1@2x.png" mode=""></image>
<image style="width: 26rpx;height: 31rpx;margin-right: 5rpx;" src="../../static/image/position_1@2x.png" mode=""></image>
<text style="font-size: 25rpx;color: #fff;">{{item.distance}}</text>
</view>
<view class="nameAddress">
... ... @@ -260,6 +260,7 @@
mapHeight:650,
latitude: 0,
longitude: 0,
city:'',
landList:[],
allLandList:[],
covers: [],
... ... @@ -297,19 +298,27 @@
type: 'wgs84',
geocode: true,
success: (res) => {
this.cityCode = res.address.cityCode
this.latitude = res.latitude
this.longitude = res.longitude
this.city = res.address.city
},
fail: (err) => {
console.log('定位出错',err)
this.city = '北京市'
this.longitude = 116.39747
this.latitude = 39.908823
},
complete: () => {
let param = this.landParam
if(param.latitude != ''){
this.latitude = param.latitude
this.longitude = param.longitude
}else{
this.latitude = res.latitude
this.longitude = res.longitude
}
let province = ''
let city = ''
if(param.province == '' && param.city == ''){
let city = res.address.city.substring(0,res.address.city.length - 1)
let city = this.city.substring(0,this.city.length - 1)
if(city == '天津' || city == '上海' || city == '北京' || city == '重庆'){
province = city
city = ''
... ... @@ -330,8 +339,8 @@
// per_page: 1,
province: province,
city:city,
latitude: res.latitude,
longitude: res.longitude
latitude: this.latitude,
longitude: this.longitude
},
success: (localLandRes) => {
this.landList = localLandRes.data.data
... ... @@ -339,8 +348,8 @@
let index = 0
coverArr.push({
id:'me',
latitude:res.latitude,
longitude:res.longitude,
latitude:this.latitude,
longitude:this.longitude,
width:16,
height:16,
iconPath: '../../static/image/Group_673.png'
... ... @@ -371,7 +380,7 @@
this.covers = coverArr
}
})
}
}
});
},
watch:{
... ... @@ -442,10 +451,20 @@
methods: {
//查询所有地主信息
getAllData(){
let latitude
let longitude
uni.getLocation({
type: 'wgs84',
geocode: true,
success: (res) => {
latitude = res.latitude
longitude = res.longitude
},
fail: () => {
longitude = 116.39747
latitude = 39.908823
},
complete: () => {
uni.request({
url:apiUrl+'/user_check/lis',
method:'POST',
... ... @@ -454,8 +473,8 @@
'token': uni.getStorageSync('token')
},
data:{
latitude:res.latitude,
longitude:res.longitude
latitude:latitude,
longitude:longitude
},
success: (sucRes) => {
sucRes.data.data.forEach(item => {
... ... @@ -470,7 +489,7 @@
this.allLandList = sucRes.data.data
}
})
}
}
});
},
... ... @@ -517,15 +536,15 @@
//地图视野范围发生变化
regionchange(e) {
if(e.detail.type == 'end' || e.type == 'end'){
uni.showLoading({
title:'加载中...'
})
let _this = this
let landArr = []
_this.scale = 12.9
_this.landList = []
console.log('222222222222222222',_this.allLandList.length)
if(_this.allLandList.length > 0){
uni.showLoading({
title:'加载中...'
})
let map = uni.createMapContext('around-food-map');
    map.getRegion({
success: regionRes => {
... ... @@ -659,7 +678,8 @@
var myAmapFun = new amapFile.AMapWX({key:'a8c52aaa1ccef354745fb14886b7d633'});
myAmapFun.getInputtips({
keywords: this.keywords,
location: '',
city:this.cityCode,
location: this.longitude+','+this.latitude,
success: (data)=>{
if(data.tips.length > 0){
this.showSearchLand = true
... ... @@ -875,8 +895,8 @@
.userInfo .nameAddress{padding-top: 10rpx;flex-direction: row;align-items: center;}
.userStar .starItem{width: 25rpx;height: 24rpx;background-color: #007AFF;margin-right: 9rpx;}
.landInfo .appointBtn{width: 122rpx;height: 52rpx;background: #fcfeff;border-radius: 102rpx;justify-content: center;align-items: center;flex-direction: row;}
.landInfo .handleList{width: 264rpx;flex-direction: row;}
.handleList .handleImg{width: 88rpx;height: 88rpx;}
.landInfo .handleList{width: 234rpx;flex-direction: row;}
.handleList .handleImg{width: 78rpx;height: 78rpx;}
/* 服务信息 */
.landInfoWrap .serviceInfo{height: 192rpx;flex-direction: row;}
.serviceInfo .leftEmp{width: 100rpx;}
... ...