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

This commit is contained in:
zongzhimin
2018-04-16 19:54:29 +08:00
19 changed files with 169 additions and 105 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)">关注</i>'+
'<i class="button collection collection02" v-bind:class="{dn:!ci.follow}" v-on:click="abolish(ci.city,$event)">取消</i>'+
'<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>'+
'</div>'+
'</div>'+
'</div>'+
@@ -47,12 +47,12 @@ Vue.component('city_increase_ranking',{
console.log(error)
})
},
follow:function(city,event){
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}}).then(function(response){
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
@@ -73,7 +73,7 @@ Vue.component('city_increase_ranking',{
}
})
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
@@ -91,7 +91,7 @@ Vue.component('city_increase_ranking',{
}
},
abolish:function(city,event){
abolish: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") == ""){
@@ -101,7 +101,7 @@ Vue.component('city_increase_ranking',{
}
})
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
reloadMyFocus();
@@ -33,8 +33,8 @@ Vue.component('city_potential_ranking',{
'</span>'+
'</div>'+
'<div class="col-20">'+
'<i class="button theme collection collection01" v-bind:class="{dn:cp.follow}" v-on:click="follow(cp.city,$event)">关注</i>'+
'<i class="button collection collection02" v-bind:class="{dn:!cp.follow}" v-on:click="abolish(cp.city,$event)">取消</i>'+
'<i class="button theme collection collection01" v-bind:class="{dn:cp.follow}" v-on:click="follow(cp.city,$event,0)">关注</i>'+
'<i class="button collection collection02" v-bind:class="{dn:!cp.follow}" v-on:click="abolish(cp.city,$event,1)">取消</i>'+
'</div>'+
'</div>'+
'</div>'+
@@ -65,13 +65,13 @@ Vue.component('city_potential_ranking',{
console.log(error)
})
},
follow:function(city,event){
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") == ""){
alert("rrrr")
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
@@ -92,7 +92,7 @@ Vue.component('city_potential_ranking',{
}
})
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
var msg = response.data.message;
if(msg != "取消关注成功" && msg != "关注成功"){
$.toast(msg);
@@ -110,8 +110,8 @@ Vue.component('city_potential_ranking',{
}
},
abolish:function(city,event){
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
abolish:function(city,event,type){
axios.get("/rest/quotations/collectCity",{params:{city:city, type:type}}).then(function(response){
$(event.target).parent().children().removeClass("dn");
$(event.target).addClass("dn");
reloadMyFocus()
@@ -75,6 +75,7 @@ function reloadMyFocus(){
$("#myFocusFirstPage").hide();
$("#myFocus").hide();
}else{
myFocusDatas.myFocusList = response.data.data;
}
}).catch(function(error){
@@ -13,7 +13,8 @@
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet" href="../../css/theme-orange.css">
<style type="text/css">
.page > header.bar {background: #F18D00;}
.list-block{border-bottom:solid 0.5rem #f3f3f3;}
.list-block ul:after{height:0;}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=9E99D3540e4dafb7894f7b9fe27fa6b5"></script>
</head>
@@ -22,7 +23,7 @@
<div class="page-group">
<div class="page page-current">
<header class="bar bar-nav theme">
<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>
+1 -2
View File
@@ -27,7 +27,6 @@
line-height: 24px;
background: url(../../images/dw.png) no-repeat;
}
.page > header.bar {background: #F18D00;}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=9E99D3540e4dafb7894f7b9fe27fa6b5"></script>
</head>
@@ -36,7 +35,7 @@
<div class="page-group">
<div class="page page-current">
<header class="bar bar-nav theme">
<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>
+3 -32
View File
@@ -43,7 +43,7 @@
<body>
<div class="page-group">
<div class="page page-current" id="districtBaseInfo">
<div class="page page-current" id="districtBaseInfo" v-cloak>
<div class="loadingBg">
<div class="infinite-scroll-preloader">
@@ -128,35 +128,6 @@
</div>
</div>
<div class="chart" id="chart02"></div>
<!--<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" @click="showChat(1)">均价</a>
<a href="#tabChart2" class="tab-link button" id="tabRentDiv" @click="showChat(2)">租金</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>
</div>
</div>-->
</div>
</div>
<!--<div class="card cardPrice cardPrice02" style="border-bottom:solid 0.5rem #f3f3f3;">
@@ -256,8 +227,8 @@ $.config = {router: false}
<script>
var city = "上海"
var region = "长宁"
var name = "新泾三村"
var region = "黄浦"
var name = "花园公寓 "
//var lat = 31.292437
//var lng = 121.48703
+30 -2
View File
@@ -197,7 +197,7 @@
</ul>
</div>
<div class="content-block">
<p><a id="evaluation_btn" class="button button-big button-fill theme" id="evaluation_btn">提交评估</a></p>
<p><button id="evaluation_btn" class="button button-big button-fill theme" id="evaluation_btn" style="width:100%">提交评估</button></p>
</div>
</div>
</div>
@@ -1652,6 +1652,7 @@ $("#input_status").click(function(e){
/* 错误提示 */
$("#evaluation_btn").on("click", function () {
$("#evaluation_btn").attr("disabled","disabled");
var a = $("#input_city").val();
var b = $("#input_address").val();
var c = $("#input_houseType").val();
@@ -1660,84 +1661,105 @@ $("#evaluation_btn").on("click", function () {
var f = $("#input_area").val();
if(a == ""){
$("#evaluation_btn").removeAttr("disabled");
$.toast("请选择城市");
return false;
}else if(b == ""){
$("#evaluation_btn").removeAttr("disabled");
$.toast("请选择房屋地址");
return false;
}else if(c == ""){
$("#evaluation_btn").removeAttr("disabled");
$.toast("请选择房屋类型");
return false;
}else if(d == ""){
$("#evaluation_btn").removeAttr("disabled");
$.toast("请选择楼栋室号");
return false;
}else if(e == ""){
$("#evaluation_btn").removeAttr("disabled");
$.toast("楼层不能为空!");
return false;
}else if(e.indexOf("所在楼层")!= -1){
$("#evaluation_btn").removeAttr("disabled");
$.toast("所在楼层不能为空!");
return false;
}else if(e.indexOf("总楼层")!= -1){
$("#evaluation_btn").removeAttr("disabled");
$.toast("总楼层不能为空!");
return false;
}else if(f == ""){
$("#evaluation_btn").removeAttr("disabled");
$.toast("请输入房屋面积");
return false;
}else if(!$("#input_area").isPositiveFloat() || f=='0'){
$("#evaluation_btn").removeAttr("disabled");
$.toast("请输入正确的面积!")
return false
}else if(Number(f)<10 || Number(f)>1000){
$("#evaluation_btn").removeAttr("disabled");
$.toast("面积范围10-1000㎡");
return false;
}
if(type==0){
if($("#input_status").val()=='出租'){
if($("#input_time01").isBlank()){
$("#evaluation_btn").removeAttr("disabled");
$.toast("请选择起租日期")
return false;
}
if($("#input_time02").isBlank()){
$("#evaluation_btn").removeAttr("disabled");
$.toast("请选择到期日期")
return false;
}
if($("#input_time01").val()>$("#input_time02").val()){
$("#evaluation_btn").removeAttr("disabled");
$.toast("到期日期必须晚于起租日期");
return false;
}
var nowDay = new Date().format("yyyy-MM-dd");
if($("#input_time02").val()<nowDay){
$("#evaluation_btn").removeAttr("disabled");
$.toast("到期日期不能早于今天");
return false;
}
var g = $("#input_rent").val();
if($("#input_rent").isBlank()){
$("#evaluation_btn").removeAttr("disabled");
$.toast("请输入每期租金")
return false;
}
if(Number(g)<100 || Number(g)>200000){
$("#evaluation_btn").removeAttr("disabled");
$.toast("租金范围100-200000元");
return false;
}
if(!$("#input_rent").isPositiveInteger()){
$("#evaluation_btn").removeAttr("disabled");
$.toast("每期租金必须是整数")
return false;
}
if($("#input_cycle").isBlank()){
$("#evaluation_btn").removeAttr("disabled");
$.toast("收租周期不能为空")
return false;
}
if($("#input_time03").isBlank()){
$("#evaluation_btn").removeAttr("disabled");
$.toast("下次收租日期不能为空")
return false;
}
if($("#input_time03").val()>$("#input_time02").val()){
$("#evaluation_btn").removeAttr("disabled");
$.toast("收租日期不能晚于到期日期");
return false;
}
if($("#input_time03").val()<i){
$("#evaluation_btn").removeAttr("disabled");
$.toast("下次收租日期不能早于今天");
return false;
}
@@ -1746,15 +1768,18 @@ $("#evaluation_btn").on("click", function () {
if(c && c.indexOf("别墅")<0){
var num = e.replace(/第/g,"").replace(/层/g,"").replace(/共/g,"").split(" ");
if(parseInt(num[0])>parseInt(num[1])){
$("#evaluation_btn").removeAttr("disabled");
$.toast("总楼层选择错误!")
return false
}
}
if($("#cityAddress").val() != "" && $("#cityAddress").val() != $("#input_city").val()){
$("#evaluation_btn").removeAttr("disabled");
$.toast("城市和房屋地址不匹配")
return false
}
axios.get("/rest/index/checkAddress", {
params: {
city: $("#input_city").val(),
@@ -1773,7 +1798,7 @@ $("#evaluation_btn").on("click", function () {
$("#input_city").val(district.city)
checkIsLogin();
}else{
// $("#nextBtn").attr("disabled", false)
$("#evaluation_btn").removeAttr("disabled");
console.log("error");
$.toast(response.data.message)
}
@@ -1787,6 +1812,7 @@ $("#evaluation_btn").on("click", function () {
//var loginFlag=false;
function checkIsLogin(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
$("#evaluation_btn").removeAttr("disabled");
clicked('/views/user/codeSms.html',true,false,{},{},function(){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
@@ -1833,11 +1859,13 @@ function addEvaluation(){
})
.then(function (response) {
if(response.data.data!=null && response.data.data.success){
$("#evaluation_btn").removeAttr("disabled");
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})
}else{
$("#evaluation_btn").removeAttr("disabled");
$.toast(response.data.message);
}
})
+2 -2
View File
@@ -38,8 +38,8 @@
<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)">取消关注</a>
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city)">关注</a>
<a v-if="collecd" class="button theme 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">
+5 -5
View File
@@ -172,8 +172,8 @@
<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)">取消关注</a>
<a v-else class="button theme collection collection01" @click="collectCity(myCityMap.city)">关注</a>
<a v-if="collecd" class="button theme 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">
@@ -243,7 +243,7 @@
<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-if="nearDist.avgPrice > 0">{{nearDist.avgPrice}}元/㎡</div>
<div class="card-content-inner" v-else>暂无</div>
</div>
</div>
@@ -1558,7 +1558,7 @@ function addFocus(city){
if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
axios.get("/rest/quotations/collectCity",{params:{city:city,type:0}}).then(function(response){
reloadMyFocus()
reloadCityIncreaseRanking()
reloadCityPotentialRanking()
@@ -1572,7 +1572,7 @@ function addFocus(city){
}
})
}else{
axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){
axios.get("/rest/quotations/collectCity",{params:{city:city,type:0}}).then(function(response){
if(response.data.status){
reloadMyFocus()
reloadCityIncreaseRanking()
+11 -8
View File
@@ -37,7 +37,7 @@
<body>
<div class="page-group">
<div class="page page-current" id="districtBaseInfo">
<div class="page page-current" id="districtBaseInfo" v-cloak>
<div class="loadingBg">
<div class="infinite-scroll-preloader">
@@ -94,14 +94,16 @@
<div class="topicTitle" style="position:relative;">小区租金走势
<div class="content-block">
<div class="buttons-row theme" id="trendDiv2">
<a t-v="2" class="tab-link button active">半年</a>
<a t-v="3" class="tab-link button">一年</a>
<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="topicContent" style="padding:0;padding-bottom:0.75rem;" id="rentTrendDiv">
<div class="chart" id="chart02" style="margin-top:0.75rem;"></div>
</div>
</div>
<div class="topic dn" id="mapDiv">
@@ -175,8 +177,8 @@ $.config = {router: false}
<script type="text/javascript" src="../../js/log/log_stat.js" ></script>
<script>
var city = "上海"
var region = "闵行"
var name = "卓越维港别墅"
var region = "黄浦"
var name = "花园公寓"
var lat;
var lng;
@@ -210,8 +212,11 @@ function onPlusReady() {
tags:[]
}
})
/* 小区租金走势 */
loadRentTrends(city, region, name,2);
}
//baseInfo = new Vue({
// el: '#districtBaseInfo',
// data: {
@@ -222,10 +227,8 @@ function onPlusReady() {
// tags:[]
// }
// })
//
/* 小区租金走势 */
loadRentTrends(city, region, name);
function openMapWindow(){
clicked('../district/arround.html',true,false,{},{city:city,region:region,name:name,lat:lat,lng:lng});
+1 -1
View File
@@ -23,7 +23,7 @@
<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>
+1 -1
View File
@@ -106,13 +106,13 @@ mui.init({
});
function logout() {
plus.webview.getWebviewById('yfindex.html').reload();
localStorage.removeItem("user_token");
localStorage.removeItem("user_token_add_time");
//退出登录之前loading下个人中心
plus.webview.getWebviewById('views/house/houseManageList.html').reload();
plus.webview.getWebviewById('views/user/userInfo.html').reload();
plus.webview.getWebviewById('views/house/houseDetail.html').reload();
plus.webview.getWebviewById('yfindex.html').reload();
timer.start();
}