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-14 17:47:06 +08:00
25 changed files with 1798 additions and 191 deletions
+9 -1
View File
@@ -14,6 +14,14 @@ axios.interceptors.request.use(function (config) {
axios.interceptors.response.use(function (response) {
return response;
}, function (error) {
clicked('error.html',true,false,{},{},function(){})
if(error=="Error: Network Error"){
if(plus.webview.getWebviewById('error.html')==null){
clicked('error.html',true,false,{},{},function(){
window.location.reload();
})
}else{
plus.webview.getWebviewById("error.html").show();
}
}
return Promise.reject(error);
});
+13 -5
View File
@@ -105,6 +105,17 @@ function loadMap(){
}
}
}*/
function showLoadRentTrends(type) {
if(type == 3) {
document.getElementById("trendDivTab3").setAttribute("class","tab-link button active");
document.getElementById("trendDivTab2").setAttribute("class","tab-link button");
} else {
document.getElementById("trendDivTab3").setAttribute("class","tab-link button");
document.getElementById("trendDivTab2").setAttribute("class","tab-link button active");
}
loadRentTrends(city, region, name,type);
}
//小区详情
function loadDistrictInfo(){
@@ -208,7 +219,6 @@ function loadDistrictInfo(){
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -242,7 +252,6 @@ function loadDistrictInfo(){
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}*/
@@ -291,7 +300,6 @@ function loadKLineData(city, region, name){
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -302,6 +310,7 @@ function showTrends(v){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){
showTrends(v);
plus.webview.getWebviewById('views/user/userInfo.html').reload();
})
return;
} else {
@@ -373,7 +382,7 @@ var option01 = {
type: 'slider',
xAxisIndex: [0, 1],
realtime: false,
start: 50,
start: 0,
end: 100,
top: 65,
height: 20,
@@ -573,7 +582,6 @@ function loadRentTrends(city, region, name, type){
$("#tabRentDiv").addClass("dn")
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
+26 -9
View File
@@ -1,9 +1,9 @@
var ret = []
function loadMyCollectCity(){
function loadCurCity(city){
axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) {
var curDatas = response.data.data
if(curDatas){
if(curDatas && curDatas.length>0){
if(IsInArray(curDatas, city)){
cityInfoVue.$data.collecd = true;
}else{
@@ -12,7 +12,6 @@ function loadMyCollectCity(){
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -39,7 +38,6 @@ function loadCityPriceInfo(city){
cityInfoVue.$data.myCityMap = cityObj;
}
}).catch(function (error) {
alert(error)
console.log(error);
});
@@ -56,7 +54,6 @@ function loadUpOrDown(city){
loadUpOrDownChart(data2.downRate, data2.upRate);
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -73,7 +70,6 @@ function loadCityPricesAndCounts(city){
loadTrends(data3.times, data3.cityPriceMap , data3.countMap);
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -102,7 +98,6 @@ function loadHotDistrict(city){
cityInfoVue.$data.nears = nears;
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -163,7 +158,6 @@ function startingLoadCharts(city, type){
showChart("price_chart", times, prices, counts)
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -183,6 +177,7 @@ function loadUpOrDownChart(downRate, upRate){
dataUp = [cityObj1, cityObj2]
addUpChart(dataUp)
$("#up_chart").parent().parent().show();
}else{
$("#up_chart").parent().parent().hide()
}
@@ -198,6 +193,7 @@ function loadUpOrDownChart(downRate, upRate){
dataDown = [cityObj3, cityObj4]
addDownChart(dataDown)
$("#down_chart").parent().parent().show();
}else{
$("#down_chart").parent().parent().hide()
}
@@ -464,9 +460,29 @@ function docollectCity(city){
var msg = response.data.message;
if(msg){
if(msg == "取消关注成功"){
cityInfoVue.$data.collecd = false;
try{
cityInfoVue.$data.collecd = false;
var da = cityDetaiVue.$data.citys
if(da && da.length>0){
var index = da.indexOf(city)
if(index>0){
da.splice(index, 1)
cityDetaiVue.$data.citys = da;
if(da.length>0){
$("a[href='#tabQuotation0']").click();
}
}
}
}catch(e){
}
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}else if(msg == "关注成功"){
cityInfoVue.$data.collecd = true;
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}else{
$.toast(msg);
}
@@ -478,3 +494,4 @@ function docollectCity(city){
});
}
@@ -157,7 +157,6 @@ function loadMyCollectCity(){
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -307,7 +306,6 @@ function startingLoadCharts(city, type, num){
showChart(num+"_price_chart", times, prices, counts)
}).catch(function (error) {
alert(error)
console.log(error);
});
}
-2
View File
@@ -56,7 +56,6 @@ $("#districtName").bind("input propertychange keyup" , function () {
$('.searchList').show();
}
}).catch(function (error) {
alert(error)
console.log(error);
});
@@ -144,7 +143,6 @@ function addHotDistricts(cityParam){
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
-2
View File
@@ -65,7 +65,6 @@ $("#districtName").bind("input propertychange keyup" , function () {
$('.searchList').show();
}
}).catch(function (error) {
alert(error)
console.log(error);
});
@@ -150,7 +149,6 @@ function addHotDistricts(cityParam){
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -53,7 +53,6 @@ $("#districtName").bind("input propertychange keyup" , function () {
$('.searchList').show();
}
}).catch(function (error) {
alert(error)
console.log(error);
});
@@ -134,7 +133,6 @@ function addHotDistricts(cityParam){
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
+21 -2
View File
@@ -1620,7 +1620,8 @@
"views/user/passLogin.html",
"views/district/detail.html",
"views/setting/setting.html",
"views/user/codeSms.html"
"views/user/codeSms.html",
"views/house/detail.html"
],
"priority": 0
},
@@ -1668,7 +1669,25 @@
"priority": 0
},
"views/house/houseDetail.html": {
"resources": [],
"resources": [
"views/component/cityIncreaseRankingComponent.js",
"js/echarts.js",
"css/main.css",
"js/axiosPlugin.js",
"js/quotations/cityDetail.js",
"js/light7.js",
"views/component/cityPotentialRankingComponent.js",
"js/cn.js",
"views/component/myFocusComponent.js",
"js/zepto.js",
"css/city.css",
"js/log/log_stat.js",
"js/common.js",
"js/axios.min.js",
"js/vue.js",
"views/component/cityChooseComponent.js",
"js/highcharts-4.2.3.js"
],
"refer": [
"views/house/regions.html",
"views/district/detail.html",
@@ -33,56 +33,56 @@ Vue.component('base-info-component', {
<p>
<label>竣工年代:</label>
<span v-if="finishBuildingDate">{{finishBuildingDate}}</span>
<span v-else>暂无数据</span>
<span v-else>暂无</span>
</p>
<p>
<label>容<small class="spacing01a">&nbsp;</small>积<small class="spacing01a">&nbsp;</small>率:</label>
<span v-if="cubagePercent">{{cubagePercent}}</span>
<span v-else>暂无数据</span>
<span v-else>暂无</span>
</p>
<p>
<label>绿<small class="spacing01a">&nbsp;</small>化<small class="spacing01a">&nbsp;</small>率:</label>
<span v-if="virescencePercent">{{virescencePercent}}</span>
<span v-else>暂无数据</span>
<span v-else>暂无</span>
</p>
<p>
<label>主力面积:</label>
<span v-if="moreArea">{{moreArea}}</span>
<span v-else>暂无数据</span>
<span v-else>暂无</span>
</p>
<p>
<label>开<small class="spacing01a">&nbsp;</small>发<small class="spacing01a">&nbsp;</small>商:</label>
<span class="span01" v-if="developer">{{developer}}</span>
<span v-else>暂无数据</span>
<span v-else>暂无</span>
</p>
<p>
<label>物业公司:</label>
<span class="span01" v-if="estateCompany">{{estateCompany}}</span>
<span v-else>暂无数据</span>
<span v-else>暂无</span>
</p>
</div>
<div class="col-50">
<p>
<label>总<small class="spacing01a">&nbsp;</small>户<small class="spacing01a">&nbsp;</small>数:</label>
<span>{{householdCount}}</span>
<span v-else>暂无数据</span>
<span v-else>暂无</span>
</p>
<p>
<label>停<small class="spacing01a">&nbsp;</small>车<small class="spacing01a">&nbsp;</small>位:</label>
<span v-if="carSiteCount">{{carSiteCount}}</span>
<span v-else>暂无数据</span>
<span v-else>暂无</span>
</p>
<p>
<label>物<small class="spacing01a">&nbsp;</small>业<small class="spacing01a">&nbsp;</small>费:</label>
<span v-if="estateCharge">{{estateCharge}}元/㎡/月</span>
<span v-else>暂无数据</span>
<span v-else>暂无</span>
</p>
</div>
</div>
@@ -215,7 +215,6 @@ Vue.component('base-info-component', {
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
@@ -28,7 +28,6 @@ Vue.component('map-component', {
loadMapPoi();
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
+1 -2
View File
@@ -10,7 +10,7 @@ Vue.component('near-dist-component', {
<div class="card cardNearby" v-for="(dist,index) in nearDists" @click="showDistrict(index)">
<div class="card-header">{{dist.sname}}</div>
<div class="card-content">
<div class="card-content-inner">{{dist.avgPrice}}元/㎡</div>
<div class="card-content-inner">{{dist.avgPrice?(dist.avgPrice+"元/㎡"):'暂无'}}</div>
</div>
<div class="card-footer">距您{{dist.distance}}m</div>
</div>
@@ -60,7 +60,6 @@ Vue.component('near-dist-component', {
}
}).catch(function (error) {
alert(error)
console.log(error);
});
},
-1
View File
@@ -36,7 +36,6 @@ Vue.component('room-rent-component', {
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
-1
View File
@@ -171,7 +171,6 @@ function loadRentTrends(city, region, name){
$("#tabRentDiv").addClass("dn");
}
}).catch(function (error) {
alert(error)
console.log(error);
});
}
+13 -16
View File
@@ -165,7 +165,7 @@
</div>
<div class="topic" id="mapDiv">
<div class="topic dn" id="mapDiv">
<div class="topicTitle">位置及周边</div>
<div class="topicContent" style="padding:0;">
<div class="content-block content-block01 content-block01a" id="aroundLink">
@@ -238,8 +238,8 @@ $.config = {router: false}
<script>
var city = "上海"
var region = "长宁"
var name = "新泾三村"
var region = "嘉定"
var name = "世盟壹天地"
//var lat = 31.292437
//var lng = 121.48703
@@ -314,17 +314,7 @@ function onPlusReady() {
loadRentTrends(city, region, name,2);
}
function showLoadRentTrends(type) {
if(type == 3) {
document.getElementById("trendDivTab3").setAttribute("class","tab-link button active");
document.getElementById("trendDivTab2").setAttribute("class","tab-link button");
} else {
document.getElementById("trendDivTab3").setAttribute("class","tab-link button");
document.getElementById("trendDivTab2").setAttribute("class","tab-link button active");
}
loadRentTrends(city, region, name,type);
}
/*baseInfo = new Vue({
el: '#districtBaseInfo',
@@ -364,8 +354,13 @@ function showLoadRentTrends(type) {
}
}
})
*/
})*/
/* 小区均价分析 */
//loadKLineData(city, region, name);
/* 小区租金走势 */
//loadRentTrends(city, region, name,2);
function openMapWindow(){
clicked('arround.html',true,false,{},{city:city,region:region,name:name,lat:lat,lng:lng});
}
@@ -391,7 +386,9 @@ var t1 = window.setInterval(loadMap,1000);
function loadMap(){
if(lng && lat){
loadMapPoi();
$("#mapDiv").show();
window.clearInterval(t1);
}
}
@@ -303,13 +303,13 @@ $.config = {router: false}
{
text: '出租',
onClick: function() {
addManagement(hid, houseStatus, "自住");
addManagement(hid, houseStatus, "出租");
}
},
{
text: '空置',
onClick: function() {
addManagement(hid, houseStatus, "自住");
addManagement(hid, houseStatus, "空置");
}
},
{
+3 -2
View File
@@ -149,7 +149,7 @@ $.config = {router: false}
var date = new Date();
var year = date.getFullYear()+'年';
var month = date.getMonth()+1+'月';
var city = "天津"
var city = ""
var cityInfoVue = new Vue({
el: '#cityInfo',
data: {
@@ -166,11 +166,12 @@ function onPlusReady() {
var self = plus.webview.currentWebview();
var city = self.city
cityInfoVue.$data.city = city;
loadMyCollectCity();
loadCurCity(city);
loadCityPriceInfo(city)
loadUpOrDown(city);
loadHotDistrict(city)
loadCityPricesAndCounts(city)
}
+9 -10
View File
@@ -239,9 +239,9 @@
<div id="tabChart1" class="tab tabChart1 active">
<div class="content-block content-block01a" style="margin:0;padding-left:0;padding-right:0;">
<div class="buttons-row theme" style="padding:0 0.75rem;" id="trendDiv1">
<a t-v="6" class="tab-link button active">半年</a>
<a t-v="12" class="tab-link button">一年</a>
<a t-v="36" class="tab-link button">三年</a>
<a t-v="6" class="tab-link button active" onclick="showTrends(6)">半年</a>
<a t-v="12" class="tab-link button" onclick="showTrends(12)">一年</a>
<a t-v="36" class="tab-link button" onclick="showTrends(36)">三年</a>
</div>
<div class="chart" id="chart01" style="height:360px;"></div>
</div>
@@ -249,12 +249,10 @@
<div id="tabChart2" class="tab tabChart2" style="display: block;">
<div class="content-block content-block01a" style="margin:0;padding-left:0;padding-right:0;">
<div class="buttons-row theme" style="padding:0 0.75rem;" id="trendDiv2">
<a t-v="2" class="tab-link button active">半年</a>
<a t-v="3" class="tab-link button">一年</a>
</div>
<div class="chart" id="chart02" style="margin-top:0.75rem;">
<a t-v="2" id="trendDivTab2" class="tab-link button active" onclick="showLoadRentTrends(2)">半年</a>
<a t-v="3" id="trendDivTab3" class="tab-link button" onclick="showLoadRentTrends(3)">一年</a>
</div>
<div class="chart" id="chart02" style="margin-top:0.75rem;"></div>
</div>
</div>
</div>
@@ -275,7 +273,7 @@
</div>
</div>
</div>
<div class="topic">
<div class="topic dn" id="mapDiv">
<div class="topicTitle">位置及周边</div>
<div class="topicContent" style="padding:0;">
<div class="content-block content-block01 content-block01a" id="aroundLink">
@@ -526,7 +524,7 @@ function addManagement(id, houseStatus, liveStatus){
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
$.toast("修改状态成功!");
//window.location.reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}else{
$.toast(response.data.message);
}
@@ -549,6 +547,7 @@ var t2 = window.setInterval(loadChart,1000);
function loadMap(){
if(lng && lat){
loadMapPoi();
$("#mapDiv").show();
window.clearInterval(t1);
}
}
+160 -101
View File
@@ -39,14 +39,14 @@
<div class="content" >
<div class="buttons-tab theme" id="tabCityDiv" >
<a href="#tabQuotation1" class="tab-link active button">全国</a>
<div v-for="o in citys">
<a v-bind:href="o.hrefId" class="tab-link button" @click="clickCity(o.hrefId)">{{o.city}}</a>
<div v-for="mycollectcity in citys" >
<a class="tab-link button" @click="clickCity(mycollectcity)" v-bind:vcity="mycollectcity">{{mycollectcity}}</a>
</div>
<a href="#tabQuotation0" class="tab-link button">添加</a>
</div>
<div class="tabs">
<div id="tabQuotation1" class="tab active">
<div id="tabQuotation1" class="tab active">
<div class="card cardPrice cardPrice01 cardCity" id="countryInfo">
<div class="card-header">
<label>全国</label>
@@ -167,92 +167,92 @@
</div>
</div>
<div id="contentTabDiv">
<div class="tab" v-for="(myCityMap,index) in cityDatas">
<div class="card cardPrice cardPrice01 cardCity01" v-bind:hrefid="myCityMap.hrefId">
<div class="card-header">
<label>{{myCityMap.city}}</label>
<a v-if="myCityMap.colled" class="button collection collection02 " @click="collectCity(myCityMap.city, index)">取消</a>
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city, index)">关注</a>
</div>
<div class="card-header">
<span>当前参考均价</span>
</div>
<div class="card-content">
<div class="card-content-inner" v-if="myCityMap.cityTopMonthAvgPrice > 0">{{myCityMap.cityTopMonthAvgPrice}}<span>元/㎡</span></div>
<div class="card-content-inner" v-else>暂无</div>
</div>
<div class="card-footer">
<span v-if="myCityMap.oneMonthUpDownRange >= 0">
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-red"></i></em>
<label>近30天涨跌幅</label>
<div id="cityInfo" class="dn">
<div class="card cardPrice cardPrice01 cardCity01" v-bind:hrefid="myCityMap.hrefId">
<div class="card-header">
<label>{{myCityMap.city}}</label>
<a v-if="collecd" class="button collection collection02 " @click="collectCity(myCityMap.city)">取消</a>
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city)">关注</a>
</div>
<div class="card-header">
<span>当前参考均价</span>
</div>
<div class="card-content">
<div class="card-content-inner" v-if="myCityMap.cityTopMonthAvgPrice">{{myCityMap.cityTopMonthAvgPrice}}<span>元/㎡</span></div>
<div class="card-content-inner" v-else>暂无</div>
</div>
<div class="card-footer">
<span v-if="myCityMap.oneMonthUpDownRange >= 0">
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-red"></i></em>
<label>近30天涨跌幅</label>
</span>
<span v-else>
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-green"></i></em>
<label>近30天涨跌幅</label>
</span>
<span>
<em><strong>{{myCityMap.rangeLevel}}</strong></em>
<label>城市涨跌排名</label>
</span>
<span v-if="myCityMap.index < 50">
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-green"></i></em>
<label>下跌概率</label>
</span>
<span v-else>
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-red"></i></em>
<label>上涨概率</label>
</span>
</div>
</div>
<div class="topic">
<div class="topicTitle topicTitle02">{{myCityMap.time}}楼市行情<span><a @click="showRegionInfo(myCityMap.city)">区县涨跌详情<i class="icon icon-right"></i></a></span></div>
<div class="topicContent" style="padding-top:0;">
<div class="chartBox row">
<span class="col-50">
<div class="chart" id="up_chart"></div>
</span>
<span v-else>
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-green"></i></em>
<label>近30天涨跌幅</label>
</span>
<span>
<em><strong>{{myCityMap.rangeLevel}}</strong></em>
<label>城市涨跌排名</label>
</span>
<span v-if="myCityMap.index < 50">
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-green"></i></em>
<label>下跌概率</label>
</span>
<span v-else>
<em><strong>{{myCityMap.downChance}}</strong>%<i class="icon icon-arrow-red"></i></em>
<label>上涨概率</label>
<span class="col-50">
<div class="chart" id="down_chart"></div>
</span>
</div>
</div>
<div class="topic">
<div class="topicTitle topicTitle02">{{myCityMap.time}}楼市行情<span><a @click="showRegionInfo(myCityMap.city)">区县涨跌详情<i class="icon icon-right"></i></a></span></div>
<div class="topicContent" style="padding-top:0;">
<div class="chartBox row">
<span class="col-50">
<div class="chart" v-bind:id="myCityMap.numId_up_chart"></div>
</span>
<span class="col-50">
<div class="chart" v-bind:id="myCityMap.numId_down_chart"></div>
</span>
</div>
<div class="topic" id="trendChartDiv">
<div class="topicTitle" style="position:relative;">城市均价及挂牌走势
<div class="content-block">
<div class="buttons-row theme" id="trendDiv">
<a class="tab-link button active" v="2" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 2)">半年</a>
<a class="tab-link button" v="3" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 3)">一年</a>
<a class="tab-link button" v="5" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 5)">三年</a>
</div>
</div>
</div>
<div class="topic">
<div class="topicTitle" style="position:relative;">城市均价及挂牌走势
<div class="content-block">
<div class="buttons-row theme" v-bind:tid="index+1">
<a class="tab-link button active" v="2" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 2, index+1)">半年</a>
<a class="tab-link button" v="3" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 3, index+1)">一年</a>
<a class="tab-link button" v="5" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 5, index+1)">三年</a>
</div>
</div>
</div>
<div class="topicContent" style="padding:0;">
<div class="chart" v-bind:id="myCityMap.numId_price_chart"></div>
</div>
<div class="topicContent" style="padding:0;">
<div class="chart" id="price_chart"></div>
</div>
<div class="topic">
<div class="topicTitle">热门小区</div>
<div class="topicContent" style="padding:0;">
<div class="cardNearbyBox cardNearbyBox01">
<div class="cardNearbyWin" style="width: 38rem;">
<div class="card cardNearby" v-for="nearDist in myCityMap.nears" @click="showDistrictDetail(index, myCityMap.city)">
<div class="card-header">{{nearDist.sname}}</div>
<div class="card-content">
<div class="card-content-inner">{{nearDist.avgPrice==0?"暂无":nearDist.avgPrice+"元/㎡"}}</div>
</div>
</div>
<div class="topic">
<div class="topicTitle">热门小区</div>
<div class="topicContent" style="padding:0;">
<div class="cardNearbyBox cardNearbyBox01">
<div class="cardNearbyWin" style="width: 38rem;">
<div class="card cardNearby" v-for="nearDist in nears" @click="showDistrictDetail(nearDist.city, nearDist.region, nearDist.name)">
<div class="card-header">{{nearDist.sname}}</div>
<div class="card-content">
<div class="card-content-inner" v-if="nearDist.avgPrice">{{nearDist.avgPrice}}元/㎡</div>
<div class="card-content-inner" v-else>暂无</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -1210,9 +1210,32 @@ $.config = {router: false}
<script type="text/javascript" src="../component/cityChooseComponent.js"></script>
<script type="text/javascript" src="../../js/echarts.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/highcharts-4.2.3.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/quotations/collectCity.js" ></script>
<script type="text/javascript" src="../../js/quotations/cityDetail.js" ></script>
<script>
var date = new Date();
var year = date.getFullYear()+'年';
var month = date.getMonth()+1+'月';
var positionCity = "";
var cityInfoVue = new Vue({
el: '#cityInfo',
data: {
city:"",
month:month,
collecd:false,
nears:[],
myCityMap : []
}
});
var cityDetaiVue = new Vue({
el: '#tabCityDiv',
data: {
citys:[]
}
})
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady(){
var city = "";
@@ -1221,11 +1244,12 @@ $.config = {router: false}
city = p.address.city;
//region = p.address.district;
if(city && city.endsWith("市")){
city = city.substring(0, city.length-1)
myCollectCitys.push(city);
positionCity = city.substring(0, city.length-1)
}
//lng = p.coords.longitude;//获取到当前位置的经度
//lat = p.coords.latitude;//获取到当前位置的纬度;
loadMyCollectCity();
}, function(e){
},
@@ -1265,17 +1289,7 @@ $.config = {router: false}
coordsType:'bd09ll'
}
);
/* 关注&已关注切换 */
$(".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 () {
@@ -1379,6 +1393,9 @@ $.config = {router: false}
});
});
</script>
<script>
@@ -1414,19 +1431,32 @@ $(document).ready(function () {
$("a[href='#tabQuotation1'],a[href='#tabQuotation0']").click(function(){
$("#tabCityDiv a").removeClass("active");
$("#contentTabDiv > .tab").removeClass("active");
$("#cityInfo").hide()
})
function clickCity(val){
city = val;
$("#cityInfo").show()
$("#tabCityDiv a").removeClass("active");
$("a[href="+val+"]").addClass("active");
$("#contentTabDiv > .tab > div:first-child").each(function(){
var href = $(this).attr("hrefid")
if(val == href){
$("div[hrefid="+href+"]").parent().addClass("active");
}else{
$("div[hrefid="+href+"]").parent().removeClass("active");
}
})
// $("a[href="+val+"]").addClass("active");
// $("#contentTabDiv > .tab > div:first-child").each(function(){
// var href = $(this).attr("hrefid")
// if(val == href){
// $("div[hrefid="+href+"]").parent().addClass("active");
// }else{
// $("div[hrefid="+href+"]").parent().removeClass("active");
// }
// })
$("a[vcity='"+val+"']").addClass("active");
loadCurCity(city);
loadCityPriceInfo(city)
loadUpOrDown(city);
loadHotDistrict(city)
loadCityPricesAndCounts(city)
$("#trendDiv a").removeClass("active")
$("#trendDiv a[v='2']").addClass("active")// 默认走势显示半年
$("#tabQuotation1").removeClass("active");
$("#tabQuotation0").removeClass("active");
@@ -1478,10 +1508,10 @@ function addFocus(city){
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
reloadMyFocus()
createData(city, myDatasVue.$data.cityDatas.length);
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
createData(city, myDatasVue.$data.cityDatas.length);
}).catch(function(error){
console.log(error)
})
@@ -1490,7 +1520,7 @@ function addFocus(city){
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
reloadMyFocus()
createData(city, myDatasVue.$data.cityDatas.length);
cityDetaiVue.$data.citys.push(city);
}).catch(function(error){
console.log(error)
})
@@ -1499,9 +1529,38 @@ function addFocus(city){
}
function hotCity(city){
clicked('../house/cityDetail.html',true,false,{},{city:city});
clicked('../house/cityDetail.html',true,false,{},{city:city},function(){
});
}
function loadMyCollectCity(){
axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) {
var curDatas = response.data.data
if(curDatas && curDatas.length>0){
if(positionCity){
if(!IsInArray(curDatas, positionCity)){
curDatas.splice(0,0, positionCity)
}
}
cityDetaiVue.$data.citys = curDatas;
}else{
if(positionCity){
cityDetaiVue.$data.citys.push(positionCity);
}
$("#cityInfo").hide()
}
}).catch(function (error) {
console.log(error);
});
}
</script>
File diff suppressed because it is too large Load Diff
@@ -214,7 +214,7 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap
htmlContent = htmlContent +"<div class='item-inner'><div class='item-title-row'>";
htmlContent = htmlContent +"<div class='item-title'><label>"+result.name+"</label><span class='span01'>"+result.city+"-"+result.region+"</span></div>";
htmlContent = htmlContent +"</div><div class='item-title-row'>";
htmlContent = htmlContent +"<div class='item-title'><small>"+result.roomCount+"室"+result.hallCount+"厅&nbsp;&nbsp;"+result.area+"m&nbsp;&nbsp;"+result.floor+"/"+result.height+"层</small></div>";
htmlContent = htmlContent +"<div class='item-title'><small>"+result.roomCount+"室"+result.hallCount+"厅&nbsp;&nbsp;"+result.area+"㎡&nbsp;&nbsp;"+result.floor+"/"+result.height+"层</small></div>";
htmlContent = htmlContent +"</div><div class='item-subtitle'>";
//对应城市地区小区30天涨跌幅
//动态构建key
+2 -2
View File
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>小区详情</title>
<title>小区租金详情</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="/favicon.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
@@ -104,7 +104,7 @@
</div>
</div>
<div class="topic" id="mapDiv">
<div class="topic dn" id="mapDiv">
<div class="topicTitle">位置及周边</div>
<div class="topicContent" style="padding:0;">
<div class="content-block content-block01 content-block01a" id="aroundLink">
+4 -2
View File
@@ -29,7 +29,7 @@
<div class="content" id="app">
<div class="list-block media-list">
<ul>
<li>
<li v-show="showPass">
<a onclick="clicked('/views/user/updatePass.html',true);" class="item-link item-content">
<div class="item-inner">
<div class="item-title-row">
@@ -87,12 +87,14 @@ new Vue({
el: '#app',
data: {
showLogin:false,
showLogout:false
showLogout:false,
showPass:false
},
mounted() {
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
this.showLogin = true;
} else {
this.showPass = true;
this.showLogout = true;
}
}
+5
View File
@@ -115,6 +115,11 @@ new Vue({
$.toast("请输入密码");
return;
}
var reg = /^[a-zA-Z0-9]{1,}$/;
if (!reg.test(this.pass)){
$.toast("请输入6位以上数字或字母");
return;
}
if (this.pass.length < 7) {
$.toast("请输入6位以上数字或字母");
return;
+10 -14
View File
@@ -73,28 +73,28 @@
</div>
</div>
<div class="buttons-tab fixed-tab theme" data-offset="44">
<a href="#" class="tab-link button active">房产(0)</a>
<a href="#" class="tab-link button">关注(0)</a>
<a href="#" class="tab-link button">收藏(0)</a>
<a href="#" class="tab-link button" style="display: none;">消息(0)</a>
<a href="#tab_house" class="tab-link button active">房产(0)</a>
<a href="#tab_focus" class="tab-link button">关注(0)</a>
<a href="#tab_collect" class="tab-link button">收藏(0)</a>
<a href="#tab_message" class="tab-link button" style="display: none;">消息(0)</a>
</div>
<div class="tabs">
<div id="" class="tab active">
<div id="tab_house" class="tab active">
<div class="noData">
<img src="../../images/noData.png">
</div>
</div>
<div id="" class="tab">
<div id="tab_focus" class="tab">
<div class="noData">
<img src="../../images/noData.png">
</div>
</div>
<div id="" class="tab">
<div id="tab_collect" class="tab">
<div class="noData">
<img src="../../images/noData.png">
</div>
</div>
<div id="" class="tab">
<div id="tab_message" class="tab">
<div class="noData">
<img src="../../images/noData.png">
</div>
@@ -149,7 +149,7 @@
<a href="#tabList4" class="tab-link button" style="display: none;">消息(2)</a>
</div>
<div class="contentBox">
<div class="content infinite-scroll infinite-scroll-bottom pstion" data-distance="100">
<div class="content infinite-scroll infinite-scroll-bottom pstion" data-distance="50">
<div class="tabs">
<!-- 我的房产 -->
<div id="tabList1" class="tab active">
@@ -251,11 +251,6 @@ $(document).on('click','.alert-text-title', function () {
$.alert('房产等级是房屋在城市中的综合评级,由高至低分别为 豪宅、公寓、平房、草屋、山洞共5个级别。', '房产等级');
});
/* 点击资讯跳转到资讯详情页 */
$(".cardInfo01,.cardInfo02").on("click", function(){
window.location.href = "#";
});
//初始化init
$.init();
@@ -296,6 +291,7 @@ function gotoLogin(){
clicked('/views/user/codeSms.html',true,false,{},{},function(){
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('yfindex.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
checkIsLogin();
})
}
+6 -1
View File
@@ -1193,6 +1193,11 @@ $.config = {router: false}
<script type='text/javascript' src='js/jquery.cookie.js?version=${version!}' charset='utf-8'></script>
<script type="text/javascript" src="js/updateVersion/updateVersion.js" charset='utf-8'></script>
<script>
function openHangQing(city){
clicked('views/house/cityDetail.html',true,false,{},{city:city},function(){
})
}
String.prototype.endWith = function(str) {
var reg = new RegExp(str + "$");
return reg.test(this);
@@ -1768,7 +1773,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="openUrl(\''+BASE_PATH+'/quotations/building?cityName='+dataObj[i].recommendCity+'\')">'+
html += '<div class="card cardInfo cardInfo01 cardInfo01a" onclick="openHangQing(\''+dataObj[i].recommendCity+'\')">'+
'<div class="card-header">推荐城市——'+dataObj[i].recommendCity+'</div>';
if(dataObj[i].recommendCityTags != "" && dataObj[i].recommendCityTags != null){
var arry = dataObj[i].recommendCityTags.split("_");