diff --git a/fangija-zsyf/images/loan-img02.png b/fangija-zsyf/images/loan-img02.png index cf7c3c7..55310fb 100644 Binary files a/fangija-zsyf/images/loan-img02.png and b/fangija-zsyf/images/loan-img02.png differ diff --git a/fangija-zsyf/js/loan/loanInfo.js b/fangija-zsyf/js/loan/loanInfo.js new file mode 100644 index 0000000..6977a27 --- /dev/null +++ b/fangija-zsyf/js/loan/loanInfo.js @@ -0,0 +1,127 @@ +//短信验证类型 +var APPLY_LOAN = "applyLoan"; + +//如果是抵押贷款时候,需要上层页面传入houseId +var houseId; +var _params = {}; + +document.addEventListener('plusready', onPlusReady, false); + +function onPlusReady(){ + var self = plus.webview.currentWebview(); + houseId= self.houseId; + $('#input_city').val(self.city); + $('#input_phoneNumber').val(self.mobile); +} + +function sendLoanCode(){ + var mobile = $("#input_phoneNumber").val(); + if(checkPhoneNum(mobile)){ + timer.start(); + axios.post(BASE_PATH+"/rest/user/sendMobileCode", {mobile: mobile, type: APPLY_LOAN}) + .then(function (response) { + var data = response.data + if(data.code==200){ + $.toast("短信验证码发送成功,请注意查收!") + }else{ + $.toast("验证码发送失败") + timer.cancel() + } + }) + } +} + +function checkPhoneNum(phone){ + var reg = 11 && /^((13|14|15|17|18)[0-9]{1}\d{8})$/; + if(phone==''){ + $.toast("请输入手机号码"); + return false; + }else if(!reg.test(phone)){ + $.toast("手机格式不正确"); + return false; + }else{ + return true; + } +} + +//验证码倒计时 +timer = { + countdown:60, + start:function(){ + countdown = 60 + $(".sendCode").hide() + $(".waiting").empty().append(countdown + " s").show() + timer.down() + }, + down:function(){ + countdown -- + $(".waiting").empty().append(countdown + " s") + if(countdown <= 0){ + $(".sendCode").show() + $(".waiting").hide() + }else{ + setTimeout(timer.down, 1000) + } + }, + cancel:function(){ + countdown = 0 + } +} + +/* 错误提示 */ +$("#next_btn").on("click", function () { + var city = $("#input_city").val(); + var mobile = $("#input_phoneNumber").val(); + var code = $("#input_codeSms").val(); + //申请金额(万元) + var applyMoney = $("#input_price").val(); + //是否接收抵押(0否 1是 根据选择的贷款类型赋值) + var mortgage = $(".checkbox .current").attr('value'); + + if(city == ""){ + $.toast("请选择城市"); + return false; + } + if(!checkPhoneNum(mobile)){ + return false; + } + if(code == ""){ + $.toast("请输入验证码"); + return false; + } + if(applyMoney == ""){ + $.toast("请输入申请金额"); + return false; + } + if(mortgage == undefined || mortgage == ""){ + $.toast("请选择贷款类型"); + return false; + } + //如果贷款类型是房抵押 + if(mortgage == "1"){ + if(houseId == undefined || houseId == ""){ + $.toast("房抵贷类型获取houseId失败"); + return false; + } + } + if(mortgage == "1"){ + _params = {type: 1, city: city, applyMoney: applyMoney, mortgage: mortgage, hid: houseId, mobile: mobile, smsCode: code}; + }else{ + _params = {type: 1, city: city, applyMoney: applyMoney, mortgage: mortgage, mobile: mobile, smsCode: code}; + } + axios.post(BASE_PATH + "/rest/loan/apply", _params).then(function (response) { + var status = response.data.status; + if(status){ + //页面跳转 + //$.toast(response.data.data); + //直接定位到贷款success页面, 调用back()就只用返回一次 + window.location.href = "../../views/loan/loanSuccess.html"; + }else{ + $.toast(response.data.message); + } + }).catch(function (error) { + console.log(error); + }); + + +}); \ No newline at end of file diff --git a/fangija-zsyf/js/user/myHouse.js b/fangija-zsyf/js/user/myHouse.js index 73d725b..914dfc1 100644 --- a/fangija-zsyf/js/user/myHouse.js +++ b/fangija-zsyf/js/user/myHouse.js @@ -126,7 +126,7 @@ function mhAddItems(itemsPerLoad, lastIndex, dataObj, xqOneMonthUpDownRangeMap, }else{ html += "其他"; } - html += "立即申请"; + html += '立即申请'; } $('#myhouse').append(html); } diff --git a/fangija-zsyf/main.html b/fangija-zsyf/main.html index 8ce27a1..1dc0688 100644 --- a/fangija-zsyf/main.html +++ b/fangija-zsyf/main.html @@ -19,7 +19,7 @@ 首页 - + 行情 @@ -48,11 +48,11 @@ localStorage.removeItem("user_token"); localStorage.removeItem("user_token_add_time"); } - document.getElementById("quotations").setAttribute("href", BASE_PATH + '/quotations/index'); + //document.getElementById("quotations").setAttribute("href", BASE_PATH + '/quotations/index'); //document.getElementById("selfInfo").setAttribute("href", BASE_PATH + '/selfInfo/index'); //mui初始化 mui.init(); - var subpages = ['yfindex.html', BASE_PATH + '/quotations/index', 'views/house/houseManageList.html', 'views/user/userInfo.html']; + var subpages = ['yfindex.html', 'views/house/houseDetail.html', 'views/house/houseManageList.html', 'views/user/userInfo.html']; var subpage_style = { top: '0', bottom: '50px', diff --git a/fangija-zsyf/views/component/cityChooseComponent.js b/fangija-zsyf/views/component/cityChooseComponent.js index adf46a0..ef8b95f 100644 --- a/fangija-zsyf/views/component/cityChooseComponent.js +++ b/fangija-zsyf/views/component/cityChooseComponent.js @@ -3,6 +3,7 @@ //var cityChooseOption = {markFocus:0,clickFocus:0} Vue.component('city_choose',{ + props:['city1'], template: ' '+ ''+ @@ -48,7 +48,6 @@ Vue.component('city_potential_ranking',{ methods:{ loadCityPotentialRanking:function(){ axios.get("/rest/quotations/potentialUpTopInfos").then(function(response){ -// alert(1) list = response.data.data; $(list).each(function(i){ var index = this.index; @@ -66,16 +65,20 @@ Vue.component('city_potential_ranking',{ console.log(error) }) }, - follow:function(city){ - alert(city) + follow:function(city,event){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + loadCityPotentialRanking() }).catch(function(error){ console.log(error) }) }, - abolish:function(city){ - alert(city) + abolish:function(city,event){ axios.get("/rest/quotations/collectCity",{params:{city:city}}).then(function(response){ + $(event.target).parent().children().removeClass("dn"); + $(event.target).addClass("dn"); + loadCityPotentialRanking() }).catch(function(error){ console.log(error) }) diff --git a/fangija-zsyf/views/component/myFocusComponent.js b/fangija-zsyf/views/component/myFocusComponent.js index 0d73287..551a754 100644 --- a/fangija-zsyf/views/component/myFocusComponent.js +++ b/fangija-zsyf/views/component/myFocusComponent.js @@ -1,58 +1,67 @@ var myFocusDatas = {myFocusList: []}; Vue.component('my_focus',{ - template: - '
'+ - '
我的关注
'+ - '
'+ - ''+ - '
'+ - '
' - , - data:function(){ - return myFocusDatas; - }, - methods:{ - loadMyFocus:function(){ - axios.get("/rest/quotations/userCollectCityInfo").then(function(response){ - myFocusDatas.myFocusList = response.data.data; - }).catch(function(error){ - //alert(2) - console.log(error) - }) - } - },mounted:function(){ - this.loadMyFocus(); - } - -}) + template: + '
'+ + '
我的关注
'+ + '
'+ + ''+ + '
'+ + '
' + , + data:function(){ + return myFocusDatas; + }, + methods:{ + loadMyFocus:function(){ + if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ + $("#myFocusFirstPage").hide() + $("#myFocus").hide(); + }else{ + axios.get("/rest/quotations/userCollectCityInfo").then(function(response){ + if(response.data.data.length==0){ + $("#myFocusFirstPage").hide(); + $("#myFocus").hide(); + }else{ + myFocusDatas.myFocusList = response.data.data; + } + }).catch(function(error){ + console.log(error) + }) + } + } + },mounted:function(){ + this.loadMyFocus(); + } + +}) \ No newline at end of file diff --git a/fangija-zsyf/views/evaluate/evaluateReport.html b/fangija-zsyf/views/evaluate/evaluateReport.html index e42ba8f..68849d4 100644 --- a/fangija-zsyf/views/evaluate/evaluateReport.html +++ b/fangija-zsyf/views/evaluate/evaluateReport.html @@ -47,7 +47,7 @@ - 再估一套 + 再估一套 @@ -81,7 +81,7 @@ --> -
+

您的反馈很重要,是我们努力的动力

@@ -142,119 +142,132 @@ $.config = {router: false} diff --git a/fangija-zsyf/views/house/add.html b/fangija-zsyf/views/house/add.html index 5d2191f..4817c7f 100644 --- a/fangija-zsyf/views/house/add.html +++ b/fangija-zsyf/views/house/add.html @@ -1248,8 +1248,8 @@ $.config = {router: false} + diff --git a/fangija-zsyf/views/house/houseList.html b/fangija-zsyf/views/house/houseList.html index 49392a9..da795e6 100644 --- a/fangija-zsyf/views/house/houseList.html +++ b/fangija-zsyf/views/house/houseList.html @@ -168,6 +168,7 @@ $(document).on('infinite', '.infinite-scroll-bottom', function() { }, 1000); }); + //我的收藏查询请求 function selectHouseInfoList(){ axios.get(BASE_PATH + "/rest/index/ourHouseInfoList", @@ -182,6 +183,18 @@ function selectHouseInfoList(){ var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap; var xqPotentialIndexMap = resultsMap.xqPotentialIndexMap; var houseInfoTotalMap = resultsMap.houseInfoTotalMap; + // 上次加载的序号 + lastIndex = $('.list-container li').length; + //登录状态,但没有数据 + if(lastIndex == 0 && resultList.length ==0){ + //控制显示 + $('#page-group-nologin').show(); + $('#page-group-login').hide(); + }else{ + //控制显示 + $('#page-group-nologin').hide(); + $('#page-group-login').show(); + } if(resultList != null && resultList.length == 0){ // 删除加载提示符 $('.infinite-scroll-preloader').remove(); @@ -201,16 +214,8 @@ function selectHouseInfoList(){ for(var i in resultList){ dataObj.push(resultList[i]) } - // 上次加载的序号 - lastIndex = $('.cardInfo').length; //每次加载添加多少条目 itemsPerLoad = resultList.length; - //登录状态,但没有数据 - if(lastIndex == 0 && resultList.length ==0){ - //控制显示 - $('#page-group-nologin').hide(); - $('#page-group-login').show(); - } //请求后对page进行赋值 page = resultsMap.houseInfoPageList.currentPage; pageSize = resultsMap.houseInfoPageList.limit; @@ -228,10 +233,8 @@ function checkIsLogin(){ $('#page-group-login').hide(); $('#page-group-nologin').show(); }else{ - selectHouseInfoList(); //控制显示 - /*$('#page-group-nologin').hide(); - $('#page-group-login').show();*/ + selectHouseInfoList(); } } diff --git a/fangija-zsyf/views/house/houseManageList.html b/fangija-zsyf/views/house/houseManageList.html index 535d092..4f192d4 100644 --- a/fangija-zsyf/views/house/houseManageList.html +++ b/fangija-zsyf/views/house/houseManageList.html @@ -104,16 +104,6 @@ $.config = {router: false} //调用mui.init方法 $.init() -//判断是否登录 -function checkIsLogin(){ - if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ - $('#dataList').hide(); - $('#noData').show(); - }else{ - selectEvaluateList(); - } -} - /* 房产用途 */ $(document).on('click','.open-vertical-modal', function () { //获取对应
  • 栏目存储的houseinfo id @@ -167,7 +157,6 @@ function addManagement(id, houseStatus, liveStatus){ console.log(error); }); } - //查询房产评估列表AJAX请求 function selectEvaluateList(){ //先清空列表 @@ -178,18 +167,17 @@ function selectEvaluateList(){ params: {} }).then(function (response) { var resultsMap = response.data.data; - var results = resultsMap.houseInfoList; - if(resultsMap.houseInfoList.length=0){ + if(response.data.data==null || resultsMap.houseInfoList==null || resultsMap.houseInfoList.length==0){ $('#dataList').hide(); $('#noData').show(); }else{ $('#dataList').show(); $('#noData').hide(); + var results = resultsMap.houseInfoList; var xqOneMonthUpDownRangeMap = resultsMap.xqOneMonthUpDownRangeMap; var cityAvgPriceMap = resultsMap.cityAvgPriceMap; //构造数据列表 htmlContent = constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap, htmlContent); - //动态追加内容 $('.list-block ul').html(htmlContent); //添加loading等待效果 @@ -260,18 +248,20 @@ function constructHtmlContent(results, xqOneMonthUpDownRangeMap, cityAvgPriceMap return htmlContent; } -//界面加载 -$(document).ready(function () { - checkIsLogin(); -}); - function openaddWindow(){ - clicked('/views/house/add.html',true,false,{},{},function(){ - window.location.reload(); - plus.webview.getWebviewById('views/user/userInfo.html').reload(); + clicked('/views/house/add.html',true,false,{},{type:1},function(){ }) } - +//判断是否登录 +function checkIsLogin(){ + if(localStorage.getItem("user_token") == null || localStorage.getItem("user_token") == ""){ + $('#dataList').hide(); + $('#noData').show(); + }else{ + selectEvaluateList(); + } +} +checkIsLogin() diff --git a/fangija-zsyf/views/loan/loanInfo.html b/fangija-zsyf/views/loan/loanInfo.html new file mode 100644 index 0000000..a15ba34 --- /dev/null +++ b/fangija-zsyf/views/loan/loanInfo.html @@ -0,0 +1,1063 @@ + + + + + +贷款申请 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fangija-zsyf/views/loan/loanSuccess.html b/fangija-zsyf/views/loan/loanSuccess.html new file mode 100644 index 0000000..4e7e5d5 --- /dev/null +++ b/fangija-zsyf/views/loan/loanSuccess.html @@ -0,0 +1,68 @@ + + + + + +贷款申请 + + + + + + + + + + + + + + +
    +
    +
    + +

    贷款申请

    +
    +
    +
    + +

    提交成功

    + 我们会在1个工作日内联系您
    请注意接听来电
    +
    +
    +

    返回

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fangija-zsyf/views/setting/about.html b/fangija-zsyf/views/setting/about.html new file mode 100644 index 0000000..c729736 --- /dev/null +++ b/fangija-zsyf/views/setting/about.html @@ -0,0 +1,90 @@ + + + + + +关于我们 + + + + + + + + + + + + + + +
    +
    +
    + +

    关于我们

    +
    +
    + + +
    +

    V1.1
    上海估家网络科技有限公司

    +

    +
    +
    +
    +
    + + + + + + + + +<#include "/monitor/monitor.html"> + + \ No newline at end of file diff --git a/fangija-zsyf/views/setting/setting.html b/fangija-zsyf/views/setting/setting.html new file mode 100644 index 0000000..37377ad --- /dev/null +++ b/fangija-zsyf/views/setting/setting.html @@ -0,0 +1,101 @@ + + + + + +管理设置 + + + + + + + + + + + + + + +
    +
    +
    + +

    管理设置1

    +
    +
    + +
    +

    微信交流群

    + +

    扫码加入

    +

    商务合作QQ:275525147

    +

    退出登录

    +
    +
    +
    +
    + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fangija-zsyf/views/user/userInfo.html b/fangija-zsyf/views/user/userInfo.html index f3b90c4..f66dc9a 100644 --- a/fangija-zsyf/views/user/userInfo.html +++ b/fangija-zsyf/views/user/userInfo.html @@ -41,7 +41,7 @@ - @@ -110,7 +110,7 @@ - @@ -257,6 +257,9 @@ $(".cardInfo01,.cardInfo02").on("click", function(){ //初始化init $.init(); +//定义个人手机号,贷款页面需要传参数 +var _mobile; + var tab = new Vue({ el:"#tab", data:{ @@ -298,6 +301,11 @@ function gotoUpdatePass(){ clicked('/views/user/updatePass.html',true,false,{},{},function(){}) } +//调整房产申请贷款 +function gotoLoanApply(houseId, city){ + clicked('/views/loan/loanInfo.html',true,false,{},{houseId: houseId, city: city, mobile: _mobile},function(){}) +} + //注册'infinite'事件处理函数 $(document).on('infinite', '.infinite-scroll',function() { if($("#tabList1").hasClass("active")){ @@ -382,6 +390,8 @@ function selectUserInfo(){ }).then(function (response) { var result = response.data.data; var mobile = result.mobile; + //加载个人信息时候为该变量赋值 + _mobile = result.mobile; $('#user_mobile').html(mobile.substring(0,3)+'****'+mobile.substring(7)+'
    '); if(result.headImg != null && result.headImg.length > 0){ $('#user_headImg').attr('src', result.headImg);