更新
This commit is contained in:
@@ -144,6 +144,13 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSuggestion() {
|
getSuggestion() {
|
||||||
|
if(!this.seachValue) {
|
||||||
|
uni.showToast({
|
||||||
|
title:'还没有输入地址哦~',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.loding(true)
|
this.loding(true)
|
||||||
this.TXSDK.getSuggestion({
|
this.TXSDK.getSuggestion({
|
||||||
sig: 'mOPvEv4WmyaxymycTYy00pSiad2jnQil',
|
sig: 'mOPvEv4WmyaxymycTYy00pSiad2jnQil',
|
||||||
|
|||||||
@@ -55,12 +55,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
selePrice: function(n, o) {
|
selePrice: function(n, o) {
|
||||||
console.log(this.selePrice, 'jiage');
|
|
||||||
// this.filterData[1].lable = '低于' + this.selePrice.middlePrice;
|
|
||||||
// this.filterData[1].value = this.selePrice.middlePrice;
|
|
||||||
// this.filterData[2].lable = '最低价格';
|
|
||||||
// this.filterData[2].value = this.selePrice.minPrice;
|
|
||||||
// this.filterData
|
|
||||||
this.filterData = []
|
this.filterData = []
|
||||||
if (n) {
|
if (n) {
|
||||||
Object.keys(this.selePrice).forEach((item, index) => {
|
Object.keys(this.selePrice).forEach((item, index) => {
|
||||||
|
|||||||
@@ -94,7 +94,9 @@
|
|||||||
latitude,
|
latitude,
|
||||||
longitude
|
longitude
|
||||||
} = item
|
} = item
|
||||||
this.newMapMoveToLocation(longitude, latitude, 'reset')
|
setTimeout(() => {
|
||||||
|
this.newMapMoveToLocation(longitude, latitude, 'reset')
|
||||||
|
},500)
|
||||||
},
|
},
|
||||||
bindregionchange(e) {
|
bindregionchange(e) {
|
||||||
console.log(e, '***********')
|
console.log(e, '***********')
|
||||||
@@ -209,14 +211,10 @@
|
|||||||
} = this.$refs.addressSelector.datassFn();
|
} = this.$refs.addressSelector.datassFn();
|
||||||
let markerList = await this.mapUpdateMarkers(this.polyline[0].points, oilProductCode, juLi,
|
let markerList = await this.mapUpdateMarkers(this.polyline[0].points, oilProductCode, juLi,
|
||||||
siteChannel);
|
siteChannel);
|
||||||
console.log('newRoutePlanning markerList', markerList)
|
|
||||||
//处理油站站点数据并显示
|
//处理油站站点数据并显示
|
||||||
this.spareMarkers = this.locationProcessing(markerList);
|
this.spareMarkers = this.locationProcessing(markerList);
|
||||||
console.log('newRoutePlanning spareMarkers', this.spareMarkers)
|
|
||||||
let markers = JSON.parse(JSON.stringify(this.spareMarkers));
|
let markers = JSON.parse(JSON.stringify(this.spareMarkers));
|
||||||
console.log('markers', markers)
|
|
||||||
this.markers = await this.filterMarkers(markers);
|
this.markers = await this.filterMarkers(markers);
|
||||||
console.log('newRoutePlanning this.markers', this.markers)
|
|
||||||
},
|
},
|
||||||
// 更新最近搜索
|
// 更新最近搜索
|
||||||
UpdateLocation(Route, type) {
|
UpdateLocation(Route, type) {
|
||||||
@@ -371,6 +369,7 @@
|
|||||||
latitude: this.coordinate.latitude,
|
latitude: this.coordinate.latitude,
|
||||||
longitude: this.coordinate.longitude
|
longitude: this.coordinate.longitude
|
||||||
}
|
}
|
||||||
|
console.log(JSON.stringify(data))
|
||||||
let taht = this;
|
let taht = this;
|
||||||
return new Promise(function(re, rj) {
|
return new Promise(function(re, rj) {
|
||||||
oilSiteApi.getSiteByGeoHashNew(data).then(markerList => {
|
oilSiteApi.getSiteByGeoHashNew(data).then(markerList => {
|
||||||
@@ -457,12 +456,13 @@
|
|||||||
},
|
},
|
||||||
//移动当前中心点 参数:经纬度
|
//移动当前中心点 参数:经纬度
|
||||||
newMapMoveToLocation(longitude, latitude, type) {
|
newMapMoveToLocation(longitude, latitude, type) {
|
||||||
|
console.log('newMapMoveToLocation')
|
||||||
let that = this
|
let that = this
|
||||||
this.mapContext.moveToLocation({
|
this.mapContext.moveToLocation({
|
||||||
longitude: longitude,
|
longitude: longitude,
|
||||||
latitude: latitude,
|
latitude: latitude,
|
||||||
success(e) {
|
success(e) {
|
||||||
console.log(`%c 移动 坐标→ ${longitude}-${latitude}`, 'color:green;font-size:20px');
|
console.log(`移动 坐标→ ${longitude}-${latitude}`);
|
||||||
if (type) {
|
if (type) {
|
||||||
that.coordinate.latitude = latitude
|
that.coordinate.latitude = latitude
|
||||||
that.coordinate.longitude = longitude
|
that.coordinate.longitude = longitude
|
||||||
@@ -478,6 +478,9 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
fail(ee) {
|
||||||
|
console.log('ee',ee)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addfn(e) {
|
addfn(e) {
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="site-list">
|
<view class="site-list">
|
||||||
<view class="container" v-if="siteList.length">
|
<view class="container" v-if="siteList.length">
|
||||||
<list >
|
<list>
|
||||||
<view class="item" v-for="item,index in siteList" :key="index">
|
<view class="item" v-for="item,index in siteList" :key="index">
|
||||||
<image
|
<image
|
||||||
:src="item.siteImages || 'https://static.czb365.com/1647787216992.jpg?x-oss-process=image/resize,m_lfit,h_420,w_630/format,png'">
|
:src="item.siteImages || 'https://static.czb365.com/1647787216992.jpg?x-oss-process=image/resize,m_lfit,h_420,w_630/format,png'">
|
||||||
</image>
|
</image>
|
||||||
<view>{{item.siteName}}</view>
|
<view>{{item.siteName}}</view>
|
||||||
<view>
|
<view>
|
||||||
<view>{{item.address}}</view> <text>{{item.juli | adjust}}km</text>
|
<view>{{item.address || ''}}</view> <text>{{item.juli | adjust}}km</text>
|
||||||
</view>
|
</view>
|
||||||
<view>0# ¥7.94</view>
|
<view>0# ¥7.94</view>
|
||||||
<view>
|
<view>
|
||||||
@@ -36,20 +36,23 @@
|
|||||||
if (!options.markers) return
|
if (!options.markers) return
|
||||||
let markers = JSON.parse(decodeURIComponent(options.markers))
|
let markers = JSON.parse(decodeURIComponent(options.markers))
|
||||||
this.siteList = markers
|
this.siteList = markers
|
||||||
console.log('site markers',markers)
|
console.log('site markers', markers)
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
adjust(val) {
|
adjust(val) {
|
||||||
if (!val) return '--'
|
if (!val) return '--'
|
||||||
val = +val
|
val = +val/1000
|
||||||
return val.toFixed(2)
|
return val.toFixed(2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
lookPosition(item) {
|
lookPosition(item) {
|
||||||
// console.log(getCurrentPages())
|
let pageArr = getCurrentPages()
|
||||||
getCurrentPages()[0].$vm.perspectives(item)
|
let target = pageArr[pageArr.length - 2]
|
||||||
uni.navigateBack()
|
if (target.$vm.perspectives) {
|
||||||
|
target.$vm.perspectives(item)
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
jump(item) {
|
jump(item) {
|
||||||
let obj = {
|
let obj = {
|
||||||
@@ -76,17 +79,22 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 450rpx;
|
width: 450rpx;
|
||||||
height: 381rpx;
|
height: 381rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
view {
|
view {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-list {
|
.site-list {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
|
min-height: 100vh;
|
||||||
padding: 50rpx;
|
padding: 50rpx;
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user