|
|
<template>
|
|
|
<view>
|
|
|
<map id="around-food-map" @regionchange="regionchange" :style="{width: '100%',height:mapHeight + 'px'}" :scale="scale" :layer-style="'2'" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
|
|
|
<!-- @markertap="markertap" -->
|
|
|
<map id="around-food-map" @regionchange="regionchange" :style="{width: '100%',height:mapHeight + 'px'}" :scale="scale" :layer-style="'2'" @markertap="markertap" :latitude="latitude" :longitude="longitude" :markers="covers"></map>
|
|
|
<!-- 查询地址区域 -->
|
|
|
<view class="searchWrap" :style="{top:statusBarHeight + 'rpx'}">
|
|
|
<view class="searchTab">
|
...
|
...
|
@@ -30,7 +29,7 @@ |
|
|
<view class="positionWrap" @click="position" :style="{bottom:'400rpx'}">
|
|
|
<image style="width: 90rpx;height: 90rpx;" src="../../static/image/dingwei.png" mode=""></image>
|
|
|
</view>
|
|
|
<touch-slide v-if="landList.length > 0" style="background-color: #509d94;" :landIndex="0" :showSlide="landList[0].showSlide" @callback="callback" :top="mapHeight - 170" :bottom="mapHeight - (landList.length > 1 ? 40 : 0)" :titleHeight="30">
|
|
|
<touch-slide v-if="landList.length > 0" style="background-color: #509d94;" :landIndex="0" :showSlide="landList[0].showSlide" @callback="callback" :top="mapHeight - 180" :bottom="mapHeight - (landList.length > 1 ? 40 : 10)" :titleHeight="30">
|
|
|
<view class="handleLine" slot="title">
|
|
|
<view class="line"></view>
|
|
|
</view>
|
...
|
...
|
@@ -96,7 +95,7 @@ |
|
|
</view>
|
|
|
</view>
|
|
|
</touch-slide>
|
|
|
<touch-slide v-if="landList.length > 1" style="background-color: #85cbc3;" :landIndex="1" :showSlide="landList[1].showSlide" @callback="callback" :top="mapHeight - 170" :bottom="mapHeight - (landList.length > 2 ? 10 : 0)" :titleHeight="30">
|
|
|
<touch-slide v-if="landList.length > 1" style="background-color: #85cbc3;" :landIndex="1" :showSlide="landList[1].showSlide" @callback="callback" :top="mapHeight - 180" :bottom="mapHeight - 10" :titleHeight="30">
|
|
|
<view class="handleLine" slot="title">
|
|
|
<view class="line"></view>
|
|
|
</view>
|
...
|
...
|
@@ -162,7 +161,7 @@ |
|
|
</view>
|
|
|
</view>
|
|
|
</touch-slide>
|
|
|
<touch-slide v-for="(item,index) in landList" :key="index" v-if="index > 1 && landList.length > index && landList[index-1].showSlide" :style="{'background-color': (index)%2 == 0 ? '#509d94' : '#85cbc3'}" :landIndex="index" @callback="callback" :top="mapHeight - 170" :bottom="mapHeight - (landList.length > 3 ? 10 : 0)" :titleHeight="30">
|
|
|
<touch-slide v-for="(item,index) in landList" :key="index" v-if="index > 1 && landList.length > index && landList[index-1].showSlide" :style="{'background-color': (index)%2 == 0 ? '#509d94' : '#85cbc3'}" :landIndex="index" @callback="callback" :top="mapHeight - 180" :bottom="mapHeight - 10" :titleHeight="30">
|
|
|
<view class="handleLine" slot="title">
|
|
|
<view class="line"></view>
|
|
|
</view>
|
...
|
...
|
@@ -242,20 +241,6 @@ |
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<!-- 成为地主弹框区域 -->
|
|
|
<view class="becomeLandWrap" v-if="showBecomeLand" @click="showBecomeLand = false">
|
|
|
<view class="becomeLand">
|
|
|
<view class="becomeLandImg">
|
|
|
<image style="width: 588rpx;height: 656rpx;border-top-left-radius: 30rpx;border-top-right-radius: 30rpx;" :src="becomeLandImg" mode="aspectFill"></image>
|
|
|
<image @click="showBecomeLand = false" class="closeBtn" src="../../static/image/close.png" mode=""></image>
|
|
|
</view>
|
|
|
<view class="bottomBtnWrap">
|
|
|
<view class="bottomBtn" @click="agree">
|
|
|
<text style="text-align: center;line-height: 78rpx;color: #fff;font-size: 32rpx;">成为地主</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
...
|
...
|
@@ -282,7 +267,6 @@ |
|
|
statusBarHeight:'',
|
|
|
showSearchLand:false,//展示查询地主列表弹框
|
|
|
addressList:[],
|
|
|
showBecomeLand:false,//展示成为地主弹框
|
|
|
becomeLandImg:'',//成为地主弹框图片
|
|
|
showLandInfo:false
|
|
|
}
|
...
|
...
|
@@ -397,30 +381,23 @@ |
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
this.getAllData()
|
|
|
|
|
|
//地主列表页返回的首个地主的经纬度
|
|
|
if(option.longitude != undefined){
|
|
|
this.longitude = option.longitude
|
|
|
this.latitude = option.latitude
|
|
|
}
|
|
|
|
|
|
//如果登录人是游侠第一次登录弹出成为地主弹框
|
|
|
if(this.userinfo.group_id == '1' && uni.getStorageSync('landAlertFlag') != this.userinfo.id){
|
|
|
this.showBecomeLand = true
|
|
|
uni.setStorage({
|
|
|
key: 'landAlertFlag',
|
|
|
data: this.userinfo.id
|
|
|
});
|
|
|
//获取成为地主图片
|
|
|
uni.request({
|
|
|
url:apiUrl+'/common/getConfig',
|
|
|
method:'POST',
|
|
|
data:{type:'1'},
|
|
|
success: (res) => {
|
|
|
this.becomeLandImg = res.data.data.landlord_index
|
|
|
}
|
|
|
})
|
|
|
// #ifdef APP-PLUS
|
|
|
const subNVue = uni.getSubNVueById('landAlert');
|
|
|
subNVue.show('none', 250);
|
|
|
// #endif
|
|
|
}
|
|
|
|
|
|
this.getAllData()
|
|
|
//地主列表页返回的首个地主的经纬度
|
|
|
if(option.longitude != undefined){
|
|
|
this.longitude = option.longitude
|
|
|
this.latitude = option.latitude
|
|
|
}
|
|
|
//获取系统信息
|
|
|
uni.getSystemInfo({
|
...
|
...
|
@@ -638,36 +615,39 @@ |
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//成为地主
|
|
|
agree(){
|
|
|
this.showBecomeLand = false
|
|
|
uni.navigateTo({
|
|
|
url:'/pages/my/becomeLand'
|
|
|
})
|
|
|
},
|
|
|
|
|
|
//点击标记点
|
|
|
markertap(e){
|
|
|
this.showSlide = true
|
|
|
this.markerId = e.detail.markerId
|
|
|
if(e.detail.markerId != 'me'){
|
|
|
let changeLand
|
|
|
for(let i = 0; i < this.allLandList.length; i ++){
|
|
|
if(this.allLandList[i].id == e.detail.markerId){
|
|
|
this.latitude = this.allLandList[i].latitude
|
|
|
this.longitude = this.allLandList[i].longitude
|
|
|
changeLand = this.landList[i]
|
|
|
this.landList[i] = this.landList[0]
|
|
|
this.landList[0] = changeLand
|
|
|
}
|
|
|
}
|
|
|
this.allLandList.forEach(item=>{
|
|
|
if(item.id == e.detail.markerId){
|
|
|
this.latitude = item.latitude
|
|
|
this.longitude = item.longitude
|
|
|
this.landList[0] = item
|
|
|
}
|
|
|
let landArr = this.landList
|
|
|
console.log('=======变更前======',this.landList)
|
|
|
let coverArr = []
|
|
|
let index = 0
|
|
|
this.landList = []
|
|
|
coverArr.push(this.covers[0])
|
|
|
let changeLand
|
|
|
for(let i = 0; i < landArr.length; i ++){
|
|
|
coverArr.push({
|
|
|
id:landArr[i].id,
|
|
|
latitude:landArr[i].latitude,
|
|
|
longitude:landArr[i].longitude,
|
|
|
iconPath: landArr[i].id == e.detail.markerId ? '../../static/image/group_675_choose.png' : '../../static/image/Group_675.png'
|
|
|
})
|
|
|
|
|
|
if(landArr[i].id == e.detail.markerId){
|
|
|
changeLand = landArr[i]
|
|
|
landArr[i] = landArr[0]
|
|
|
landArr[0] = changeLand
|
|
|
landArr[i].showSlide = false
|
|
|
landArr[0].showSlide = true
|
|
|
}else{
|
|
|
landArr[i].showSlide = false
|
|
|
}
|
|
|
}
|
|
|
console.log('=======变更后======',landArr)
|
|
|
this.covers = coverArr
|
|
|
setTimeout(()=>{
|
|
|
this.landList = landArr
|
|
|
},200)
|
|
|
},
|
|
|
newsClick(){
|
|
|
uni.navigateTo({
|
...
|
...
|
@@ -885,48 +865,6 @@ |
|
|
height: 90rpx;
|
|
|
right: 32rpx;
|
|
|
}
|
|
|
/* 成为地主弹框区域 */
|
|
|
.becomeLandWrap{
|
|
|
position: fixed;
|
|
|
top: 0;
|
|
|
bottom: 0;
|
|
|
left: 0;
|
|
|
right: 0;
|
|
|
background: rgba(0,0,0,0.5);
|
|
|
flex-direction: row;
|
|
|
justify-content: center;
|
|
|
padding-top: 230rpx;
|
|
|
.becomeLand{
|
|
|
width: 588rpx;
|
|
|
height: 756rpx;
|
|
|
background-color: #fff;
|
|
|
border-radius: 30rpx;
|
|
|
z-index:1;
|
|
|
.becomeLandImg{
|
|
|
position: relative;
|
|
|
width: 588rpx;height: 656rpx;
|
|
|
.closeBtn{
|
|
|
position: absolute;
|
|
|
width: 40rpx;
|
|
|
height: 40rpx;
|
|
|
top: 20rpx;
|
|
|
right: 20rpx;
|
|
|
}
|
|
|
}
|
|
|
.bottomBtnWrap{
|
|
|
height: 100rpx;
|
|
|
flex-direction: row;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
|
.bottomBtn{
|
|
|
height: 78rpx;
|
|
|
width: 250rpx;
|
|
|
border-radius: 50rpx;
|
|
|
background: #35655f;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.changeList{flex-direction: row;justify-content: flex-end;padding-right: 22rpx;height: 80rpx;}
|
|
|
.landInfoWrap{height: 496rpx;padding: 0 50rpx;position: relative;}
|
...
|
...
|
|