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-17 16:48:35 +08:00
25 changed files with 500 additions and 384 deletions
@@ -27,8 +27,8 @@ Vue.component('city_increase_ranking',{
'<em class="up">{{!ci.oneMonthUpDownRange||ci.oneMonthUpDownRange==""?"暂无":Math.abs(100*ci.oneMonthUpDownRange).toFixed(2)+"%"}}<i class="icon" v-bind:class="[ci.oneMonthUpDownRange>0?&quot;icon-arrow-red&quot;:&quot;&quot;,ci.oneMonthUpDownRange<0?&quot;icon-arrow-green&quot;:&quot;&quot;]"></i></em>'+
'</div>'+
'<div class="col-20">'+
'<i class="button theme collection collection01" v-bind:class="{dn:ci.follow}" v-on:click="follow(ci.city,$event, 0)">关注</i>'+
'<i class="button collection collection02" v-bind:class="{dn:!ci.follow}" v-on:click="abolish(ci.city,$event, 1)">取消</i>'+
'<i class="button theme collection collection01 confirm-ok" v-bind:class="{dn:ci.follow}" v-on:click="follow(ci.city,$event, 0)" >关注</i>'+
'<i class="button collection collection02 confirm-ok" v-bind:class="{dn:!ci.follow}" v-on:click="abolish(ci.city,$event, 1)">取消</i>'+
'</div>'+
'</div>'+
'</div>'+
@@ -48,53 +48,39 @@ Vue.component('city_increase_ranking',{
})
},
follow:function(city,event, type){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
clicked('/views/user/passLogin.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
reloadMyFocus()
reloadCityPotentialRanking()
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
}
//cityDetaiVue.$data.citys.push(city);
}).catch(function(error){
console.log(error)
})
}
})
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
reloadMyFocus()
reloadCityPotentialRanking()
if(type == 0){
var curDatas = cityDetaiVue.$data.citys
if(curDatas && curDatas.length>0){
if(!IsInArray(curDatas, city)){
cityDetaiVue.$data.citys.push(city);
$.confirm('您确定要关注'+city+"?", function () {
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
reloadMyFocus()
reloadCityPotentialRanking()
if(type == 0){
var curDatas = cityDetaiVue.$data.citys
if(curDatas && curDatas.length>0){
if(!IsInArray(curDatas, city)){
cityDetaiVue.$data.citys.push(city);
}
}
}
}
}
}).catch(function(error){
console.log(error)
})
}).catch(function(error){
console.log(error)
})
});
}
},
@@ -108,23 +94,26 @@ Vue.component('city_increase_ranking',{
}
})
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
reloadMyFocus();
reloadCityPotentialRanking()
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
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;
}
}
}).catch(function(error){
console.log(error)
})
$.confirm("您确定要取消关注?", function () {
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
reloadMyFocus();
reloadCityPotentialRanking()
//plus.webview.getWebviewById('views/user/userInfo.html').reload()
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;
}
}
}).catch(function(error){
console.log(error)
})
});
}
}
@@ -71,24 +71,26 @@ Vue.component('city_potential_ranking',{
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(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()
reloadCityIncreaseRanking()
//cityDetaiVue.$data.citys.push(city);
}
}).catch(function(error){
console.log(error)
})
$.confirm('您确定要关注'+city+"?", function () {
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
}else{
$(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()
reloadCityIncreaseRanking()
//cityDetaiVue.$data.citys.push(city);
}
}).catch(function(error){
console.log(error)
})
});
}
})
}else{
+2 -2
View File
@@ -118,7 +118,7 @@
</div>
</div>
</div>
<div class="chart" id="chart01" style="height:320px;margin-top:-2.75rem;"></div>
<div class="chart" id="chart01" style="height:270px;"></div>
<div class="topicTitle topicTitle01" style="position:relative;border-top:solid 1px #e7e7e7;">租金
<div class="content-block">
<div class="buttons-row theme" id="trendDiv2">
@@ -149,7 +149,7 @@
</div>
<div id="baseInfo" class="list-block">
<div id="baseInfo" class="list-block mb05">
<base-info-component></base-info-component>
</div>
@@ -15,10 +15,8 @@
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=0a7eM0lkIvpKGPiq1bMCfeH7"></script>
<style>
.list-block ul:before{height:0;}
.priceRecovery + .list-block ul:after{height:0;}
.theme {
background-color: #F18D00;
}
</style>
</head>
@@ -27,14 +25,14 @@
<div class="page-group">
<div class="page page-current">
<header class="bar bar-nav">
<header class="bar bar-nav barBorder">
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
<span class="icon icon-left"></span>
</button>
<h1 class="title">评估报告</h1>
</header>
<div class="content">
<div class="list-block media-list" id="house_info">
<div class="list-block media-list" id="house_info" v-cloak>
<ul>
<li>
<div class="item-content">
@@ -51,7 +49,7 @@
</li>
</ul>
</div>
<div class="card cardPrice cardPrice01" id="house_price">
<div class="card cardPrice cardPrice01" id="house_price" v-cloak>
<div class="card-header">
<span>评估总价</span>
<span>均价:<em>{{avg_price}}</em></span>
@@ -89,7 +87,7 @@
<div class="col-50"><a class="button" v-on:click="feedback(0,$event)">低了</a></div>
</div>
</div>
<div class="list-block media-list">
<div class="list-block media-list mb05">
<ul>
<li>
<div class="item-content">
+22 -3
View File
@@ -1267,7 +1267,23 @@ function onPlusReady(){
$("#input_city").val("上海");
$(".nowCity").text("上海");
}
getRequestId();
}
// 生成请求ID,防止重复提交
var requestId = "";
function getRequestId() {
axios.get("/rest/index/id")
.then(function (response) {
if(response.data.status){
requestId = response.data.data;
}
})
.catch(function (error) {
console.log(error);
});
}
/* 弹出城市选择页面 */
$(document).on("click",".open-about01", function () {
$.popup(".popup-about01");
@@ -1828,7 +1844,7 @@ function checkIsLogin(){
function addEvaluation(){
var data={};
if(type==0){
data={cityDisplay: $("#input_city").val(),
data={id:requestId,cityDisplay: $("#input_city").val(),
region:$("input[name=region]").val(),
district:$("#input_address").val(),
address:$("input[name=address]").val(),
@@ -1844,7 +1860,7 @@ function addEvaluation(){
lastRentDate:$("#input_time03").val(),
houseStatus:0}
}else{
data={cityDisplay: $("#input_city").val(),
data={id:requestId,cityDisplay: $("#input_city").val(),
region:$("input[name=region]").val(),
district:$("#input_address").val(),
address:$("input[name=address]").val(),
@@ -1863,7 +1879,9 @@ function addEvaluation(){
var id = response.data.data.id;
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id})
clicked('/views/evaluate/evaluateReport.html',true,false,{},{hid:id},function(){
getRequestId();
})
}else{
$("#evaluation_btn").removeAttr("disabled");
$.toast(response.data.message);
@@ -1874,6 +1892,7 @@ function addEvaluation(){
});
}
/* 信息输入弹窗 */
$(document).on('click','.open-modal', function () {
$.modal({
+13 -17
View File
@@ -28,24 +28,24 @@
<div class="page-group">
<div class="page page-current">
<header class="bar bar-nav barBorder ">
<header class="bar bar-nav barBorder">
<button class="button button-link button-nav pull-left" onclick="back(),plus.nativeUI.closeWaiting();">
<span class="icon icon-left"></span>
</button>
</header>
<div class="content" id="cityInfo" v-cloak>
<div class="card cardPrice cardPrice01 cardCity01" v-bind:hrefid="myCityMap.hrefId">
<div class="card cardPrice cardPrice01 cardCity01 dn" id="priceDiv" v-bind:hrefid="myCityMap.hrefId">
<div class="card-header">
<label>{{myCityMap.city}}</label>
<a v-if="collecd" class="button theme collection collection02 " @click="collectCity(myCityMap.city, 1)">取消关注</a>
<a v-if="collecd" class="button collection collection02" @click="collectCity(myCityMap.city, 1)">取消关注</a>
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city, 0)">关注</a>
</div>
<div class="card-header">
<span>当前参考均价</span>
</div>
<div class="card-content">
<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>
@@ -151,8 +151,14 @@ $.config = {router: false}
var date = new Date();
var year = date.getFullYear()+'年';
var month = date.getMonth()+1+'月';
var city = "神农架"
var cityInfoVue = new Vue({
var city = "普洱"
var cityInfoVue;
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
city = self.city
cityInfoVue = new Vue({
el: '#cityInfo',
data: {
city:"",
@@ -162,12 +168,7 @@ var cityInfoVue = new Vue({
myCityMap : []
}
});
document.addEventListener('plusready', onPlusReady, false);
function onPlusReady() {
var self = plus.webview.currentWebview();
var city = self.city
cityInfoVue.$data.city = city;
cityInfoVue.$data.city = city;
loadCurCity(city);
loadCityPriceInfo(city)
loadUpOrDown(city);
@@ -176,11 +177,6 @@ function onPlusReady() {
}
//loadCurCity(city);
// loadCityPriceInfo(city)
// loadUpOrDown(city);
// loadHotDistrict(city)
// loadCityPricesAndCounts(city)
+17 -25
View File
@@ -228,34 +228,26 @@
</div>
<div class="topic">
<div class="topicTitle">小区走势分析</div>
<div class="topicContent" style="padding:0;">
<div class="content-block content-block01 content-block01a">
<div class="buttons-row theme" id="trendTabDiv">
<a href="#tabChart1" class="tab-link button active" id="tabAvgDiv">均价</a>
<a href="#tabChart2" class="tab-link button" id="tabRentDiv">租金</a>
</div>
</div>
<div class="tabs">
<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" 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>
</div>
<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" 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 class="topicContent" style="padding:0;padding-bottom:0.75rem;">
<div class="topicTitle topicTitle01" style="position:relative;">均价
<div class="content-block">
<div class="buttons-row theme" id="trendDiv1">
<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>
</div>
<div class="chart" id="chart01" style="height:270px;"></div>
<div class="topicTitle topicTitle01" style="position:relative;border-top:solid 1px #e7e7e7;">租金
<div class="content-block">
<div class="buttons-row theme" id="trendDiv2">
<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>
</div>
<div class="chart" id="chart02"></div>
</div>
</div>
<div class="topic" v-show="rentRooms.length>0">
+2 -2
View File
@@ -9,7 +9,7 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
<link rel="stylesheet" href="../../css/sm.css">
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../css/city.css">
<link rel="stylesheet" href="../../css/theme-orange.css">
@@ -172,7 +172,7 @@
<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 theme collection collection02 " @click="collectCity(myCityMap.city, 1)">取消关注</a>
<a v-if="collecd" class="button collection collection02 " @click="collectCity(myCityMap.city, 1)">取消关注</a>
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city, 0)">关注</a>
</div>
+1 -1
View File
@@ -57,7 +57,7 @@
<h1 class="title">我的房产</h1>
</header>
<div class="content infinite-scroll infinite-scroll-bottom" data-distance="50">
<div class="card cardPrice cardPrice01" id="houseInfo">
<div class="card cardPrice cardPrice01" id="houseInfo" v-cloak>
<div class="card-header">
<span>房产总值</span>
<a class="button theme" href="#" onclick="gotoAddHouse()">添加房产</a>
+3 -3
View File
@@ -9,7 +9,7 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
<link rel="stylesheet" href="../../css/sm.css">
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../css/theme-orange.css">
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=0a7eM0lkIvpKGPiq1bMCfeH7"></script>
@@ -153,8 +153,8 @@
</div>
</div>
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js "></script>
<script type="text/javascript" src="../../js/zepto.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/RichMarker_min.js "></script>
<script>
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
+2 -2
View File
@@ -9,7 +9,7 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
<link rel="stylesheet" href="../../css/sm.css">
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../css/city.css">
<link rel="stylesheet" href="../../css/theme-orange.css">
@@ -104,7 +104,7 @@
</div>
</div>
<script type="text/javascript" src="http://g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
<script type="text/javascript" src="../../js/zepto.js" charset="utf-8"></script>
<script>
+16 -13
View File
@@ -12,7 +12,9 @@
<link rel="stylesheet" href="../../css/sm.css">
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../css/theme-orange.css">
<style>
html,body{height:auto;}
</style>
</head>
<body>
@@ -120,18 +122,19 @@ function openView() {
clicked(BASE_PATH + '/user/agreement',true)
}
var originalHeight=document.documentElement.clientHeight || document.body.clientHeight;
window.onresize=function(){
//软键盘弹起与隐藏 都会引起窗口的高度发生变化
var resizeHeight=document.documentElement.clientHeight || document.body.clientHeight;
if(resizeHeight*1<originalHeight*1){ //resizeHeight<originalHeight证明窗口被挤压了
if(window.viewsPage=="codeSms"){
plus.webview.currentWebview().setStyle({
height:originalHeight
});
}
}
}
/* 防止软键盘弹出所引起的定位问题 */
var winHeight = $(window).height(); // 获取当前页面高度
$(window).resize(function(){
var thisHeight = $(this).height();
if(winHeight - thisHeight > 50){
//当软键盘弹出,在这里面操作
$(".loginMode").hide();
}else{
//当软键盘收起,在此处操作
$(".loginMode").show();
}
});
</script>
</body>
+12 -10
View File
@@ -162,17 +162,19 @@ new Vue({
}
});
var originalHeight=document.documentElement.clientHeight || document.body.clientHeight;
window.onresize=function(){
//软键盘弹起与隐藏 都会引起窗口的高度发生变化
var resizeHeight=document.documentElement.clientHeight || document.body.clientHeight;
if(resizeHeight*1<originalHeight*1){ //resizeHeight<originalHeight证明窗口被挤压了
plus.webview.currentWebview().setStyle({
height:originalHeight
});
/* 防止软键盘弹出所引起的定位问题 */
var winHeight = $(window).height(); // 获取当前页面高度
$(window).resize(function(){
var thisHeight = $(this).height();
if(winHeight - thisHeight > 50){
//当软键盘弹出,在这里面操作
$(".loginMode").hide();
}else{
//当软键盘收起,在此处操作
$(".loginMode").show();
}
});
}
}
</script>
</body>
+1 -1
View File
@@ -142,7 +142,7 @@
</div>
</div>
</div>
<div class="buttons-tab fixed-tab theme" data-offset="44" id="tab">
<div class="buttons-tab fixed-tab theme" data-offset="44" id="tab" v-cloak>
<a href="#tabList1" class="tab-link button active">房产({{mh_num}})</a>
<a href="#tabList2" class="tab-link button">关注({{mf_num}})</a>
<a href="#tabList3" class="tab-link button">收藏({{mc_num}})</a>