diff --git a/fangija-zsyf/js/district/districtDetail.js b/fangija-zsyf/js/district/districtDetail.js index 723b81f..ab2b642 100644 --- a/fangija-zsyf/js/district/districtDetail.js +++ b/fangija-zsyf/js/district/districtDetail.js @@ -73,7 +73,7 @@ function removeCollect(){ } /* button状态切换 */ -$(".content-block .button").on("click", function () { +$("#trendTabDiv .button").on("click", function () { $(this).parent().children().removeClass("active"); $(this).addClass("active"); }); @@ -292,16 +292,12 @@ function loadKLineData(city, region, name){ } $("#trendDiv1 a").click(function(){ - $("#trendDiv1 a").removeClass("active") - $(this).addClass("active") //showTrends(); var v = $(this).attr("t-v"); showTrends(v) }); function showTrends(v){ - - if(v == "36"){ if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { clicked('../user/codeSms.html',true,false,{},{},function(){ @@ -309,12 +305,22 @@ function showTrends(v){ }) return; } else { + $("#trendDiv1 a").removeClass("active") + $("a[t-v='36']").addClass("active") //curOption.dataZoom[0].start = 0 loadKLineData(city, region, name) } + }else{ + $("#trendDiv1 a").removeClass("active") + //myChart01.setOption(curOption,true); + if(v == 12){ + $("a[t-v='12']").addClass("active") + }else{ + $("a[t-v='6']").addClass("active") + } + loadKLineData(city, region, name) } - //myChart01.setOption(curOption,true); - loadKLineData(city, region, name) + } diff --git a/fangija-zsyf/main.html b/fangija-zsyf/main.html index 8ce27a1..1dc0688 100644 --- a/fangija-zsyf/main.html +++ b/fangija-zsyf/main.html @@ -19,7 +19,7 @@ 首页 - + 行情 @@ -48,11 +48,11 @@ localStorage.removeItem("user_token"); localStorage.removeItem("user_token_add_time"); } - document.getElementById("quotations").setAttribute("href", BASE_PATH + '/quotations/index'); + //document.getElementById("quotations").setAttribute("href", BASE_PATH + '/quotations/index'); //document.getElementById("selfInfo").setAttribute("href", BASE_PATH + '/selfInfo/index'); //mui初始化 mui.init(); - var subpages = ['yfindex.html', BASE_PATH + '/quotations/index', 'views/house/houseManageList.html', 'views/user/userInfo.html']; + var subpages = ['yfindex.html', 'views/house/houseDetail.html', 'views/house/houseManageList.html', 'views/user/userInfo.html']; var subpage_style = { top: '0', bottom: '50px', diff --git a/fangija-zsyf/views/component/cityChooseComponent.js b/fangija-zsyf/views/component/cityChooseComponent.js new file mode 100644 index 0000000..ef8b95f --- /dev/null +++ b/fangija-zsyf/views/component/cityChooseComponent.js @@ -0,0 +1,882 @@ +////markFocus:已关注城市是否加标志(0:否,1:是) +////clickFocus:点击城市是否添加关注(0:否,1:是) +//var cityChooseOption = {markFocus:0,clickFocus:0} + +Vue.component('city_choose',{ + props:['city1'], + template: +' ' +}) + diff --git a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js index 6e52331..8eb91d9 100644 --- a/fangija-zsyf/views/component/cityIncreaseRankingComponent.js +++ b/fangija-zsyf/views/component/cityIncreaseRankingComponent.js @@ -1,4 +1,4 @@ -var cityIncreaseRankingData = {cityIncreaseRankingList:[]}; +var cityIncreaseRankingData = {cityIncreaseRankingList:[],test:"ttt"}; Vue.component('city_increase_ranking',{ template:'
'+ @@ -24,7 +24,7 @@ Vue.component('city_increase_ranking',{ '
{{ci.city}}
'+ '
{{!ci.cityTopMonthAvgPrice||ci.cityTopMonthAvgPrice==""?"暂无":""+ci.cityTopMonthAvgPrice+"元/㎡"}}
'+ '
'+ - '{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(ci.oneMonthUpDownRange)+"%"}}'+ + '{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}'+ '
'+ '
'+ '关注'+ @@ -48,10 +48,16 @@ Vue.component('city_increase_ranking',{ }) }, follow:function(city){ - alert(city) + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + }).catch(function(error){ + console.log(error) + }) }, abolish:function(city){ - alert(city) + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + }).catch(function(error){ + console.log(error) + }) } }, mounted:function(){ diff --git a/fangija-zsyf/views/component/cityPotentialRankingComponent.js b/fangija-zsyf/views/component/cityPotentialRankingComponent.js index 62a9fe5..377b2c3 100644 --- a/fangija-zsyf/views/component/cityPotentialRankingComponent.js +++ b/fangija-zsyf/views/component/cityPotentialRankingComponent.js @@ -23,7 +23,7 @@ Vue.component('city_potential_ranking',{ '
{{index+1}}
'+ '
{{cp.city}}
'+ '
'+ - '{{!cp.oneYearUpDownRange||cp.oneYearUpDownRange==""?"暂无":Math.abs(cp.oneYearUpDownRange)+"%"}}'+ + '{{!cp.oneYearUpDownRange||cp.oneYearUpDownRange==""?"暂无":Math.abs(cp.oneYearUpDownRange*100).toFixed(2)+"%"}}'+ '
'+ '
'+ ''+ @@ -67,10 +67,16 @@ Vue.component('city_potential_ranking',{ }) }, follow:function(city){ - alert(city) + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + }).catch(function(error){ + console.log(error) + }) }, abolish:function(city){ - alert(city) + axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + }).catch(function(error){ + console.log(error) + }) } }, mounted:function(){ diff --git a/fangija-zsyf/views/component/myFocusComponent.js b/fangija-zsyf/views/component/myFocusComponent.js index 0d73287..cbf3222 100644 --- a/fangija-zsyf/views/component/myFocusComponent.js +++ b/fangija-zsyf/views/component/myFocusComponent.js @@ -1,58 +1,68 @@ var myFocusDatas = {myFocusList: []}; Vue.component('my_focus',{ - template: - '' - , - data:function(){ - return myFocusDatas; - }, - methods:{ - loadMyFocus:function(){ - axios.get("/rest/quotations/userCollectCityInfo").then(function(response){ - myFocusDatas.myFocusList = response.data.data; - }).catch(function(error){ - //alert(2) - console.log(error) - }) - } - },mounted:function(){ - this.loadMyFocus(); - } - -}) + template: + '' + , + data:function(){ + return myFocusDatas; + }, + methods:{ + loadMyFocus:function(){ + 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) + }) + } + } + },mounted:function(){ + this.loadMyFocus(); + } + +}) \ No newline at end of file diff --git a/fangija-zsyf/views/district/detail.html b/fangija-zsyf/views/district/detail.html index 6472047..5a266c9 100644 --- a/fangija-zsyf/views/district/detail.html +++ b/fangija-zsyf/views/district/detail.html @@ -113,7 +113,7 @@
小区走势分析
-
+ @@ -237,9 +237,9 @@ $.config = {router: false} + + +
+ +
+ + diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html index 0d1f8f2..812b9e9 100644 --- a/fangija-zsyf/views/house/houseManageList.html +++ b/fangija-zsyf/views/house/houseManageList.html @@ -179,7 +179,7 @@ function selectEvaluateList(){ }).then(function (response) { var resultsMap = response.data.data; var results = resultsMap.houseInfoList; - if(resultsMap.houseInfoList.length=0){ + if(resultsMap.houseInfoList.length==0){ $('#dataList').hide(); $('#noData').show(); }else{ @@ -267,7 +267,8 @@ $(document).ready(function () { function openaddWindow(){ clicked('/views/house/add.html',true,false,{},{},function(){ - alert("aa"); + window.location.reload(); + plus.webview.getWebviewById('views/user/userInfo.html').reload(); }) }