Merge branch 'YOUFANGAPP1.1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1.1
This commit is contained in:
@@ -1278,6 +1278,11 @@ $.config = {router: false}
|
||||
hotCitys : []
|
||||
},methods: {
|
||||
openHotCity:function(index) {
|
||||
var eventType = "hotCityClick";
|
||||
var dataMap = {};
|
||||
dataMap["city"]=this.hotCitys[index].city;
|
||||
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
|
||||
|
||||
clicked('../house/cityDetail.html',true,false,{},{city:this.hotCitys[index].city},function(){
|
||||
});
|
||||
}
|
||||
|
||||
@@ -190,6 +190,12 @@ function addManagement(id, houseStatus, liveStatus){
|
||||
}).then(function (response) {
|
||||
var status = response.data.status;
|
||||
if(status){
|
||||
var eventType = "addEvaluateManageClick";
|
||||
var dataMap = {};
|
||||
dataMap["hid"]=id;
|
||||
dataMap["liveStatus"]=liveStatus;
|
||||
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
|
||||
|
||||
$.toast(response.data.data);
|
||||
$('.loadingBgDiv').show();
|
||||
checkIsLogin();
|
||||
|
||||
@@ -451,6 +451,11 @@ $(document).on("click",".confirm-ok", function () {
|
||||
}).then(function (response) {
|
||||
var status = response.data.status;
|
||||
if(status){
|
||||
var eventType = "deleteMyHouseClick";
|
||||
var dataMap = {};
|
||||
dataMap["hid"]=id;
|
||||
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
|
||||
|
||||
$.toast(response.data.data);
|
||||
//删除后,如果需要调用checkIsLogin,需要所有的参数初始化
|
||||
//checkIsLogin();
|
||||
|
||||
+66
-36
@@ -1248,48 +1248,60 @@ function getPosition(){
|
||||
plus.geolocation.getCurrentPosition(function(p){
|
||||
if(p.address.city==undefined){
|
||||
city = "上海";
|
||||
$("#input_city").text(city);
|
||||
initData();
|
||||
}else{
|
||||
address = p.address.street;
|
||||
province = p.address.province;
|
||||
city = p.address.city;
|
||||
region = p.address.district;
|
||||
lng = p.coords.longitude;//获取到当前位置的经度
|
||||
lat = p.coords.latitude;//获取到当前位置的纬度;
|
||||
oriLng = p.coords.longitude;
|
||||
oriLat = p.coords.latitude;
|
||||
//alert("4"+oriLng);
|
||||
|
||||
if(city){
|
||||
city = formatBaiduCity(city);
|
||||
}
|
||||
if(region.endWith("区")){
|
||||
region = region.substring(0, region.length-1);
|
||||
}
|
||||
oriRegion = region;
|
||||
oriCity = city;
|
||||
$("#input_city").text(city);
|
||||
axios.get("/rest/index/isChinaCity", {
|
||||
params: {
|
||||
city: city
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
if(response.data.data.status==1){
|
||||
address = p.address.street;
|
||||
province = p.address.province;
|
||||
|
||||
region = p.address.district;
|
||||
lng = p.coords.longitude;//获取到当前位置的经度
|
||||
lat = p.coords.latitude;//获取到当前位置的纬度;
|
||||
oriLng = p.coords.longitude;
|
||||
oriLat = p.coords.latitude;
|
||||
|
||||
if(region.endWith("区")){
|
||||
region = region.substring(0, region.length-1);
|
||||
}
|
||||
oriRegion = region;
|
||||
oriCity = city;
|
||||
}else{
|
||||
city = "上海";
|
||||
$("#input_city").text(city);
|
||||
initRegionSelect(city);
|
||||
localStorage.setItem("init_city", city);
|
||||
//addLocation(lat,lng);
|
||||
initBaseInfo(city,"","",0,0);
|
||||
$("#ShangHaiDiv").show();
|
||||
$("#otherCityDiv").hide();
|
||||
}
|
||||
initData();
|
||||
})
|
||||
.catch(function (error) {
|
||||
setTimeout(function(){
|
||||
mui.init();
|
||||
mui.openWindow({
|
||||
url: 'error.html',
|
||||
id:'error.html',
|
||||
extras:{
|
||||
//扩展参数
|
||||
}
|
||||
});
|
||||
},10000)
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
localStorage.setItem("init_city", city);
|
||||
//addLocation(lat,lng);
|
||||
$(".nowCity").text(city);
|
||||
/*city="北京";
|
||||
region="";
|
||||
$("#input_city").text("北京");
|
||||
getDistrictList($("#input_city").text(),0,0,"",6,0,0,"");*/
|
||||
|
||||
initBaseInfo(city,region,address,lat,lng);
|
||||
if(city!="上海"){
|
||||
//$(".content").removeClass("pull-to-refresh-content");
|
||||
$.destroyPullToRefresh(".content")
|
||||
initRegionSelect(city);
|
||||
$("#ShangHaiDiv").hide();
|
||||
$("#otherCityDiv").show();
|
||||
}else{
|
||||
$.initPullToRefresh(".content")
|
||||
$("#ShangHaiDiv").show();
|
||||
$("#otherCityDiv").hide();
|
||||
}
|
||||
}, function(e){
|
||||
city = "上海";
|
||||
$("#input_city").text(city);
|
||||
@@ -1308,6 +1320,24 @@ function getPosition(){
|
||||
);
|
||||
}
|
||||
|
||||
function initData(){
|
||||
$("#input_city").text(city);
|
||||
localStorage.setItem("init_city", city);
|
||||
//addLocation(lat,lng);
|
||||
$(".nowCity").text(city);
|
||||
|
||||
initBaseInfo(city,region,address,lat,lng);
|
||||
if(city!="上海"){
|
||||
$.destroyPullToRefresh(".content")
|
||||
initRegionSelect(city);
|
||||
$("#ShangHaiDiv").hide();
|
||||
$("#otherCityDiv").show();
|
||||
}else{
|
||||
$.initPullToRefresh(".content")
|
||||
$("#ShangHaiDiv").show();
|
||||
$("#otherCityDiv").hide();
|
||||
}
|
||||
}
|
||||
/* 获取#region字数,截取#region前4字,并添加... */
|
||||
|
||||
var baseInfo = new Vue({
|
||||
@@ -1326,7 +1356,7 @@ var baseInfo = new Vue({
|
||||
|
||||
function initBaseInfo(city,region,address,lat,lng){
|
||||
//显示附近地址
|
||||
if(address!=""){
|
||||
if(address!="" || address!=undefined){
|
||||
var nearAddressParam = address;
|
||||
var length = address.length;
|
||||
var textStr = "";
|
||||
|
||||
Reference in New Issue
Block a user