定位
This commit is contained in:
@@ -1301,6 +1301,8 @@ var houseListData = new Vue({
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
var step2Vue = new Vue({
|
||||
el: '#step2Div',
|
||||
data: {
|
||||
@@ -1308,28 +1310,7 @@ var step2Vue = new Vue({
|
||||
regions : []
|
||||
},
|
||||
methods:{
|
||||
//加载第二步的区域列表
|
||||
loadRegion: function(){
|
||||
|
||||
//this.defaultCity = dCity
|
||||
//loadingRegion(dCity);
|
||||
plus.geolocation.getCurrentPosition(function(p){
|
||||
city = p.address.city;
|
||||
|
||||
var formatCity = formatBaiduCity(city);
|
||||
step2Vue.defaultCity = formatCity
|
||||
loadingRegion(formatCity);
|
||||
}, function(e){
|
||||
step2Vue.defaultCity = dCity
|
||||
loadingRegion(dCity);
|
||||
},
|
||||
{
|
||||
provider:'baidu',
|
||||
enableHighAccuracy:true,
|
||||
coordsType:'bd09ll'
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
clickTags: function(e){
|
||||
|
||||
if($(event.target).hasClass("active")){
|
||||
@@ -1351,11 +1332,11 @@ var step2Vue = new Vue({
|
||||
}
|
||||
},
|
||||
created:function(){
|
||||
|
||||
this.loadRegion();
|
||||
//this.loadRegion();
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
function onPlusReady() {
|
||||
var self = plus.webview.currentWebview();
|
||||
@@ -1371,8 +1352,32 @@ function onPlusReady() {
|
||||
fillHouseInfo(houseId);
|
||||
}
|
||||
|
||||
|
||||
//加载第二步的区域列表
|
||||
plus.geolocation.getCurrentPosition(function(p){
|
||||
city = p.address.city;
|
||||
|
||||
var formatCity = formatBaiduCity(city);
|
||||
if(formatCity){
|
||||
step2Vue.defaultCity = formatCity
|
||||
loadingRegion(formatCity);
|
||||
}else{
|
||||
step2Vue.defaultCity = dCity
|
||||
loadingRegion(dCity);
|
||||
}
|
||||
|
||||
}, function(e){
|
||||
step2Vue.defaultCity = dCity
|
||||
loadingRegion(dCity);
|
||||
},
|
||||
{
|
||||
provider:'baidu',
|
||||
enableHighAccuracy:true,
|
||||
coordsType:'bd09ll'
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//修改置换建议填充默认值
|
||||
function updateChangeSubtation(hsId){
|
||||
axios.get(BASE_PATH + "/rest/changeHouse/loadHouseSubInfo",{
|
||||
@@ -1429,7 +1434,7 @@ function fillHouseInfo(houseId){
|
||||
var data = response.data.data;
|
||||
if(data){
|
||||
addBaseHouseInfo(data);
|
||||
baseInfo.houseId = hs.houseId
|
||||
baseInfo.houseId = houseId
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
|
||||
Reference in New Issue
Block a user