|
@@ -57,11 +57,14 @@ Page({
|
|
|
],
|
|
|
popData:[],
|
|
|
showIndex: false,
|
|
|
- isSearch: false,
|
|
|
+ showTraffic: true,
|
|
|
height: 0,
|
|
|
searchVal: '',
|
|
|
- trafficStart:'',
|
|
|
- trafficEnd:'',
|
|
|
+ trafficStart: '',
|
|
|
+ trafficEnd: '',
|
|
|
+ navigateArr: ['百度地图导航', '高德地图导航'],
|
|
|
+ showSection: true,
|
|
|
+ index: 0,
|
|
|
isList:true,
|
|
|
showSet:false
|
|
|
},
|
|
@@ -145,6 +148,7 @@ Page({
|
|
|
},
|
|
|
|
|
|
searchTap(e) {
|
|
|
+ const that = this;
|
|
|
let searchVal = this.data.searchVal;
|
|
|
if (!searchVal) {
|
|
|
wx.showToast({
|
|
@@ -154,6 +158,10 @@ Page({
|
|
|
return;
|
|
|
}
|
|
|
console.info(searchVal)
|
|
|
+ // 搜索结果
|
|
|
+ that.setData({
|
|
|
+ showTraffic: false
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
getTrafficStart(e) {
|
|
@@ -168,15 +176,28 @@ Page({
|
|
|
},
|
|
|
|
|
|
searchTrafficTap(e) {
|
|
|
+ const that = this;
|
|
|
let trafficStart = this.data.trafficStart;
|
|
|
let trafficEnd = this.data.trafficEnd;
|
|
|
if (!trafficStart || !trafficEnd) {
|
|
|
+ that.setData({
|
|
|
+ showSection: true
|
|
|
+ });
|
|
|
wx.showToast({
|
|
|
title: '请输入起点和终点',
|
|
|
icon: 'none'
|
|
|
- })
|
|
|
+ });
|
|
|
return;
|
|
|
+ } else {
|
|
|
+ that.setData({
|
|
|
+ showSection: false
|
|
|
+ });
|
|
|
}
|
|
|
+ console.info(trafficStart, trafficEnd);
|
|
|
+ },
|
|
|
+
|
|
|
+ bindPickerChange(e){
|
|
|
+ console.info(e)
|
|
|
},
|
|
|
|
|
|
backSearch(){
|