Commit 61404219 authored by youjie's avatar youjie

优化

parent 67fd227f
......@@ -137,14 +137,14 @@
if(res.resultCode==1){
if(res.data.length>0){
this.PlaceList = res.data
if(this.type<3&&(!this.busInfor.desCountryId||this.busInfor.desCountryId=='')){
if(this.type<3&&!this.busInfor.desCountryId){
this.busInfor.desCountryId = res.data[0].Country
this.busInfor.desCountryName = res.data[0].CountryName
this.busInfor.ThreeCode = res.data[0].ThreeCode
this.busInfor.desCityId = res.data[0].CityList[0].City
this.busInfor.desCityName = res.data[0].CityList[0].CityName
}
if(this.type==3&&(!this.busInfor.CountryId||this.busInfor.CountryId=='')){
if(this.type==3&&!this.busInfor.CountryId){
this.busInfor.CountryId = res.data[0].Country
this.busInfor.CountryName = res.data[0].CountryName
this.busInfor.ThreeCode = res.data[0].ThreeCode
......
......@@ -358,11 +358,11 @@
setType(type){
if(type) {
if(this.busInfor.CarType!=type){
this.busInfor.CountryId = ''
this.busInfor.CityId = ''
this.busInfor.CountryId = null
this.busInfor.CityId = null
this.busInfor.CityName = ''
this.busInfor.desCountryId = ''
this.busInfor.desCityId = ''
this.busInfor.desCountryId = null
this.busInfor.desCityId = null
this.busInfor.desCityName = ''
this.busInfor.CarType = type
......@@ -374,11 +374,11 @@
// this.getPlaceList()
}else {
if(this.busInfor.CarType!=this.current ){
this.busInfor.CountryId = ''
this.busInfor.CityId = ''
this.busInfor.CountryId = null
this.busInfor.CityId = null
this.busInfor.CityName = ''
this.busInfor.desCountryId = ''
this.busInfor.desCityId = ''
this.busInfor.desCountryId = null
this.busInfor.desCityId = null
this.busInfor.desCityName = ''
this.busInfor.CarType = this.current
......@@ -387,7 +387,7 @@
this.busInfor.AirportId = null
this.busInfor.AirportName = ''
}
this.getAirportList()
// this.getAirportList()
}
},
clickAirport(){
......@@ -435,16 +435,17 @@
})
},
radioChange(e){
if(this.busInfor.CarType!=e){
this.busInfor.CountryId = null
this.busInfor.CityId = null
this.busInfor.CityName = ''
this.busInfor.desCountryId = null
this.busInfor.desCityId = null
this.busInfor.desCityName = ''
}
if(this.current!=e){
this.busInfor.CarType = e
this.current = e
this.busInfor.CountryId = ''
this.busInfor.CityId = ''
this.busInfor.CityName = ''
this.busInfor.desCountryId = ''
this.busInfor.desCityId = ''
this.busInfor.desCityName = ''
this.busInfor.startaddress = ''
this.busInfor.destination = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment