Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into xh-youfangApp1.1

This commit is contained in:
xuhe@fangjia.com
2018-04-12 10:01:40 +08:00
6 changed files with 156 additions and 133 deletions
+99 -94
View File
@@ -483,22 +483,89 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
<script type="text/javascript" src="../component/cityChooseComponent.js"></script>
<script>
var city = "上海1";
var myFocus = new Vue({
el:"#myFocus"
})
var cityIncreaseRanking = new Vue({
el:"#cityIncreaseRanking"
})
var cityPotentialRanking = new Vue({
el:"#cityPotentialRanking"
})
var cityChoose = new Vue({
el:"#cityChoose",
data:{
city:city
}
})
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady(){
var city = "";
getPosition();
var myFocus = new Vue({
el:"#myFocus"
})
var cityIncreaseRanking = new Vue({
el:"#cityIncreaseRanking"
})
var cityPotentialRanking = new Vue({
el:"#cityPotentialRanking"
})
var cityChoose = new Vue({
el:"#cityChoose",
data:{
city:city
}
})
/* 关注&已关注切换 */
$(".collection01").on("click", function () {
$(this).hide();
$(this).next().show();
$.toast("已关注");
});
$(".collection02").on("click", function () {
$(this).hide();
$(this).prev().show();
$.toast("取消关注");
});
/* button状态切换 */
$(".content-block .button").on("click", function () {
$(this).parent().children().removeClass("active");
$(this).addClass("active");
});
/* 图表切换 */
$("#tabAvg").on("click", function () {
$("#tabChart1").css("z-index","1");
$("#tabChart2").css("z-index","-1");
});
$("#tabRent").on("click", function () {
$("#tabChart2").css("z-index","1");
$("#tabChart1").css("z-index","-1");
});
/* 弹出城市选择页面 */
$(document).on("click",".open-about01", function () {
markFocus();
$.popup(".popup-about01");
});
/* 定位城市 */
$("body").on("click", ".letter a", function () {
var s = $(this).html();
$(".popup-about01 .content").scrollTop(0);
$(".popup-about01 .content").scrollTop($("#" + s + "1").offset().top - 106);
});
$("#tabCity1 .content-block01").scroll(function () {
$("#tabCity1 .content-block01 .letter").css("position","absolute");
$("#tabCity1 .content-block01 .letter").css("top", 85 - $("#cityContainer").position().top);
});
/* 获取城市 */
$(".popup-about01 .cityGPS").on("click", function () {
$("#input_city").val($(this).find("p").text());
$(".cityChoice a").text($(this).find("p").text());
$(".popup-about01 p").removeClass("active");
});
$(".popup-about01 p").on("click", function () {
$("#input_city").val($(this).text());
$(".cityChoice a").text($(this).text());
$(".popup-about01 p").removeClass("active");
$(this).addClass("active");
var city = $(this).text()
addFocus(city)
});
/* 点击热门小区跳转到小区详情页 */
$(".cardNearby").on("click", function(){
window.location.href = "01_index04_districtDetail.html";
});
}
//加载首页全国数据
$(function() {
var date=new Date;
@@ -568,38 +635,8 @@ $(document).ready(function () {
}*/
});
/* 关注&已关注切换 */
$(".collection01").on("click", function () {
$(this).hide();
$(this).next().show();
$.toast("已关注");
});
$(".collection02").on("click", function () {
$(this).hide();
$(this).prev().show();
$.toast("取消关注");
});
/* button状态切换 */
$(".content-block .button").on("click", function () {
$(this).parent().children().removeClass("active");
$(this).addClass("active");
});
/* 图表切换 */
$("#tabAvg").on("click", function () {
$("#tabChart1").css("z-index","1");
$("#tabChart2").css("z-index","-1");
});
$("#tabRent").on("click", function () {
$("#tabChart2").css("z-index","1");
$("#tabChart1").css("z-index","-1");
});
/* 点击热门小区跳转到小区详情页 */
$(".cardNearby").on("click", function(){
window.location.href = "01_index04_districtDetail.html";
});
/* 获取热门小区名称字数,截取热门小区名称前5字,并添加... */
$(document).ready(function () {
@@ -614,37 +651,24 @@ $(document).ready(function () {
});
});
/* 弹出城市选择页面 */
$(document).on("click",".open-about01", function () {
markFocus();
$.popup(".popup-about01");
});
/* 定位城市 */
$("body").on("click", ".letter a", function () {
var s = $(this).html();
$(".popup-about01 .content").scrollTop(0);
$(".popup-about01 .content").scrollTop($("#" + s + "1").offset().top - 106);
});
$("#tabCity1 .content-block01").scroll(function () {
$("#tabCity1 .content-block01 .letter").css("position","absolute");
$("#tabCity1 .content-block01 .letter").css("top", 85 - $("#cityContainer").position().top);
});
/* 获取城市 */
$(".popup-about01 .cityGPS").on("click", function () {
$("#input_city").val($(this).find("p").text());
$(".cityChoice a").text($(this).find("p").text());
$(".popup-about01 p").removeClass("active");
});
$(".popup-about01 p").on("click", function () {
$("#input_city").val($(this).text());
$(".cityChoice a").text($(this).text());
$(".popup-about01 p").removeClass("active");
$(this).addClass("active");
var city = $(this).text()
addFocus(city)
});
function getPosition(){
plus.geolocation.getCurrentPosition(function(p){
province = p.address.province;
city = p.address.city;
region = p.address.district;
}, function(e){
},
{
provider:'baidu',
enableHighAccuracy:true,
coordsType:'bd09ll'
}
);
}
//$(document).on("click",".open-about01", function () {
// markFocus();
// $.popup(".popup-about01");
@@ -690,25 +714,6 @@ function addFocus(city){
})
}
//重新加载我的关注
function reloadMyFocus(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
$("#myFocusFirstPage").hide()
$("#myFocus").hide();
}else{
axios.get("/rest/quotations/userCollectCityInfo").then(function(response){
if(response.data.data.length==0){
alert("aa");
$("#myFocusFirstPage").hide();
$("#myFocus").hide();
}else{
myFocusDatas.myFocusList = response.data.data;
}
}).catch(function(error){
console.log(error)
})
}
}
</script>
<script type="text/javascript" src="../../js/echarts.js" charset="utf-8"></script>