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

This commit is contained in:
raoyanhui
2018-04-14 17:43:36 +08:00
29 changed files with 1896 additions and 237 deletions
+9 -1
View File
@@ -14,6 +14,14 @@ axios.interceptors.request.use(function (config) {
axios.interceptors.response.use(function (response) { axios.interceptors.response.use(function (response) {
return response; return response;
}, function (error) { }, 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); return Promise.reject(error);
}); });
+20 -22
View File
@@ -9,10 +9,6 @@ var mapLoadCount = 0;
/* 关注&已关注切换 */ /* 关注&已关注切换 */
$(".collection01").on("click", function () {
doAddCollect()
});
function doAddCollect(){ function doAddCollect(){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){ clicked('../user/codeSms.html',true,false,{},{},function(){
@@ -34,7 +30,6 @@ function addCollect(){
$(".collection02").show(); $(".collection02").show();
$.toast("随时掌握小区动态"); $.toast("随时掌握小区动态");
} }
alert(12)
plus.webview.getWebviewById('views/user/userInfo.html').reload(); plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('yfindex.html').reload(); plus.webview.getWebviewById('yfindex.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload(); plus.webview.getWebviewById('views/house/houseManageList.html').reload();
@@ -79,22 +74,22 @@ function removeCollect(){
} }
/* button状态切换 */ /* button状态切换 */
$("#trendTabDiv .button").on("click", function () { /*$("#trendTabDiv .button").on("click", function () {
$(this).parent().children().removeClass("active"); $(this).parent().children().removeClass("active");
$(this).addClass("active"); $(this).addClass("active");
}); });
*/
/* 图表切换 */ /* 图表切换 */
$("#tabAvgDiv").on("click", function () { /*$("#tabAvgDiv").on("click", function () {
$("#tabChart1").css("z-index","1"); $("#tabChart1").css("z-index","1");
$("#tabChart2").css("z-index","-1"); $("#tabChart2").css("z-index","-1");
}); });
$("#tabRentDiv").on("click", function () { $("#tabRentDiv").on("click", function () {
$("#tabChart2").css("z-index","1"); $("#tabChart2").css("z-index","1");
$("#tabChart1").css("z-index","-1"); $("#tabChart1").css("z-index","-1");
}); });*/
var t1 = window.setInterval(loadMap,1000); /*var t1 = window.setInterval(loadMap,1000);
function loadMap(){ function loadMap(){
mapLoadCount++; mapLoadCount++;
if(lng && lat){ if(lng && lat){
@@ -109,6 +104,17 @@ function loadMap(){
$("#mapDiv").hide(); $("#mapDiv").hide();
} }
} }
}*/
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);
} }
//小区详情 //小区详情
@@ -213,7 +219,6 @@ function loadDistrictInfo(){
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
@@ -247,7 +252,6 @@ function loadDistrictInfo(){
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
}*/ }*/
@@ -296,22 +300,17 @@ function loadKLineData(city, region, name){
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
$("#trendDiv1 a").click(function(){
//showTrends();
var v = $(this).attr("t-v");
showTrends(v)
});
function showTrends(v){ function showTrends(v){
if(v == "36"){ if(v == "36"){
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
clicked('../user/codeSms.html',true,false,{},{},function(){ clicked('../user/codeSms.html',true,false,{},{},function(){
showTrends(v); showTrends(v);
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}) })
return; return;
} else { } else {
@@ -383,7 +382,7 @@ var option01 = {
type: 'slider', type: 'slider',
xAxisIndex: [0, 1], xAxisIndex: [0, 1],
realtime: false, realtime: false,
start: 50, start: 0,
end: 100, end: 100,
top: 65, top: 65,
height: 20, height: 20,
@@ -534,8 +533,8 @@ $("#trendDiv2 a").click(function(){
/* 小区租金走势 */ /* 小区租金走势 */
function loadRentTrends(city, region, name){ function loadRentTrends(city, region, name, type){
var type = $("#trendDiv2 a.active").attr("t-v") if(type == undefined) type= 2;
axios.get("/rest/trend/distRentTrends", { axios.get("/rest/trend/distRentTrends", {
params: { params: {
city: city, city: city,
@@ -583,7 +582,6 @@ function loadRentTrends(city, region, name){
$("#tabRentDiv").addClass("dn") $("#tabRentDiv").addClass("dn")
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
+26 -9
View File
@@ -1,9 +1,9 @@
var ret = [] var ret = []
function loadMyCollectCity(){ function loadCurCity(city){
axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) { axios.get("/rest/quotations/userCollectCitys",{}).then(function (response) {
var curDatas = response.data.data var curDatas = response.data.data
if(curDatas){ if(curDatas && curDatas.length>0){
if(IsInArray(curDatas, city)){ if(IsInArray(curDatas, city)){
cityInfoVue.$data.collecd = true; cityInfoVue.$data.collecd = true;
}else{ }else{
@@ -12,7 +12,6 @@ function loadMyCollectCity(){
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
@@ -39,7 +38,6 @@ function loadCityPriceInfo(city){
cityInfoVue.$data.myCityMap = cityObj; cityInfoVue.$data.myCityMap = cityObj;
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
@@ -56,7 +54,6 @@ function loadUpOrDown(city){
loadUpOrDownChart(data2.downRate, data2.upRate); loadUpOrDownChart(data2.downRate, data2.upRate);
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
@@ -73,7 +70,6 @@ function loadCityPricesAndCounts(city){
loadTrends(data3.times, data3.cityPriceMap , data3.countMap); loadTrends(data3.times, data3.cityPriceMap , data3.countMap);
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
@@ -102,7 +98,6 @@ function loadHotDistrict(city){
cityInfoVue.$data.nears = nears; cityInfoVue.$data.nears = nears;
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
@@ -163,7 +158,6 @@ function startingLoadCharts(city, type){
showChart("price_chart", times, prices, counts) showChart("price_chart", times, prices, counts)
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
@@ -183,6 +177,7 @@ function loadUpOrDownChart(downRate, upRate){
dataUp = [cityObj1, cityObj2] dataUp = [cityObj1, cityObj2]
addUpChart(dataUp) addUpChart(dataUp)
$("#up_chart").parent().parent().show();
}else{ }else{
$("#up_chart").parent().parent().hide() $("#up_chart").parent().parent().hide()
} }
@@ -198,6 +193,7 @@ function loadUpOrDownChart(downRate, upRate){
dataDown = [cityObj3, cityObj4] dataDown = [cityObj3, cityObj4]
addDownChart(dataDown) addDownChart(dataDown)
$("#down_chart").parent().parent().show();
}else{ }else{
$("#down_chart").parent().parent().hide() $("#down_chart").parent().parent().hide()
} }
@@ -464,9 +460,29 @@ function docollectCity(city){
var msg = response.data.message; var msg = response.data.message;
if(msg){ if(msg){
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 == "关注成功"){ }else if(msg == "关注成功"){
cityInfoVue.$data.collecd = true; cityInfoVue.$data.collecd = true;
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
}else{ }else{
$.toast(msg); $.toast(msg);
} }
@@ -478,3 +494,4 @@ function docollectCity(city){
}); });
} }
@@ -157,7 +157,6 @@ function loadMyCollectCity(){
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
@@ -307,7 +306,6 @@ function startingLoadCharts(city, type, num){
showChart(num+"_price_chart", times, prices, counts) showChart(num+"_price_chart", times, prices, counts)
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
-2
View File
@@ -56,7 +56,6 @@ $("#districtName").bind("input propertychange keyup" , function () {
$('.searchList').show(); $('.searchList').show();
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
@@ -144,7 +143,6 @@ function addHotDistricts(cityParam){
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
-2
View File
@@ -65,7 +65,6 @@ $("#districtName").bind("input propertychange keyup" , function () {
$('.searchList').show(); $('.searchList').show();
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
@@ -150,7 +149,6 @@ function addHotDistricts(cityParam){
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
@@ -53,7 +53,6 @@ $("#districtName").bind("input propertychange keyup" , function () {
$('.searchList').show(); $('.searchList').show();
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
@@ -134,7 +133,6 @@ function addHotDistricts(cityParam){
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
+21 -2
View File
@@ -1620,7 +1620,8 @@
"views/user/passLogin.html", "views/user/passLogin.html",
"views/district/detail.html", "views/district/detail.html",
"views/setting/setting.html", "views/setting/setting.html",
"views/user/codeSms.html" "views/user/codeSms.html",
"views/house/detail.html"
], ],
"priority": 0 "priority": 0
}, },
@@ -1668,7 +1669,25 @@
"priority": 0 "priority": 0
}, },
"views/house/houseDetail.html": { "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": [ "refer": [
"views/house/regions.html", "views/house/regions.html",
"views/district/detail.html", "views/district/detail.html",
@@ -33,56 +33,56 @@ Vue.component('base-info-component', {
<p> <p>
<label>竣工年代:</label> <label>竣工年代:</label>
<span v-if="finishBuildingDate">{{finishBuildingDate}}</span> <span v-if="finishBuildingDate">{{finishBuildingDate}}</span>
<span v-else>暂无数据</span> <span v-else>暂无</span>
</p> </p>
<p> <p>
<label>容<small class="spacing01a">&nbsp;</small>积<small class="spacing01a">&nbsp;</small>率:</label> <label>容<small class="spacing01a">&nbsp;</small>积<small class="spacing01a">&nbsp;</small>率:</label>
<span v-if="cubagePercent">{{cubagePercent}}</span> <span v-if="cubagePercent">{{cubagePercent}}</span>
<span v-else>暂无数据</span> <span v-else>暂无</span>
</p> </p>
<p> <p>
<label>绿<small class="spacing01a">&nbsp;</small>化<small class="spacing01a">&nbsp;</small>率:</label> <label>绿<small class="spacing01a">&nbsp;</small>化<small class="spacing01a">&nbsp;</small>率:</label>
<span v-if="virescencePercent">{{virescencePercent}}</span> <span v-if="virescencePercent">{{virescencePercent}}</span>
<span v-else>暂无数据</span> <span v-else>暂无</span>
</p> </p>
<p> <p>
<label>主力面积:</label> <label>主力面积:</label>
<span v-if="moreArea">{{moreArea}}</span> <span v-if="moreArea">{{moreArea}}</span>
<span v-else>暂无数据</span> <span v-else>暂无</span>
</p> </p>
<p> <p>
<label>开<small class="spacing01a">&nbsp;</small>发<small class="spacing01a">&nbsp;</small>商:</label> <label>开<small class="spacing01a">&nbsp;</small>发<small class="spacing01a">&nbsp;</small>商:</label>
<span class="span01" v-if="developer">{{developer}}</span> <span class="span01" v-if="developer">{{developer}}</span>
<span v-else>暂无数据</span> <span v-else>暂无</span>
</p> </p>
<p> <p>
<label>物业公司:</label> <label>物业公司:</label>
<span class="span01" v-if="estateCompany">{{estateCompany}}</span> <span class="span01" v-if="estateCompany">{{estateCompany}}</span>
<span v-else>暂无数据</span> <span v-else>暂无</span>
</p> </p>
</div> </div>
<div class="col-50"> <div class="col-50">
<p> <p>
<label>总<small class="spacing01a">&nbsp;</small>户<small class="spacing01a">&nbsp;</small>数:</label> <label>总<small class="spacing01a">&nbsp;</small>户<small class="spacing01a">&nbsp;</small>数:</label>
<span>{{householdCount}}</span> <span>{{householdCount}}</span>
<span v-else>暂无数据</span> <span v-else>暂无</span>
</p> </p>
<p> <p>
<label>停<small class="spacing01a">&nbsp;</small>车<small class="spacing01a">&nbsp;</small>位:</label> <label>停<small class="spacing01a">&nbsp;</small>车<small class="spacing01a">&nbsp;</small>位:</label>
<span v-if="carSiteCount">{{carSiteCount}}</span> <span v-if="carSiteCount">{{carSiteCount}}</span>
<span v-else>暂无数据</span> <span v-else>暂无</span>
</p> </p>
<p> <p>
<label>物<small class="spacing01a">&nbsp;</small>业<small class="spacing01a">&nbsp;</small>费:</label> <label>物<small class="spacing01a">&nbsp;</small>业<small class="spacing01a">&nbsp;</small>费:</label>
<span v-if="estateCharge">{{estateCharge}}元/㎡/月</span> <span v-if="estateCharge">{{estateCharge}}元/㎡/月</span>
<span v-else>暂无数据</span> <span v-else>暂无</span>
</p> </p>
</div> </div>
</div> </div>
@@ -215,7 +215,6 @@ Vue.component('base-info-component', {
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
@@ -49,11 +49,20 @@ Vue.component('city_increase_ranking',{
}, },
follow:function(city,event){ follow:function(city,event){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
alert("请先登录")
clicked('/views/user/passLogin.html',true,false,{},{},function(){ clicked('/views/user/passLogin.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
reloadMyFocus()
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}).catch(function(error){
console.log(error)
})
} }
}) })
}else{ }else{
@@ -61,7 +70,6 @@ Vue.component('city_increase_ranking',{
$(event.target).parent().children().removeClass("dn"); $(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn"); $(event.target).addClass("dn");
reloadMyFocus() reloadMyFocus()
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
@@ -67,11 +67,20 @@ Vue.component('city_potential_ranking',{
}, },
follow:function(city,event){ follow:function(city,event){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
alert("请先登录")
clicked('/views/user/passLogin.html',true,false,{},{},function(){ clicked('/views/user/passLogin.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
reloadMyFocus()
}).catch(function(error){
console.log(error)
})
} }
}) })
}else{ }else{
@@ -28,7 +28,6 @@ Vue.component('map-component', {
loadMapPoi(); loadMapPoi();
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(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 cardNearby" v-for="(dist,index) in nearDists" @click="showDistrict(index)">
<div class="card-header">{{dist.sname}}</div> <div class="card-header">{{dist.sname}}</div>
<div class="card-content"> <div class="card-content">
<div class="card-content-inner">{{dist.avgPrice}}元/㎡</div> <div class="card-content-inner">{{dist.avgPrice?(dist.avgPrice+"元/㎡"):'暂无'}}</div>
</div> </div>
<div class="card-footer">距您{{dist.distance}}m</div> <div class="card-footer">距您{{dist.distance}}m</div>
</div> </div>
@@ -60,7 +60,6 @@ Vue.component('near-dist-component', {
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
}, },
-1
View File
@@ -36,7 +36,6 @@ Vue.component('room-rent-component', {
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
-1
View File
@@ -171,7 +171,6 @@ function loadRentTrends(city, region, name){
$("#tabRentDiv").addClass("dn"); $("#tabRentDiv").addClass("dn");
} }
}).catch(function (error) { }).catch(function (error) {
alert(error)
console.log(error); console.log(error);
}); });
} }
+68 -38
View File
@@ -70,8 +70,8 @@
<div class="item-title"><i class="icon icon-address02"></i>{{city}}{{region}}{{address}}</div> <div class="item-title"><i class="icon icon-address02"></i>{{city}}{{region}}{{address}}</div>
<div class="item-after"> <div class="item-after">
<a class="button theme collection collection01">关注</a> <a class="button theme collection collection01" onclick="doAddCollect()">关注</a>
<a class="button collection collection02 dn">取消关注</a> <a class="button collection collection02 dn" onclick="removeCollect()">取消关注</a>
</div> </div>
</div> </div>
<div class="item-subtitle"> <div class="item-subtitle">
@@ -114,17 +114,17 @@
<div class="topicContent" style="padding:0;"> <div class="topicContent" style="padding:0;">
<div class="content-block content-block01 content-block01a"> <div class="content-block content-block01 content-block01a">
<div class="buttons-row theme" id="trendTabDiv"> <div class="buttons-row theme" id="trendTabDiv">
<a href="#tabChart1" class="tab-link button active" id="tabAvgDiv">均价</a> <a href="#tabChart1" class="tab-link button active" id="tabAvgDiv" @click="showChat(1)">均价</a>
<a href="#tabChart2" class="tab-link button" id="tabRentDiv">租金</a> <a href="#tabChart2" class="tab-link button" id="tabRentDiv" @click="showChat(2)">租金</a>
</div> </div>
</div> </div>
<div class="tabs"> <div class="tabs">
<div id="tabChart1" class="tab tabChart1 active"> <div id="tabChart1" class="tab tabChart1 active">
<div class="content-block content-block01a" style="margin:0;padding-left:0;padding-right:0;"> <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"> <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="6" class="tab-link button active" onclick="showTrends(6)">半年</a>
<a t-v="12" class="tab-link button">一年</a> <a t-v="12" class="tab-link button" onclick="showTrends(12)">一年</a>
<a t-v="36" class="tab-link button">三年</a> <a t-v="36" class="tab-link button" onclick="showTrends(36)">三年</a>
</div> </div>
<div class="chart" id="chart01" style="height:360px;"></div> <div class="chart" id="chart01" style="height:360px;"></div>
</div> </div>
@@ -132,8 +132,8 @@
<div id="tabChart2" class="tab tabChart2" style="display: block;"> <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="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"> <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="2" id="trendDivTab2" class="tab-link button active" onclick="showLoadRentTrends(2)">半年</a>
<a t-v="3" class="tab-link button">一年</a> <a t-v="3" id="trendDivTab3" class="tab-link button" onclick="showLoadRentTrends(3)">一年</a>
</div> </div>
<div class="chart" id="chart02" style="margin-top:0.75rem;"></div> <div class="chart" id="chart02" style="margin-top:0.75rem;"></div>
</div> </div>
@@ -165,7 +165,7 @@
</div> </div>
<div class="topic" id="mapDiv"> <div class="topic dn" id="mapDiv">
<div class="topicTitle">位置及周边</div> <div class="topicTitle">位置及周边</div>
<div class="topicContent" style="padding:0;"> <div class="topicContent" style="padding:0;">
<div class="content-block content-block01 content-block01a" id="aroundLink"> <div class="content-block content-block01 content-block01a" id="aroundLink">
@@ -238,8 +238,8 @@ $.config = {router: false}
<script> <script>
var city = "上海" var city = "上海"
var region = "长宁" var region = "嘉定"
var name = "新泾三村" var name = "世盟壹天地"
//var lat = 31.292437 //var lat = 31.292437
//var lng = 121.48703 //var lng = 121.48703
@@ -270,37 +270,48 @@ function onPlusReady() {
name = self.name; name = self.name;
// 创建根实例 // 创建根实例
baseInfo = new Vue({ baseInfo = new Vue({
el: '#districtBaseInfo', el: '#districtBaseInfo',
data: { data: {
name : "", name : "",
city:"", city:"",
region: "", region: "",
address: "", address: "",
avgPrice:"", avgPrice:"",
oneMonthUpDownRange:"", oneMonthUpDownRange:"",
priceRate:"", priceRate:"",
cityPrice:"", cityPrice:"",
finishBuildingDate:"", finishBuildingDate:"",
householdCount:"", householdCount:"",
cubagePercent:"", cubagePercent:"",
carSiteCount:"", carSiteCount:"",
virescencePercent:"", virescencePercent:"",
estateCharge:"", estateCharge:"",
moreArea:"", moreArea:"",
developer:"", developer:"",
estateCompany:"", estateCompany:"",
tags:[], tags:[],
nearDists:[], nearDists:[],
regionIndex:"", regionIndex:"",
schoolIndex:"" schoolIndex:""
},
methods:{
showChat: function(type){
if(type == 2) {
document.getElementById("tabChart2").style = "z-index:1";
document.getElementById("tabChart1").style = "z-index:-1";
} else {
document.getElementById("tabChart2").style = "z-index:-1";
document.getElementById("tabChart1").style = "z-index:1";
} }
}
}
}) })
/* 小区均价分析 */ /* 小区均价分析 */
loadKLineData(city, region, name); loadKLineData(city, region, name);
/* 小区租金走势 */ /* 小区租金走势 */
loadRentTrends(city, region, name); loadRentTrends(city, region, name,2);
} }
@@ -330,9 +341,26 @@ function onPlusReady() {
regionIndex:"", regionIndex:"",
schoolIndex:"" schoolIndex:""
} },
methods:{
showChat: function(type){
if(type == 2) {
document.getElementById("tabChart2").style = "z-index:1";
document.getElementById("tabChart1").style = "z-index:-1";
} else {
document.getElementById("tabChart2").style = "z-index:-1";
document.getElementById("tabChart1").style = "z-index:1";
}
}
}
})*/ })*/
/* 小区均价分析 */
//loadKLineData(city, region, name);
/* 小区租金走势 */
//loadRentTrends(city, region, name,2);
function openMapWindow(){ function openMapWindow(){
clicked('arround.html',true,false,{},{city:city,region:region,name:name,lat:lat,lng:lng}); clicked('arround.html',true,false,{},{city:city,region:region,name:name,lat:lat,lng:lng});
} }
@@ -358,7 +386,9 @@ var t1 = window.setInterval(loadMap,1000);
function loadMap(){ function loadMap(){
if(lng && lat){ if(lng && lat){
loadMapPoi(); loadMapPoi();
$("#mapDiv").show();
window.clearInterval(t1); window.clearInterval(t1);
} }
} }
@@ -303,13 +303,13 @@ $.config = {router: false}
{ {
text: '出租', text: '出租',
onClick: function() { onClick: function() {
addManagement(hid, houseStatus, "自住"); addManagement(hid, houseStatus, "出租");
} }
}, },
{ {
text: '空置', text: '空置',
onClick: function() { onClick: function() {
addManagement(hid, houseStatus, "自住"); addManagement(hid, houseStatus, "空置");
} }
}, },
{ {
+3 -2
View File
@@ -149,7 +149,7 @@ $.config = {router: false}
var date = new Date(); var date = new Date();
var year = date.getFullYear()+'年'; var year = date.getFullYear()+'年';
var month = date.getMonth()+1+'月'; var month = date.getMonth()+1+'月';
var city = "天津" var city = ""
var cityInfoVue = new Vue({ var cityInfoVue = new Vue({
el: '#cityInfo', el: '#cityInfo',
data: { data: {
@@ -166,11 +166,12 @@ function onPlusReady() {
var self = plus.webview.currentWebview(); var self = plus.webview.currentWebview();
var city = self.city var city = self.city
cityInfoVue.$data.city = city; cityInfoVue.$data.city = city;
loadMyCollectCity(); loadCurCity(city);
loadCityPriceInfo(city) loadCityPriceInfo(city)
loadUpOrDown(city); loadUpOrDown(city);
loadHotDistrict(city) loadHotDistrict(city)
loadCityPricesAndCounts(city) loadCityPricesAndCounts(city)
} }
+10 -11
View File
@@ -239,9 +239,9 @@
<div id="tabChart1" class="tab tabChart1 active"> <div id="tabChart1" class="tab tabChart1 active">
<div class="content-block content-block01a" style="margin:0;padding-left:0;padding-right:0;"> <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"> <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="6" class="tab-link button active" onclick="showTrends(6)">半年</a>
<a t-v="12" class="tab-link button">一年</a> <a t-v="12" class="tab-link button" onclick="showTrends(12)">一年</a>
<a t-v="36" class="tab-link button">三年</a> <a t-v="36" class="tab-link button" onclick="showTrends(36)">三年</a>
</div> </div>
<div class="chart" id="chart01" style="height:360px;"></div> <div class="chart" id="chart01" style="height:360px;"></div>
</div> </div>
@@ -249,12 +249,10 @@
<div id="tabChart2" class="tab tabChart2" style="display: block;"> <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="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"> <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="2" id="trendDivTab2" class="tab-link button active" onclick="showLoadRentTrends(2)">半年</a>
<a t-v="3" class="tab-link button">一年</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 class="chart" id="chart02" style="margin-top:0.75rem;"></div>
</div> </div>
</div> </div>
</div> </div>
@@ -275,7 +273,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="topic"> <div class="topic dn" id="mapDiv">
<div class="topicTitle">位置及周边</div> <div class="topicTitle">位置及周边</div>
<div class="topicContent" style="padding:0;"> <div class="topicContent" style="padding:0;">
<div class="content-block content-block01 content-block01a" id="aroundLink"> <div class="content-block content-block01 content-block01a" id="aroundLink">
@@ -523,8 +521,8 @@ 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){
$.toast(response.data.data); $.toast("修改状态成功!");
//window.location.reload(); plus.webview.getWebviewById('views/user/userInfo.html').reload();
}else{ }else{
$.toast(response.data.message); $.toast(response.data.message);
} }
@@ -547,6 +545,7 @@ var t2 = window.setInterval(loadChart,1000);
function loadMap(){ function loadMap(){
if(lng && lat){ if(lng && lat){
loadMapPoi(); loadMapPoi();
$("#mapDiv").show();
window.clearInterval(t1); window.clearInterval(t1);
} }
} }
+166 -100
View File
@@ -39,14 +39,14 @@
<div class="content" > <div class="content" >
<div class="buttons-tab theme" id="tabCityDiv" > <div class="buttons-tab theme" id="tabCityDiv" >
<a href="#tabQuotation1" class="tab-link active button">全国</a> <a href="#tabQuotation1" class="tab-link active button">全国</a>
<div v-for="o in citys"> <div v-for="mycollectcity in citys" >
<a v-bind:href="o.hrefId" class="tab-link button" @click="clickCity(o.hrefId)">{{o.city}}</a> <a class="tab-link button" @click="clickCity(mycollectcity)" v-bind:vcity="mycollectcity">{{mycollectcity}}</a>
</div> </div>
<a href="#tabQuotation0" class="tab-link button">添加</a> <a href="#tabQuotation0" class="tab-link button">添加</a>
</div> </div>
<div class="tabs"> <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 cardPrice cardPrice01 cardCity" id="countryInfo">
<div class="card-header"> <div class="card-header">
<label>全国</label> <label>全国</label>
@@ -167,92 +167,92 @@
</div> </div>
</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 id="cityInfo" class="dn">
<div class="card-header"> <div class="card cardPrice cardPrice01 cardCity01" v-bind:hrefid="myCityMap.hrefId">
<span>当前参考均价</span> <div class="card-header">
</div> <label>{{myCityMap.city}}</label>
<div class="card-content"> <a v-if="collecd" class="button collection collection02 " @click="collectCity(myCityMap.city)">取消</a>
<div class="card-content-inner" v-if="myCityMap.cityTopMonthAvgPrice > 0">{{myCityMap.cityTopMonthAvgPrice}}<span>元/㎡</span></div> <a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city)">关注</a>
<div class="card-content-inner" v-else>暂无</div>
</div> </div>
<div class="card-footer"> <div class="card-header">
<span v-if="myCityMap.oneMonthUpDownRange >= 0"> <span>当前参考均价</span>
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-red"></i></em> </div>
<label>近30天涨跌幅</label> <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>
<span v-else> <span class="col-50">
<em><strong>{{myCityMap.oneMonthUpDownRange}}</strong>%<i class="icon icon-arrow-green"></i></em> <div class="chart" id="down_chart"></div>
<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> </span>
</div> </div>
</div> </div>
</div>
<div class="topic"> <div class="topic" id="trendChartDiv">
<div class="topicTitle topicTitle02">{{myCityMap.time}}楼市行情<span><a @click="showRegionInfo(myCityMap.city)">区县涨跌详情<i class="icon icon-right"></i></a></span></div> <div class="topicTitle" style="position:relative;">城市均价及挂牌走势
<div class="topicContent" style="padding-top:0;"> <div class="content-block">
<div class="chartBox row"> <div class="buttons-row theme" id="trendDiv">
<span class="col-50"> <a class="tab-link button active" v="2" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 2)">半年</a>
<div class="chart" v-bind:id="myCityMap.numId_up_chart"></div> <a class="tab-link button" v="3" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 3)">一年</a>
</span> <a class="tab-link button" v="5" v-bind:city="myCityMap.city" @click="clickTrend(myCityMap.city, 5)">三年</a>
<span class="col-50">
<div class="chart" v-bind:id="myCityMap.numId_down_chart"></div>
</span>
</div> </div>
</div> </div>
</div> </div>
<div class="topic"> <div class="topicContent" style="padding:0;">
<div class="topicTitle" style="position:relative;">城市均价及挂牌走势 <div class="chart" id="price_chart"></div>
<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> </div>
</div>
<div class="topic"> <div class="topic">
<div class="topicTitle">热门小区</div> <div class="topicTitle">热门小区</div>
<div class="topicContent" style="padding:0;"> <div class="topicContent" style="padding:0;">
<div class="cardNearbyBox cardNearbyBox01"> <div class="cardNearbyBox cardNearbyBox01">
<div class="cardNearbyWin" style="width: 38rem;"> <div class="cardNearbyWin" style="width: 38rem;">
<div class="card cardNearby" v-for="nearDist in myCityMap.nears" @click="showDistrictDetail(index, myCityMap.city)"> <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-header">{{nearDist.sname}}</div>
<div class="card-content"> <div class="card-content">
<div class="card-content-inner">{{nearDist.avgPrice==0?"暂无":nearDist.avgPrice+"元/㎡"}}</div> <div class="card-content-inner" v-if="nearDist.avgPrice">{{nearDist.avgPrice}}元/㎡</div>
</div> <div class="card-content-inner" v-else>暂无</div>
</div> </div>
</div> </div>
</div> </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="../component/cityChooseComponent.js"></script>
<script type="text/javascript" src="../../js/echarts.js" charset="utf-8"></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/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> <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); document.addEventListener('plusready', onPlusReady, false);
function onPlusReady(){ function onPlusReady(){
var city = ""; var city = "";
@@ -1221,11 +1244,12 @@ $.config = {router: false}
city = p.address.city; city = p.address.city;
//region = p.address.district; //region = p.address.district;
if(city && city.endsWith("市")){ if(city && city.endsWith("市")){
city = city.substring(0, city.length-1) positionCity = city.substring(0, city.length-1)
myCollectCitys.push(city);
} }
//lng = p.coords.longitude;//获取到当前位置的经度 //lng = p.coords.longitude;//获取到当前位置的经度
//lat = p.coords.latitude;//获取到当前位置的纬度; //lat = p.coords.latitude;//获取到当前位置的纬度;
loadMyCollectCity(); loadMyCollectCity();
}, function(e){ }, function(e){
}, },
@@ -1265,17 +1289,7 @@ $.config = {router: false}
coordsType:'bd09ll' coordsType:'bd09ll'
} }
); );
/* 关注&已关注切换 */
$(".collection01").on("click", function () {
$(this).hide();
$(this).next().show();
$.toast("已关注");
});
$(".collection02").on("click", function () {
$(this).hide();
$(this).prev().show();
$.toast("取消关注");
});
/* button状态切换 */ /* button状态切换 */
$(".content-block .button").on("click", function () { $(".content-block .button").on("click", function () {
@@ -1379,6 +1393,9 @@ $.config = {router: false}
}); });
}); });
</script> </script>
<script> <script>
@@ -1414,19 +1431,32 @@ $(document).ready(function () {
$("a[href='#tabQuotation1'],a[href='#tabQuotation0']").click(function(){ $("a[href='#tabQuotation1'],a[href='#tabQuotation0']").click(function(){
$("#tabCityDiv a").removeClass("active"); $("#tabCityDiv a").removeClass("active");
$("#contentTabDiv > .tab").removeClass("active"); $("#contentTabDiv > .tab").removeClass("active");
$("#cityInfo").hide()
}) })
function clickCity(val){ function clickCity(val){
city = val;
$("#cityInfo").show()
$("#tabCityDiv a").removeClass("active"); $("#tabCityDiv a").removeClass("active");
$("a[href="+val+"]").addClass("active"); // $("a[href="+val+"]").addClass("active");
$("#contentTabDiv > .tab > div:first-child").each(function(){ // $("#contentTabDiv > .tab > div:first-child").each(function(){
var href = $(this).attr("hrefid") // var href = $(this).attr("hrefid")
if(val == href){ // if(val == href){
$("div[hrefid="+href+"]").parent().addClass("active"); // $("div[hrefid="+href+"]").parent().addClass("active");
}else{ // }else{
$("div[hrefid="+href+"]").parent().removeClass("active"); // $("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"); $("#tabQuotation1").removeClass("active");
$("#tabQuotation0").removeClass("active"); $("#tabQuotation0").removeClass("active");
@@ -1472,18 +1502,25 @@ function markFocus(){
function addFocus(city){ function addFocus(city){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
alert("请先登录")
clicked('/views/user/passLogin.html',true,false,{},{},function(){ clicked('/views/user/passLogin.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
reloadMyFocus()
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)
})
} }
}) })
}else{ }else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
reloadMyFocus() reloadMyFocus()
createData(city, myDatasVue.$data.cityDatas.length); cityDetaiVue.$data.citys.push(city);
}).catch(function(error){ }).catch(function(error){
console.log(error) console.log(error)
}) })
@@ -1492,9 +1529,38 @@ function addFocus(city){
} }
function hotCity(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> </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-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 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><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'>"; htmlContent = htmlContent +"</div><div class='item-subtitle'>";
//对应城市地区小区30天涨跌幅 //对应城市地区小区30天涨跌幅
//动态构建key //动态构建key
+8 -13
View File
@@ -170,15 +170,10 @@ function onPlusReady() {
id = self.newsId; id = self.newsId;
shareId = id shareId = id
shareUrl = shareUrl+id shareUrl = shareUrl+id
$.ajax({
type : 'get', axios.get("/rest/news/detail",{params:{newsId:id}}).then(function(response){
url : BASE_PATH + "/rest/news/detail", if(response.data.code==200){
data:{newsId:id}, data = response.data.data
dataType:'json',
async:false,
success:function(result){
if(result.code==200){
data = result.data
$("#title").text(data.title) $("#title").text(data.title)
$("#title2").text(data.title) $("#title2").text(data.title)
$("#source").text(data.source==null?"":"来源:"+data.source) $("#source").text(data.source==null?"":"来源:"+data.source)
@@ -200,10 +195,10 @@ function onPlusReady() {
//是否收藏 //是否收藏
isCollect(); isCollect();
} }
},
error:function(){ }).catch(function(error){
} console.log(error)
}) });
getPosition(); getPosition();
updateSerivces(); updateSerivces();
} }
+2 -2
View File
@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>小区详情</title> <title>小区租金详情</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1"> <meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="/favicon.ico"> <link rel="shortcut icon" href="/favicon.ico">
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
@@ -104,7 +104,7 @@
</div> </div>
</div> </div>
<div class="topic" id="mapDiv"> <div class="topic dn" id="mapDiv">
<div class="topicTitle">位置及周边</div> <div class="topicTitle">位置及周边</div>
<div class="topicContent" style="padding:0;"> <div class="topicContent" style="padding:0;">
<div class="content-block content-block01 content-block01a" id="aroundLink"> <div class="content-block content-block01 content-block01a" id="aroundLink">
+7 -2
View File
@@ -152,8 +152,14 @@ function onPlusReady() {
edit.leaseEndDate = getNowFormatDate(houseInfo.leaseEndDate); edit.leaseEndDate = getNowFormatDate(houseInfo.leaseEndDate);
edit.lastRentDate = getNowFormatDate(houseInfo.lastRentDate); edit.lastRentDate = getNowFormatDate(houseInfo.lastRentDate);
edit.nowDay = getNowFormatDate(response.data.data.nowDay); edit.nowDay = getNowFormatDate(response.data.data.nowDay);
edit.rent = houseInfo.rent; if(houseInfo.rent==0){
edit.rent = "";
}else{
edit.rent = houseInfo.rent;
}
edit.cycle = response.data.data.cycle; edit.cycle = response.data.data.cycle;
}else{
edit.cycle = "1 月 /次";
} }
/* 选择-起租日期 */ /* 选择-起租日期 */
@@ -205,7 +211,6 @@ function onPlusReady() {
console.log(error) console.log(error)
}); });
//var id="165878889770385408"
/* 编辑状态-确定 */ /* 编辑状态-确定 */
$(document).on('click','#confirm_btn', function () { $(document).on('click','#confirm_btn', function () {
+4 -2
View File
@@ -29,7 +29,7 @@
<div class="content" id="app"> <div class="content" id="app">
<div class="list-block media-list"> <div class="list-block media-list">
<ul> <ul>
<li> <li v-show="showPass">
<a onclick="clicked('/views/user/updatePass.html',true);" class="item-link item-content"> <a onclick="clicked('/views/user/updatePass.html',true);" class="item-link item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-title-row"> <div class="item-title-row">
@@ -87,12 +87,14 @@ new Vue({
el: '#app', el: '#app',
data: { data: {
showLogin:false, showLogin:false,
showLogout:false showLogout:false,
showPass:false
}, },
mounted() { mounted() {
if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") { if (localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == "") {
this.showLogin = true; this.showLogin = true;
} else { } else {
this.showPass = true;
this.showLogout = true; this.showLogout = true;
} }
} }
+5
View File
@@ -115,6 +115,11 @@ new Vue({
$.toast("请输入密码"); $.toast("请输入密码");
return; return;
} }
var reg = /^[a-zA-Z0-9]{1,}$/;
if (!reg.test(this.pass)){
$.toast("请输入6位以上数字或字母");
return;
}
if (this.pass.length < 7) { if (this.pass.length < 7) {
$.toast("请输入6位以上数字或字母"); $.toast("请输入6位以上数字或字母");
return; return;
+1
View File
@@ -291,6 +291,7 @@ function gotoLogin(){
clicked('/views/user/codeSms.html',true,false,{},{},function(){ clicked('/views/user/codeSms.html',true,false,{},{},function(){
plus.webview.getWebviewById('views/house/houseManageList.html').reload(); plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('yfindex.html').reload(); plus.webview.getWebviewById('yfindex.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
checkIsLogin(); 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/jquery.cookie.js?version=${version!}' charset='utf-8'></script>
<script type="text/javascript" src="js/updateVersion/updateVersion.js" charset='utf-8'></script> <script type="text/javascript" src="js/updateVersion/updateVersion.js" charset='utf-8'></script>
<script> <script>
function openHangQing(city){
clicked('views/house/cityDetail.html',true,false,{},{city:city},function(){
})
}
String.prototype.endWith = function(str) { String.prototype.endWith = function(str) {
var reg = new RegExp(str + "$"); var reg = new RegExp(str + "$");
return reg.test(this); return reg.test(this);
@@ -1768,7 +1773,7 @@ function addItems(number, lastIndex) {
'<div class="card-footer"><span>'+dataObj[i].introduction+'</span></div></div>'; '<div class="card-footer"><span>'+dataObj[i].introduction+'</span></div></div>';
} }
if(dataObj[i].type=="推荐城市"){ 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>'; '<div class="card-header">推荐城市——'+dataObj[i].recommendCity+'</div>';
if(dataObj[i].recommendCityTags != "" && dataObj[i].recommendCityTags != null){ if(dataObj[i].recommendCityTags != "" && dataObj[i].recommendCityTags != null){
var arry = dataObj[i].recommendCityTags.split("_"); var arry = dataObj[i].recommendCityTags.split("_");