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 : []
|
hotCitys : []
|
||||||
},methods: {
|
},methods: {
|
||||||
openHotCity:function(index) {
|
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(){
|
clicked('../house/cityDetail.html',true,false,{},{city:this.hotCitys[index].city},function(){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,6 +190,12 @@ function addManagement(id, houseStatus, liveStatus){
|
|||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
var status = response.data.status;
|
var status = response.data.status;
|
||||||
if(status){
|
if(status){
|
||||||
|
var eventType = "addEvaluateManageClick";
|
||||||
|
var dataMap = {};
|
||||||
|
dataMap["hid"]=id;
|
||||||
|
dataMap["liveStatus"]=liveStatus;
|
||||||
|
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
|
||||||
|
|
||||||
$.toast(response.data.data);
|
$.toast(response.data.data);
|
||||||
$('.loadingBgDiv').show();
|
$('.loadingBgDiv').show();
|
||||||
checkIsLogin();
|
checkIsLogin();
|
||||||
|
|||||||
@@ -451,6 +451,11 @@ $(document).on("click",".confirm-ok", function () {
|
|||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
var status = response.data.status;
|
var status = response.data.status;
|
||||||
if(status){
|
if(status){
|
||||||
|
var eventType = "deleteMyHouseClick";
|
||||||
|
var dataMap = {};
|
||||||
|
dataMap["hid"]=id;
|
||||||
|
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
|
||||||
|
|
||||||
$.toast(response.data.data);
|
$.toast(response.data.data);
|
||||||
//删除后,如果需要调用checkIsLogin,需要所有的参数初始化
|
//删除后,如果需要调用checkIsLogin,需要所有的参数初始化
|
||||||
//checkIsLogin();
|
//checkIsLogin();
|
||||||
|
|||||||
+67
-37
@@ -1248,48 +1248,60 @@ function getPosition(){
|
|||||||
plus.geolocation.getCurrentPosition(function(p){
|
plus.geolocation.getCurrentPosition(function(p){
|
||||||
if(p.address.city==undefined){
|
if(p.address.city==undefined){
|
||||||
city = "上海";
|
city = "上海";
|
||||||
$("#input_city").text(city);
|
initData();
|
||||||
}else{
|
}else{
|
||||||
address = p.address.street;
|
|
||||||
province = p.address.province;
|
|
||||||
city = p.address.city;
|
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){
|
if(city){
|
||||||
city = formatBaiduCity(city);
|
city = formatBaiduCity(city);
|
||||||
}
|
}
|
||||||
if(region.endWith("区")){
|
axios.get("/rest/index/isChinaCity", {
|
||||||
region = region.substring(0, region.length-1);
|
params: {
|
||||||
}
|
city: city
|
||||||
oriRegion = region;
|
}
|
||||||
oriCity = city;
|
})
|
||||||
$("#input_city").text(city);
|
.then(function (response) {
|
||||||
}
|
if(response.data.data.status==1){
|
||||||
localStorage.setItem("init_city", city);
|
address = p.address.street;
|
||||||
//addLocation(lat,lng);
|
province = p.address.province;
|
||||||
$(".nowCity").text(city);
|
|
||||||
/*city="北京";
|
region = p.address.district;
|
||||||
region="";
|
lng = p.coords.longitude;//获取到当前位置的经度
|
||||||
$("#input_city").text("北京");
|
lat = p.coords.latitude;//获取到当前位置的纬度;
|
||||||
getDistrictList($("#input_city").text(),0,0,"",6,0,0,"");*/
|
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);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
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){
|
}, function(e){
|
||||||
city = "上海";
|
city = "上海";
|
||||||
$("#input_city").text(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字,并添加... */
|
/* 获取#region字数,截取#region前4字,并添加... */
|
||||||
|
|
||||||
var baseInfo = new Vue({
|
var baseInfo = new Vue({
|
||||||
@@ -1326,7 +1356,7 @@ var baseInfo = new Vue({
|
|||||||
|
|
||||||
function initBaseInfo(city,region,address,lat,lng){
|
function initBaseInfo(city,region,address,lat,lng){
|
||||||
//显示附近地址
|
//显示附近地址
|
||||||
if(address!=""){
|
if(address!="" || address!=undefined){
|
||||||
var nearAddressParam = address;
|
var nearAddressParam = address;
|
||||||
var length = address.length;
|
var length = address.length;
|
||||||
var textStr = "";
|
var textStr = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user