|
@@ -132,7 +132,7 @@
|
|
</view>
|
|
</view>
|
|
<view v-show="!viewMode" >
|
|
<view v-show="!viewMode" >
|
|
|
|
|
|
- <view v-for="(item,index) in stationslist" :key="item.id" class="charing-slow" >
|
|
|
|
|
|
+ <view v-for="(item,index) in stationslist" :key="item.id" class="charing-slow" @click="stationDetail(item)">
|
|
<text :class="item.type == '快充' ? 'fast-charge':'trickle-charge'">{{item.type}}</text> <text class="station-items">{{item.name}}</text>
|
|
<text :class="item.type == '快充' ? 'fast-charge':'trickle-charge'">{{item.type}}</text> <text class="station-items">{{item.name}}</text>
|
|
<view class="address">
|
|
<view class="address">
|
|
{{item.position}}
|
|
{{item.position}}
|
|
@@ -171,7 +171,7 @@
|
|
<swiper :current="currentIndex" @change="swiperChange" @transition="swiperTransition" style="height: 100%;">
|
|
<swiper :current="currentIndex" @change="swiperChange" @transition="swiperTransition" style="height: 100%;">
|
|
<swiper-item v-for="(item,index) in stationsmap" :key="item.id" style="height: 100%;">
|
|
<swiper-item v-for="(item,index) in stationsmap" :key="item.id" style="height: 100%;">
|
|
|
|
|
|
- <view class="swiper-item" style="height: 100%; background-color: #ffffff;">
|
|
|
|
|
|
+ <view class="swiper-item" style="height: 100%; background-color: #ffffff;" @click="stationDetail(item)">
|
|
<view class="card_item" style="font-size: 35rpx;padding-top: 5rpx;">
|
|
<view class="card_item" style="font-size: 35rpx;padding-top: 5rpx;">
|
|
<view style="display: flex;flex-direction: row;">
|
|
<view style="display: flex;flex-direction: row;">
|
|
<view :class="item.type == '快充'? 'fast-charge':'trickle-charge'" >
|
|
<view :class="item.type == '快充'? 'fast-charge':'trickle-charge'" >
|
|
@@ -358,7 +358,8 @@ export default {
|
|
navigate(){
|
|
navigate(){
|
|
console.log('naviage to ')
|
|
console.log('naviage to ')
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url:'/pages/search/search'
|
|
|
|
|
|
+ url:'/pages/search/search?stationlist='+encodeURIComponent(JSON.stringify(_self.stationsmap))
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getPoint() {
|
|
getPoint() {
|
|
@@ -411,6 +412,12 @@ export default {
|
|
// 众所周知,定时器返回一个随机整数,用于表示定时器的编号,后面通过名字可以取消这个定时器的执行。
|
|
// 众所周知,定时器返回一个随机整数,用于表示定时器的编号,后面通过名字可以取消这个定时器的执行。
|
|
console.log(this.timer);
|
|
console.log(this.timer);
|
|
},
|
|
},
|
|
|
|
+ stationDetail(item){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:'stationAndPile/stationDetails?station='+encodeURIComponent(JSON.stringify(item))
|
|
|
|
+ })
|
|
|
|
+// console.log('stationDetail'+JSON.stringify(item))
|
|
|
|
+ },
|
|
location(e){
|
|
location(e){
|
|
if(e.position){
|
|
if(e.position){
|
|
if(e.position.latitude && e.position.longitude)
|
|
if(e.position.latitude && e.position.longitude)
|
|
@@ -455,7 +462,7 @@ export default {
|
|
data1.powerEnd = this.preference.obc_power.maxValue.toString();
|
|
data1.powerEnd = this.preference.obc_power.maxValue.toString();
|
|
|
|
|
|
console.log('data1'+JSON.stringify(data1))
|
|
console.log('data1'+JSON.stringify(data1))
|
|
- api.geChargingStationData(data1).then(function(res){
|
|
|
|
|
|
+ api.getChargingStationData(data1).then(function(res){
|
|
|
|
|
|
if(!res.result || !res.data || !res.data.data)
|
|
if(!res.result || !res.data || !res.data.data)
|
|
{
|
|
{
|
|
@@ -485,6 +492,10 @@ export default {
|
|
// longitude: 112.28541 + i * 0.001,
|
|
// longitude: 112.28541 + i * 0.001,
|
|
// latitude: 30.308354 + i * 0.01
|
|
// latitude: 30.308354 + i * 0.01
|
|
};
|
|
};
|
|
|
|
+ if(items[i].id != null)
|
|
|
|
+ obj.id = items[i].id;
|
|
|
|
+ else
|
|
|
|
+ continue;
|
|
if(items[i].name!=null)
|
|
if(items[i].name!=null)
|
|
obj.name = items[i].name;
|
|
obj.name = items[i].name;
|
|
if(items[i].address!=null)
|
|
if(items[i].address!=null)
|
|
@@ -545,6 +556,10 @@ export default {
|
|
// longitude: 112.28541 + i * 0.001,
|
|
// longitude: 112.28541 + i * 0.001,
|
|
// latitude: 30.308354 + i * 0.01
|
|
// latitude: 30.308354 + i * 0.01
|
|
};
|
|
};
|
|
|
|
+ if(items[i].id != null)
|
|
|
|
+ obj.id = items[i].id;
|
|
|
|
+ else
|
|
|
|
+ continue;
|
|
if(items[i].name!=null)
|
|
if(items[i].name!=null)
|
|
obj.name = items[i].name;
|
|
obj.name = items[i].name;
|
|
if(items[i].address!=null)
|
|
if(items[i].address!=null)
|