Merge branch 'YOUFANGAPP1.1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1.1
Conflicts: fangija-zsyf/config.js
This commit is contained in:
@@ -55,7 +55,9 @@ function saveBehaviorLog(event,dataMap) {
|
||||
var device = plus.device.uuid;
|
||||
var model = plus.device.model;
|
||||
plus.geolocation.getCurrentPosition(function(p){
|
||||
baidu_province = p.address.province;
|
||||
baidu_city = p.address.city;
|
||||
baidu_region = p.address.district;
|
||||
baidu_lng = p.coords.longitude;
|
||||
baidu_lat = p.coords.latitude;
|
||||
baidu_address = p.address.street;
|
||||
|
||||
@@ -80,6 +80,7 @@ $("#login_btn").on("click", function () {
|
||||
var data = resData.data;
|
||||
localStorage.setItem("user_token", data.token);
|
||||
localStorage.setItem("user_token_add_time", new Date().getTime());
|
||||
localStorage.setItem("user_id", data.uid);
|
||||
$.toast(resData.message);
|
||||
if (data.firstLogin) {
|
||||
// 显示设置密码页面
|
||||
|
||||
@@ -105,8 +105,10 @@ function login(openid, unionid, accessToken, nickname, headImg, loginFrom, uri)
|
||||
back();
|
||||
})
|
||||
}else{
|
||||
localStorage.setItem("user_token", resData.data);
|
||||
var data = resData.data;
|
||||
localStorage.setItem("user_token", data.token);
|
||||
localStorage.setItem("user_token_add_time", new Date().getTime());
|
||||
localStorage.setItem("user_id", data.uid);
|
||||
back();
|
||||
}
|
||||
}else{
|
||||
|
||||
@@ -122,7 +122,12 @@ $("body").delegate(".open-about02", "click", function () {
|
||||
eventType = "rentQueryClick";
|
||||
}else{
|
||||
cat = "district"
|
||||
eventType = "priceQueryClick";
|
||||
if(text=="房价查询"){
|
||||
eventType = "priceQueryClick";
|
||||
}else{
|
||||
eventType = "districtSerachClick";
|
||||
}
|
||||
|
||||
}
|
||||
saveBehaviorLog(eventType,dataMap);//保存用户点击事件
|
||||
$('.historyList').show();
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
if (day >= 25) {
|
||||
localStorage.removeItem("user_token");
|
||||
localStorage.removeItem("user_token_add_time");
|
||||
localStorage.removeItem("user_id");
|
||||
}
|
||||
//mui初始化
|
||||
mui.init();
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="ad"><img id="img"></a>
|
||||
<a class="ad" id="img_ad"><img id="img"></a>
|
||||
<div class="topic">
|
||||
<div class="topicTitle" style="position:relative;">均价走势
|
||||
<div class="content-block">
|
||||
@@ -300,11 +300,19 @@ $.config = {router: false}
|
||||
if(typeof(h.imgId)!="undefined"&&h.imgId!=null&&$.trim(h.imgId)!=""){
|
||||
$("#img").attr("src",BASE_PATH+"/img/"+h.imgId);
|
||||
//控制贷款按钮是否可以显示,便于ios版本审核
|
||||
if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){
|
||||
$("#img").click(function(){
|
||||
clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){})
|
||||
})
|
||||
}
|
||||
// if(localStorage.getItem("showLoanMenu")!=null && localStorage.getItem("showLoanMenu")=="true"){
|
||||
// $("#img").click(function(){
|
||||
// clicked('/views/loan/loanInfo.html',true,false,{},{houseId: hid, city: h.city, mobile: ""},function(){})
|
||||
// })
|
||||
// }
|
||||
}
|
||||
if(typeof(h.link)!="undefined"&&h.link!=null&&$.trim(h.link)!=""){
|
||||
var device = plus.device.uuid;
|
||||
var uid = localStorage.getItem("user_id");
|
||||
$("#img_ad").click(function(){
|
||||
url=h.link+"?uid="+uid+"&device="+device;
|
||||
clicked('views/webview_embed.html', true,false,{},{url:this.url});
|
||||
});
|
||||
}
|
||||
loadingChart(h.city,h.region,h.name,2)
|
||||
//按照时间范围加载数据
|
||||
|
||||
@@ -1580,7 +1580,18 @@ $("#input_floor").picker({
|
||||
textAlign: 'center',
|
||||
values: getfloorHeight()
|
||||
}
|
||||
]
|
||||
],onOpen:function(p){
|
||||
//
|
||||
var input_floor = $("#input_floor").val();
|
||||
var num = input_floor.replace(/第/g,"").replace(/层/g,"").replace(/共/g,"").split(" ");
|
||||
if(num[0]!=null &&num[0]!=undefined){
|
||||
p.cols[0].setValue('第'+num[0]+'层')
|
||||
}
|
||||
if(num[1]!=null &&num[1]!=undefined){
|
||||
p.cols[1].setValue('共'+num[1]+'层')
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
/* 选择-目前状态 */
|
||||
|
||||
@@ -120,6 +120,7 @@ function logout() {
|
||||
//plus.webview.getWebviewById('yfindex.html').reload();
|
||||
localStorage.removeItem("user_token");
|
||||
localStorage.removeItem("user_token_add_time");
|
||||
localStorage.removeItem("user_id");
|
||||
//退出登录之前loading下个人中心
|
||||
if(plus.webview.getWebviewById('views/house/houseDetail.html')!= null) {
|
||||
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
|
||||
|
||||
@@ -200,6 +200,7 @@ var vue = new Vue({
|
||||
$.toast(resData.message);
|
||||
localStorage.setItem("user_token", resData.data.token);
|
||||
localStorage.setItem("user_token_add_time", new Date().getTime());
|
||||
localStorage.setItem("user_id", resData.data.uid);
|
||||
back();
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
|
||||
@@ -136,9 +136,10 @@ new Vue({
|
||||
var resData = response.data;
|
||||
if (resData.status) {
|
||||
// 用户登录成功的TOKEN
|
||||
var token = resData.data;
|
||||
localStorage.setItem("user_token", token);
|
||||
var data = resData.data;
|
||||
localStorage.setItem("user_token", data.token);
|
||||
localStorage.setItem("user_token_add_time", new Date().getTime());
|
||||
localStorage.setItem("user_id", data.uid)
|
||||
$.toast(resData.message);
|
||||
back();
|
||||
} else {
|
||||
|
||||
@@ -1195,12 +1195,21 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="js/city.js" ></script>
|
||||
|
||||
<script>
|
||||
function openHangQing(city){
|
||||
function openHangQing(city,id){
|
||||
var eventType = "newsClick";
|
||||
var dataMap = {};
|
||||
dataMap["city"]=city;
|
||||
dataMap["type"]="推荐城市";
|
||||
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
|
||||
|
||||
axios.get("/rest/news/addCount",{params:{newsId:id}}).then(function(response){
|
||||
if(response.data.code==200){
|
||||
|
||||
}
|
||||
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
});
|
||||
clicked('views/house/cityDetail.html',true,false,{},{city:city},function(){
|
||||
|
||||
})
|
||||
@@ -1829,7 +1838,7 @@ function addItems(number, lastIndex) {
|
||||
'</div>';
|
||||
}
|
||||
if(dataObj[i].type=="推荐小区"){
|
||||
html += '<div class="card cardInfo cardInfo02" onclick="openNewsDistWindow(\''+dataObj[i].recommendDistrictCity+'\',\''+dataObj[i].recommendDistrictRegion+'\',\''+dataObj[i].recommendDistrictName+'\')">'+
|
||||
html += '<div class="card cardInfo cardInfo02" onclick="openNewsDistWindow(\''+dataObj[i].recommendDistrictCity+'\',\''+dataObj[i].recommendDistrictRegion+'\',\''+dataObj[i].recommendDistrictName+'\',\''+dataObj[i].id+'\')">'+
|
||||
'<div class="card-content">'+
|
||||
'<div class="list-block media-list"><ul><li class="item-content">'+
|
||||
'<div class="item-media"><img src="cardInfoPlaceholderImg.png" onload="loadImg(\''+dataObj[i].coverImg+'\',this)"></div>'+
|
||||
@@ -1853,7 +1862,7 @@ function addItems(number, lastIndex) {
|
||||
}
|
||||
if(dataObj[i].type=="活动"){
|
||||
if(dataObj[i].adUrl!=null && dataObj[i].adUrl!=""){
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01b" onclick="openUrl(\''+BASE_PATH+'/message/openView?url='+dataObj[i].adUrl+'\')">';
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01b" onclick="openUrl(\''+BASE_PATH+'/message/openView?url='+dataObj[i].adUrl+'\',\''+dataObj[i].id+'\')">';
|
||||
}else{
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01b">';
|
||||
}
|
||||
@@ -1862,7 +1871,7 @@ function addItems(number, lastIndex) {
|
||||
'<div class="card-footer"><span>'+dataObj[i].introduction+'</span></div></div>';
|
||||
}
|
||||
if(dataObj[i].type=="推荐城市"){
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01a" onclick="openHangQing(\''+dataObj[i].recommendCity+'\')">'+
|
||||
html += '<div class="card cardInfo cardInfo01 cardInfo01a" onclick="openHangQing(\''+dataObj[i].recommendCity+'\',\''+dataObj[i].id+'\')">'+
|
||||
'<div class="card-header">推荐城市——'+dataObj[i].recommendCity+'</div>';
|
||||
if(dataObj[i].recommendCityTags != "" && dataObj[i].recommendCityTags != null){
|
||||
var arry = dataObj[i].recommendCityTags.split("_");
|
||||
@@ -2374,11 +2383,21 @@ function req(cityStr){
|
||||
//potenialIndex(city,sort);
|
||||
}
|
||||
|
||||
function openUrl(url){
|
||||
function openUrl(url,id){
|
||||
var eventType = "newsClick";
|
||||
var dataMap = {};
|
||||
dataMap["type"]="活动";
|
||||
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
|
||||
|
||||
axios.get("/rest/news/addCount",{params:{newsId:id}}).then(function(response){
|
||||
if(response.data.code==200){
|
||||
|
||||
}
|
||||
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
clicked(url,true);
|
||||
}
|
||||
|
||||
@@ -2777,7 +2796,7 @@ function openNewView(viewHtml) {
|
||||
clicked(viewHtml,true,false,{},{})
|
||||
}
|
||||
|
||||
function openNewsDistWindow(city, region, name){
|
||||
function openNewsDistWindow(city, region, name,id){
|
||||
var eventType = "newsClick";
|
||||
var dataMap = {};
|
||||
dataMap["city"]=city;
|
||||
@@ -2785,6 +2804,16 @@ function openNewsDistWindow(city, region, name){
|
||||
dataMap["name"]=name;
|
||||
dataMap["type"]="推荐小区";
|
||||
saveBehaviorLog(eventType,dataMap); //保存用户点击事件
|
||||
|
||||
axios.get("/rest/news/addCount",{params:{newsId:id}}).then(function(response){
|
||||
if(response.data.code==200){
|
||||
|
||||
}
|
||||
|
||||
}).catch(function(error){
|
||||
console.log(error)
|
||||
});
|
||||
|
||||
clicked('views/district/detail.html',true,false,{},{city:city,region:region,name:name});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user