Merge branch 'YOUFANGAPP1.1' of http://192.168.0.27/dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
+374
-209
@@ -47,9 +47,9 @@
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">城<small class="spacing"> </small>市</div>
|
||||
<div class="item-after">
|
||||
<input type="hidden" name="region">
|
||||
<input type="hidden" name="address">
|
||||
<input name ="cityAddress" type="hidden">
|
||||
<input type="hidden" name="region" id="region">
|
||||
<input type="hidden" name="address" id="address">
|
||||
<input name ="cityAddress" type="hidden" id="cityAddress">
|
||||
<input type="text" id="input_city" class="textAlignLeft open-about01" placeholder="请选择城市" readonly="readonly">
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,7 +120,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content-block">
|
||||
<p><a href="01_index01_myHouse04_evaluationResult.html" class="button button-big button-fill theme" id="evaluation_btn">提交评估</a></p>
|
||||
<p><a id="evaluation_btn" class="button button-big button-fill theme" id="evaluation_btn">提交评估</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1044,7 +1044,7 @@
|
||||
<div class="searchHistory" id="searchHotDiv">热门小区</div>
|
||||
<div id="hotList">
|
||||
<ul>
|
||||
<li v-for="dist in hotDists"><a v-bind:data-name="dist.name" v-bind:data-region="dist.region" v-bind:data-city="dist.city">{{dist.name}}</a></li>
|
||||
<li v-for="(dist,index) in hotDists" @click="openHotDetail(index)"><a class="close-popup" v-bind:data-name="dist.name" v-bind:data-region="dist.region" v-bind:data-city="dist.city" v-bind:data-address="dist.address">{{dist.name}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1081,7 +1081,7 @@
|
||||
<a class="col-5 close-popup"><span class="icon icon-left"></span></a>
|
||||
<div class="search-input col-95">
|
||||
<label class="icon icon-search" for="search"></label>
|
||||
<input type="search" placeholder="搜索楼栋号">
|
||||
<input type="search" id='searchHouseLouDong' placeholder="搜索楼栋号">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1089,28 +1089,15 @@
|
||||
<div class="container">
|
||||
<div class="list-block list-block01 media-list">
|
||||
<ul>
|
||||
<!--
|
||||
<li>
|
||||
<a class="item-link item-content open-about04">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>1栋</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
-->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 加载提示符 -->
|
||||
<!--
|
||||
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
<div style="color:#999;">没有更多数据</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="bar bottom">
|
||||
@@ -1130,7 +1117,7 @@
|
||||
<a class="col-5 close-popup"><span class="icon icon-left"></span></a>
|
||||
<div class="search-input col-95">
|
||||
<label class="icon icon-search" for="search"></label>
|
||||
<input type="search" placeholder="搜索室号">
|
||||
<input type="search" id='searchRoomNum' placeholder="搜索室号">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1138,28 +1125,15 @@
|
||||
<div class="container">
|
||||
<div class="list-block list-block01 media-list">
|
||||
<ul>
|
||||
<!--
|
||||
<li>
|
||||
<a class="item-content close-popup">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title">
|
||||
<font>102室</font>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
-->
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 加载提示符 -->
|
||||
<!--
|
||||
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
<div style="color:#999;">没有更多数据</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="bar bottom">
|
||||
@@ -1183,7 +1157,7 @@ $.config = {router: false}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="../../js/vue.js"></script>
|
||||
<script type="text/javascript" src="../../js/light7.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/light7-2.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/cn.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../js/sm.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="../../config.js"></script>
|
||||
@@ -1192,10 +1166,15 @@ $.config = {router: false}
|
||||
<script type='text/javascript' src='../../js/city-app.js?version=${version!}' charset='utf-8'></script>
|
||||
<script type='text/javascript' src='../../js/searchDistrict-add.js?' charset='utf-8'></script>
|
||||
<script type='text/javascript' src='../../js/common.js' charset='utf-8'></script>
|
||||
<script type='text/javascript' src='../../js/validate.js' charset='utf-8'></script>
|
||||
<script>
|
||||
document.addEventListener('plusready', onPlusReady, false);
|
||||
var houseStatus; //= "186182250936643584";
|
||||
//扩展API加载完毕,现在可以正常调用扩展API
|
||||
function onPlusReady(){
|
||||
/*var self = plus.webview.currentWebview();
|
||||
houseStatus = self.houseStatus;*/
|
||||
houseStatus = 0;
|
||||
var city_map = localStorage.getItem("init_city");
|
||||
if(city_map){
|
||||
$("#input_city").val(city_map)
|
||||
@@ -1229,158 +1208,164 @@ $("body").delegate("#hotList ul li", "click", function () {
|
||||
$.popup(".popup-about02")
|
||||
});
|
||||
/* 选择-房屋类型 */
|
||||
//$("#input_houseType").picker({
|
||||
// toolbarTemplate: '<header class="bar bar-nav bar-nav01">\
|
||||
// <button class="button button-link pull-right close-picker">确定</button>\
|
||||
// <h1 class="title">房屋类型</h1>\
|
||||
// </header>',
|
||||
// cols: [
|
||||
// {
|
||||
// textAlign: "center",
|
||||
// values: ["公寓", "独栋别墅", "双拼别墅", "联排别墅", "叠加别墅"]
|
||||
// }
|
||||
// ]
|
||||
//});
|
||||
$("#input_houseType").picker({
|
||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01">\
|
||||
<button class="button button-link pull-right close-picker">确定</button>\
|
||||
<h1 class="title">房屋类型</h1>\
|
||||
</header>',
|
||||
cols: [
|
||||
{
|
||||
textAlign: "center",
|
||||
values: ["公寓", "独栋别墅", "双拼别墅", "联排别墅", "叠加别墅"]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
var loudongData={};
|
||||
var roomNumData={};
|
||||
var louDongNum='';
|
||||
var louDongHeight='';
|
||||
var louDongFloor='';
|
||||
/* 弹出楼栋号选择页面 */
|
||||
$(document).on("click",".open-about03", function () {
|
||||
loadLouDong();
|
||||
$.popup(".popup-about03");
|
||||
$("#input_number01").val("");
|
||||
$("#input_number02").val("");
|
||||
$("#searchHouseLouDong").val("");
|
||||
search();
|
||||
$("#searchRoomNum").val("");
|
||||
$("input").blur();
|
||||
});
|
||||
|
||||
/* 弹出室号选择页面 */
|
||||
$(document).on("click",".open-about04", function () {
|
||||
$.closeModal(".popup-about03");
|
||||
louDongNum=$(this).find(".item-title font").text().replace("号","");
|
||||
louDongHeight=$(this).find(".item-title input").val();
|
||||
loadRoomNum(louDongNum,louDongHeight);
|
||||
$.popup(".popup-about04");
|
||||
$("input").blur();
|
||||
});
|
||||
|
||||
/* 楼栋号页面底部无限加载事件 */
|
||||
$(function() {
|
||||
// 加载flag
|
||||
var loading = false;
|
||||
// 最多可加载的条目
|
||||
// var maxItems = 100;
|
||||
|
||||
// 每次加载添加多少条目
|
||||
var itemsPerLoad = 20;
|
||||
|
||||
function addItems(number, lastIndex) {
|
||||
// 生成新条目的HTML
|
||||
var html = '';
|
||||
for (var i = lastIndex + 1; i <= lastIndex + number; i++) {
|
||||
html += '<li><a class="item-link item-content open-about04"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + i + '号</font></div></div></div></a></li>';
|
||||
}
|
||||
// 添加新条目
|
||||
$('.popup-about03 .list-block01 ul').append(html);
|
||||
|
||||
}
|
||||
//预先加载20条
|
||||
addItems(itemsPerLoad, 0);
|
||||
|
||||
// 上次加载的序号
|
||||
|
||||
var lastIndex = 20;
|
||||
|
||||
// 注册'infinite'事件处理函数
|
||||
$(document).on('infinite', '.content-block01',function() {
|
||||
|
||||
// 如果正在加载,则退出
|
||||
if (loading) return;
|
||||
|
||||
// 设置flag
|
||||
loading = true;
|
||||
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
loading = false;
|
||||
|
||||
if (lastIndex >= maxItems) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
return;
|
||||
}
|
||||
|
||||
//加载所有的楼栋
|
||||
function loadLouDong(){
|
||||
axios.get("/rest/auto/buildingNumbers", {
|
||||
params: {
|
||||
city: $("#input_city").val(),
|
||||
region:$("input[name=region]").val(),
|
||||
name:$("#input_address").val()
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
if(response.data.data.length>0){
|
||||
var data = response.data.data;
|
||||
var html='';
|
||||
if(data){
|
||||
loudongData={};
|
||||
var val = $("#input_houseType").val();
|
||||
if (val == "公寓" || val == "叠加别墅"){
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
loudongData[data[i].buildingNumber]=data[i].height;
|
||||
html += '<li><a class="item-link item-content open-about04"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + data[i].buildingNumber + '号</font><input type="hidden" value="'+data[i].height+'"></div></div></div></a></li>';
|
||||
}
|
||||
}else{
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
loudongData[data[i].buildingNumber]=data[i].height;
|
||||
html += '<li><a class="item-link item-content open-about04"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + data[i].buildingNumber + '号</font><input type="hidden" value="'+data[i].height+'"></div></div></div></a></li>';
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$("#loudongDiv").addClass("item-inner01");
|
||||
$("#input_building").removeClass("open-about03");
|
||||
$("#input_building").attr("placeholder","请输入楼栋号+室号");
|
||||
}
|
||||
// 添加新条目
|
||||
addItems(itemsPerLoad, lastIndex);
|
||||
// 更新最后加载的序号
|
||||
lastIndex = $('.list-block01 li').length;
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
$.refreshScroller();
|
||||
}, 1000);
|
||||
});
|
||||
/* 获取楼栋号 */
|
||||
$(".popup-about03 ul li").on("click", function () {
|
||||
a=$("#input_number01").val($(this).find(".item-title font").text());
|
||||
$("#input_number02").val(a.val());
|
||||
$("#input_building").val(a.val());
|
||||
});
|
||||
$(".submit").on("click", function () {
|
||||
$("#input_building").val($(this).prev().val());
|
||||
});
|
||||
});
|
||||
|
||||
/* 室号页面底部无限加载事件 */
|
||||
$(function() {
|
||||
// 加载flag
|
||||
var loading = false;
|
||||
// 最多可加载的条目
|
||||
// var maxItems = 100;
|
||||
|
||||
// 每次加载添加多少条目
|
||||
var itemsPerLoad = 20;
|
||||
|
||||
function addItems(number, lastIndex) {
|
||||
// 生成新条目的HTML
|
||||
var html = '';
|
||||
for (var i = lastIndex + 1; i <= lastIndex + number; i++) {
|
||||
html += '<li><a class="item-content close-popup"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + i + '室</font></div></div></div></a></li>';
|
||||
$('.popup-about03 .list-block01 ul').html(html);
|
||||
// 获取楼栋号
|
||||
$(".popup-about03 ul li").on("click", function () {
|
||||
a=$("#input_number01").val($(this).find(".item-title font").text());
|
||||
$("#input_number02").val(a.val());
|
||||
$("#input_building").val(a.val());
|
||||
});
|
||||
$(".submit").on("click", function () {
|
||||
$("#input_building").val($(this).prev().val());
|
||||
$("#input_floor").val("");
|
||||
});
|
||||
$("input").blur();
|
||||
}
|
||||
// 添加新条目
|
||||
$('.popup-about04 .list-block01 ul').append(html);
|
||||
|
||||
}
|
||||
//预先加载20条
|
||||
addItems(itemsPerLoad, 0);
|
||||
|
||||
// 上次加载的序号
|
||||
|
||||
var lastIndex = 20;
|
||||
|
||||
// 注册'infinite'事件处理函数
|
||||
$(document).on('infinite', '.content-block01',function() {
|
||||
|
||||
// 如果正在加载,则退出
|
||||
if (loading) return;
|
||||
|
||||
// 设置flag
|
||||
loading = true;
|
||||
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
loading = false;
|
||||
|
||||
if (lastIndex >= maxItems) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
return;
|
||||
}
|
||||
|
||||
// 添加新条目
|
||||
addItems(itemsPerLoad, lastIndex);
|
||||
// 更新最后加载的序号
|
||||
lastIndex = $('.list-block01 li').length;
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
$.refreshScroller();
|
||||
}, 1000);
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
//加载所有的室号
|
||||
function loadRoomNum(louDongNum,louDongHeight){
|
||||
axios.get("/rest/auto/roomNumbers", {
|
||||
params: {
|
||||
city: $("#input_city").val(),
|
||||
region:$("input[name=region]").val(),
|
||||
name:$("#input_address").val(),
|
||||
buildingNumber:louDongNum
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
if(response.data.data.length>0){
|
||||
var data = response.data.data;
|
||||
var html='';
|
||||
if(data){
|
||||
roomNumData={};
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
roomNumData[data[i].room]=data[i].floor;
|
||||
html += '<li><a class="item-content close-popup"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + data[i].room + '室</font><input type="hidden" value="'+data[i].floor+'"></div></div></div></a></li>';
|
||||
}
|
||||
}else{
|
||||
|
||||
}
|
||||
// 添加新条目
|
||||
$('.popup-about04 .list-block01 ul').html(html);
|
||||
$(".popup-about04 ul li").on("click", function () {
|
||||
|
||||
$("#input_number02").val(louDongNum+'号'+$(this).find(".item-title font").text());
|
||||
louDongFloor=$(this).find(".item-title input").val();
|
||||
|
||||
$("#input_building").val($("#input_number02").val());
|
||||
var floorStr = "";
|
||||
if(parseInt(louDongFloor)>0 && parseInt(louDongFloor)<61){
|
||||
floorStr ="第"+louDongFloor+"层"
|
||||
}
|
||||
if(parseInt(louDongHeight)>0 && parseInt(louDongHeight)<61){
|
||||
floorStr =floorStr+ " 共"+louDongHeight+"层"
|
||||
}
|
||||
if(parseInt(louDongFloor)>parseInt(louDongHeight)){
|
||||
floorStr = "";
|
||||
}
|
||||
$("#input_floor").val(floorStr);
|
||||
var valueStr = floorStr;
|
||||
if(parseInt(louDongHeight)<0 && parseInt(louDongHeight)>61){
|
||||
valueStr =valueStr+ " 共"+louDongFloor+"层"
|
||||
}
|
||||
$("#input_floor").attr("value",valueStr);
|
||||
});
|
||||
$(".submit").on("click", function () {
|
||||
$("#input_building").val($(this).prev().val());
|
||||
$("#input_floor").val("");
|
||||
});
|
||||
$("input").blur();
|
||||
}
|
||||
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
/* 获取室号 */
|
||||
$(".popup-about04 ul li").on("click", function () {
|
||||
$("#input_number02").val(a.val()+$(this).find(".item-title font").text());
|
||||
$("#input_number02").val(a.val()+$(this).find(".item-subtitle font").text());
|
||||
$("#input_building").val($("#input_number02").val());
|
||||
});
|
||||
$(".submit").on("click", function () {
|
||||
@@ -1388,6 +1373,102 @@ $(function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var searchLouDongNum = function(){
|
||||
var searchText = $("#searchHouseLouDong").val();
|
||||
var html="";
|
||||
for(var key in loudongData){
|
||||
if(key.indexOf(searchText) != -1){
|
||||
html += '<li><a class="item-link item-content open-about04"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + key + '号</font><input type="hidden" value='+loudongData[key]+'></div></div></div></a></li>';
|
||||
}
|
||||
}
|
||||
// 添加新条目
|
||||
$('.popup-about03 .list-block01 ul').html(html);
|
||||
$(".popup-about03 ul li").on("click", function () {
|
||||
a=$("#input_number01").val($(this).find(".item-title font").text());
|
||||
$("#input_number02").val(a.val());
|
||||
$("#input_building").val(a.val());
|
||||
});
|
||||
$(".submit").on("click", function () {
|
||||
$("#input_building").val($(this).prev().val());
|
||||
$("#input_floor").val("");
|
||||
});
|
||||
}
|
||||
$("#searchHouseLouDong").bind('input propertychange keyup', function() {
|
||||
searchLouDongNum();
|
||||
});
|
||||
|
||||
$("#searchHouseLouDong").bind('keyup', function() {
|
||||
searchLouDongNum();
|
||||
});
|
||||
|
||||
var searchRoomNum = function(){
|
||||
var searchText = $("#searchRoomNum").val();
|
||||
var html="";
|
||||
for(var key in roomNumData){
|
||||
if(key.indexOf(searchText) != -1){
|
||||
html += '<li><a class="item-content close-popup"><div class="item-inner"><div class="item-title-row"><div class="item-title"><font>' + key + '室</font><input type="hidden" value='+roomNumData[key]+'></div></div></div></a></li>';
|
||||
}
|
||||
}
|
||||
// 添加新条目
|
||||
$('.popup-about04 .list-block01 ul').html(html);
|
||||
$(".popup-about04 ul li").on("click", function () {
|
||||
$("#input_number02").val(louDongNum+'号'+$(this).find(".item-title font").text());
|
||||
louDongFloor=$(this).find(".item-title input").val();
|
||||
$("#input_building").val($("#input_number02").val());
|
||||
var floorStr = "";
|
||||
if(parseInt(louDongFloor)>0 && parseInt(louDongFloor)<61){
|
||||
floorStr ="第"+louDongFloor+"层"
|
||||
}
|
||||
if(parseInt(louDongHeight)>0 && parseInt(louDongHeight)<61){
|
||||
floorStr =floorStr+ " 共"+louDongHeight+"层"
|
||||
}
|
||||
if(parseInt(louDongFloor)>parseInt(louDongHeight)){
|
||||
floorStr = "";
|
||||
}
|
||||
$("#input_floor").val(floorStr);
|
||||
var valueStr = floorStr;
|
||||
if(parseInt(louDongHeight)<0 && parseInt(louDongHeight)>61){
|
||||
valueStr =valueStr+ " 共"+louDongFloor+"层"
|
||||
}
|
||||
$("#input_floor").attr("value",valueStr);
|
||||
});
|
||||
$(".submit").on("click", function () {
|
||||
$("#input_building").val($(this).prev().val());
|
||||
$("#input_floor").val("");
|
||||
});
|
||||
$("input").blur();
|
||||
}
|
||||
$("#searchRoomNum").bind('input propertychange keyup', function() {
|
||||
searchRoomNum();
|
||||
});
|
||||
|
||||
$("#searchRoomNum").bind('keyup', function() {
|
||||
searchRoomNum();
|
||||
});
|
||||
|
||||
//获取所在楼层 1-59层
|
||||
function getfloor(){
|
||||
var data = new Array();
|
||||
data.push("所在楼层");
|
||||
for(var i=1;i<60;i++){
|
||||
data.push('第'+i+'层');
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
//获取总楼层 1-59
|
||||
function getfloorHeight(){
|
||||
var data = new Array();
|
||||
data.push("总楼层");
|
||||
for(var i=1;i<60;i++){
|
||||
data.push('共'+i+'层');
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 选择-楼层 */
|
||||
$("#input_floor").picker({
|
||||
toolbarTemplate: '<header class="bar bar-nav bar-nav01">\
|
||||
@@ -1405,61 +1486,145 @@ $("#input_floor").picker({
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
// 获取所在楼层 1-59层
|
||||
function getfloor(){
|
||||
var data = new Array();
|
||||
data.push("所在楼层");
|
||||
for(var i=1;i<60;i++){
|
||||
data.push("第"+i+"层");
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
// 获取总楼层 59-1
|
||||
function getfloorHeight(){
|
||||
var data = new Array();
|
||||
data.push("总楼层");
|
||||
for(var i=1;i<60;i++){
|
||||
data.push("共"+i+"层");
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
/* 错误提示 */
|
||||
$("#evaluation_btn").on("click", function () {
|
||||
var a = $("#input_city").val();
|
||||
var b = $("#input_address").val();
|
||||
// var c = $("#input_houseType").val();
|
||||
var c = $("#input_houseType").val();
|
||||
var d = $("#input_building").val();
|
||||
var e = $("#input_floor").val();
|
||||
var f = $("#input_area").val();
|
||||
if(a == ""){
|
||||
$.toast("请选择城市");
|
||||
return false;
|
||||
}
|
||||
else if(b == ""){
|
||||
}else if(b == ""){
|
||||
$.toast("请选择房屋地址");
|
||||
return false;
|
||||
}
|
||||
// else if(c == ""){
|
||||
// $.toast("请选择房屋类型");
|
||||
// return false;
|
||||
// }
|
||||
else if(d == ""){
|
||||
}else if(c == ""){
|
||||
$.toast("请选择房屋类型");
|
||||
return false;
|
||||
}else if(d == ""){
|
||||
$.toast("请选择楼栋室号");
|
||||
return false;
|
||||
}
|
||||
else if(e == "" || e.indexOf("所在楼层") != -1 || e.indexOf("总楼层") != -1){
|
||||
$.toast("请选择楼层");
|
||||
return false;
|
||||
}
|
||||
else if(f == ""){
|
||||
}else if(e == ""){
|
||||
$.toast("楼层不能为空!");
|
||||
return false;
|
||||
}else if(e.indexOf("所在楼层")!= -1){
|
||||
$.toast("所在楼层不能为空!");
|
||||
return false;
|
||||
}else if(e.indexOf("总楼层")!= -1){
|
||||
$.toast("总楼层不能为空!");
|
||||
return false;
|
||||
}else if(f == ""){
|
||||
$.toast("请输入房屋面积");
|
||||
return false;
|
||||
}else if(!$("#input_area").isPositiveFloat() || f=='0'){
|
||||
$.toast("请输入正确的面积!")
|
||||
return false
|
||||
}else if(Number(f)<10 || Number(f)>1000){
|
||||
$.toast("面积范围10-1000㎡");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(c && c.indexOf("别墅")>-1){
|
||||
var num = e.replace(/第/g,"").replace(/层/g,"").replace(/共/g,"").split(" ");
|
||||
if(parseInt(num[0])>parseInt(num[1])){
|
||||
$.toast("总楼层选择错误!")
|
||||
return false
|
||||
}
|
||||
}
|
||||
if($("#cityAddress").val() != "" && $("#cityAddress").val() != $("#input_city").val()){
|
||||
$.toast("城市和房屋地址不匹配")
|
||||
return false
|
||||
}
|
||||
axios.get("/rest/index/checkAddress", {
|
||||
params: {
|
||||
city: $("#input_city").val(),
|
||||
region:$("input[name=region]").val(),
|
||||
name:$("#input_address").val(),
|
||||
address:$("input[name=address]").val()
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
if(response.data.data.success){
|
||||
var district = response.data.data
|
||||
$("#input_city").val(district.city)
|
||||
$("input[name='address']").val(district.address)
|
||||
$("input[name='name']").val(district.name)
|
||||
$("input[name='region']").val(district.region)
|
||||
$("#input_city").val(district.city)
|
||||
addEvaluation();
|
||||
}else{
|
||||
// $("#nextBtn").attr("disabled", false)
|
||||
console.log("error");
|
||||
$.toast(result.message)
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function addEvaluation(){
|
||||
axios.get("/rest/index/checkEvalPrice", {
|
||||
params: {
|
||||
cityDisplay: $("#input_city").val(),
|
||||
region:$("input[name=region]").val(),
|
||||
district:$("#input_address").val(),
|
||||
address:$("input[name=address]").val(),
|
||||
estateType:$("#input_houseType").val(),
|
||||
loudongName:$("#input_building").val(),
|
||||
floorName:$("input[name=floorName]").val(),
|
||||
floors:$("#input_floor").val(),
|
||||
area:$("#input_area").val()
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
if(response.data.data!=null && response.data.data.success){
|
||||
alert("添加成功!");
|
||||
}else{
|
||||
$.toast(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
|
||||
/*$.ajax({
|
||||
url:"${basePath}/fsh/checkEvalPrice",
|
||||
dataType:'json',
|
||||
data:$("form").serialize(),
|
||||
success:function (data) {
|
||||
console.log()
|
||||
var str = "/house/add?city="+$("#input_city").val()+"®ion="+$("input[name=region]").val()+"&name="+$("#input_address").val()+"&address="+$("input[name=address]").val()+"&estateType="+$("#input_houseType").val()+"&building="+$("#input_building").val()+"&floors="+$("#input_floor").val()+"&area="+$("#input_area").val();
|
||||
if(data.success){
|
||||
$.showIndicator();
|
||||
window.location.href="${basePath}/house/doEvaluation?id="+data.id+"&backUrl=${backUrl!}";
|
||||
}else{
|
||||
if (data.data == 0){
|
||||
$.toast(data.message);
|
||||
var sstr = "${basePath}/user/smsLogin";
|
||||
console.log(sstr);
|
||||
//window.location.href = sstr;
|
||||
clicked(sstr,true);
|
||||
}
|
||||
if(data.message!=undefined && data.message!=""){
|
||||
$.hidePreloader();
|
||||
$.toast(data.message);
|
||||
}else{
|
||||
$.hidePreloader();
|
||||
$.toast("该地址不支持估价!");
|
||||
}
|
||||
}
|
||||
},
|
||||
error:function () {
|
||||
$.toast("估价失败请重试!")
|
||||
}
|
||||
})*/
|
||||
}
|
||||
|
||||
/* 信息输入弹窗 */
|
||||
$(document).on('click','.open-modal', function () {
|
||||
$.modal({
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user