    <body class="bg">
    	<div id="centre" class="layout">
			<div class="centreInner ">
		<div class="mainInner radius5 "> 
			<div class="loan">
    		<p class="center f24 mt15">1鑫蕴通金融为您提供按揭贷款服务</p>
    		<div class="loan_service mt10">
				<ul class="mt15 loan_intro">
					<li>
						<img src="http://esf.fz.house365.com/zsb/images/v1.0/applicat_img1.png" />
						<span class="f18 ml10">购房按揭</span><span class="f16 text_gray ml10" style="font-size:15px;margin-left:1px;">标准化服务一站式解决按揭贷款问题</span>
					</li>
					<li>
						<img src="http://esf.fz.house365.com/zsb/images/v1.0/applicat_img2.png" />
						<span class="f18 ml10">利率优惠</span><span class="f16 text_gray ml10" style="font-size:15px;margin-left:1px;">南京最低利率，减少融资成本</span>
					</li>
					<li>
						<img src="http://esf.fz.house365.com/zsb/images/v1.0/applicat_img3.png" />
						<span class="f18 ml10">贷款灵活</span><span class="f16 text_gray ml10" style="font-size:15px;margin-left:1px;">还款方式多样化，期限最长30年</span>
					</li>
					<li>
						<img src="http://esf.fz.house365.com/zsb/images/v1.0/applicat_img4.png" />
						<span class="f18 ml10">额度合理</span><span class="f16 text_gray ml10" 
						style="font-size:15px;margin-left:1px;">最高可贷到抵押物的7成
</span>
					</li>
					<li>
						<img src="http://esf.fz.house365.com/zsb/images/v1.0/applicat_img5.png" />
						<span class="f18 ml10">放款快</span><span class="f16 text_gray ml10"
						style="font-size:15px;margin-left:1px;">最快3天就放款
</span>
					</li>
				</ul>
    		</div>

    		<div class="mt15">
				<table class="mt10 loan_tb f14 text_gray" style="word-break: break-all;">
					<thead>
						<tr>
							<td class="loan_tbw280"></td>
							<td class="loan_tbw105 center">最高额度</td>
							<td class="loan_tbw105 center">年利率</td>
							<td class="loan_tbw220 center">放款时间</td>
							<td class="loan_tbw160 center">申请</td>
						</tr>
					</thead>
					<tbody>
					<?php if(!empty($mortgageLoan)){?>
						<tr>
							<td class="loan_tbw280"><img src="<?php echo $mortgageLoan['pic']; ?>" width="90" height="70" /><span class="ml10"><?php if($mortgageLoan['kind']==3){ echo "信用贷款";}elseif($mortgageLoan['kind']==1){ echo "房屋按揭";
							} ?></span></td>
							<td class="loan_tbw105 center"><?php echo $mortgageLoan['maximum']; ?></td>
							<td class="loan_tbw105 center"><?php echo $mortgageLoan['rate']; ?></td>
							<td class="loan_tbw220 center"><?php echo $mortgageLoan['time']; ?></td>
							<td class="loan_tbw160 center"><a href="javascript:;" class="btn_green link_d" id="<?php if($mortgageLoan['kind']==3){ echo 5;}elseif($mortgageLoan['kind']==1){ echo 4;
							} ?>">立即申请</a></td>
						</tr>
						 <?php }?>
						<?php if(!empty($creditLoan)){?>
						<tr>
							<td class="loan_tbw280"><img src="<?php echo $creditLoan['pic']; ?>" width="90" height="70" /><span class="ml10"><?php if($creditLoan['kind']==3){ echo "信用贷款";}elseif($creditLoan['kind']==1){ echo "房屋按揭";
							} ?></span></td>
							<td class="loan_tbw105 center"><?php echo $creditLoan['maximum']; ?></td>
							<td class="loan_tbw105 center"><?php echo $creditLoan['rate']; ?></td>
							<td class="loan_tbw220 center"><?php echo $creditLoan['time']; ?></td>
							<td class="loan_tbw160 center"><a href="javascript:;" class="btn_green link_d" id="<?php if($creditLoan['kind']==3){ echo 5;}elseif($creditLoan['kind']==1){ echo 4;
							} ?>">立即申请</a></td>
						</tr>
                        <?php }?>
					</tbody>
				</table>
    		</div>
			 <input type="hidden"  id="pid" name="type" value="">
  <!--  		<p class="mt15">
    			<span class="f18"></span><span class="ml10 text_blue"></span>
			</p>
			<ul class="mt15 loan_reward">
				<li class="f14"><span class="text_orange"></span><span class="text_lightgray"></span></li>
				<li class="f14"><span class="text_orange"></span></li>
				<li class="f14"><span class="text_orange"></span></li>
			</ul>-->
			<p class="f18 mt15">咨询热线：4008196365 <span class="text_orange">转</span> 600018</p>
    	</div>
		</div>
		</div>
		</div>
    </body>


	<div class="dialog dialog2 dialogDk radius5" id="js_dialogDk">
		<div class="hd">
				<h3 class="h3">365贷款——<span id="loan_title"></span></h3>
				<p title="关闭" class="close close-win">关闭 </p>
		</div>
		
		
		<div class="mod">
				<div class="forms">
                <dl class="list">
                    
                    
                    
                    <dd class="list_item clearfix">
                        <label class="label">贷款人姓名：</label>
                        <div class="fields nameInput">
                            <div class="fgInput jsNameInput jsFgInput">
                                <label class="labelPrev labelPrevN jslabelPrev" for="jsNameInput">请输入姓名</label>
                                <input type="text" id="jsNameInput" class="input_text w180 loan_name">
                            </div>
                        </div>
                    </dd>
                    <!---->

                    
                    <dd class="list_item clearfix">
                        <label class="label">贷款人电话：</label>
                        <div class="fields nameInput ">
                            <div class="fgInput jsNameInput jsFgInput">
                                <label class="labelPrev labelPrevN jslabelPrev" for="jsNameInputTel">请输入电话</label>
                                <input type="text" id="jsNameInputTel" class="input_text w180 loan_telno">
                            </div>
                        </div>
                    </dd>	
										
					<dd class="list_item clearfix">
                        <label class="label">贷款金额：</label>
                        <div class="fields nameInput ">
                            <div class="fgInput jsNameInput jsFgInput">
                                <label class="labelPrev labelPrevN jslabelPrev" for="jsNameInputPirce">请输入贷款金额(单位：万元)</label>
                                <input type="text" id="jsNameInputPirce" class="input_text w180 loan_amount">万元

                            </div>
                        </div>
                    </dd>
										
										
										 <dd class="list_item clearfix">
                        <label class="label">贷款类型：</label>
                        <div class="fields nameInput ">
                            <div class="fgInput jsNameInput jsFgInput">
                              <p class="input_text_dk producttype"></p>
                            </div>
                        </div>
                    </dd>
										
					<dd class="list_item clearfix">
                        <label class="label">经纪人账号：</label>
                        <div class="fields nameInput ">
                            <div class="fgInput jsNameInput jsFgInput">
                                  <p class="input_text_dk"><?=$username?></p>
                            </div>
                        </div>
                    </dd>
										
					<dd class="list_item clearfix" style="display:none;">
                       
                        
                          <div id="js_error_pop_d" style="color:red;padding-left:110px;"></div>
                      
                    </dd>

                    <dd class="list_item clearfix"> <a id="submitBtn" class="btnPopo btnCon radius5" href="javascript:void(0)" >提交</a>
					<!--<a class="btnPopo btnCon radius5" href="javascript:void(0)" style="background:#f9f9f9;" >提交</a>-->
					<a class="btnPopo btnPopo02 btnCon radius5 close-win" href="javascript:void(0)" >取消</a> </dd>
                </dl>
            </div>
		
		</div>

</div>
</body>
</html>
<script>
$(function(){
    $(".link_d").click(function(){       
        var pid = $(this).attr("id");		
		if(pid==5){
			$(".producttype").text("信用贷款");			
			$("#loan_title").text("信用贷款");
		}else if(pid==4){
			$(".producttype").text("房屋按揭");
			$("#loan_title").text("房屋按揭");
		}
        $("#pid").val(pid);
        openWin('js_dialogDk');        
    })
    //贷款金额限制
     $(".loan_amount").on('keyup focusout',function(){        
           var v = $(this).val().replace(/\D/g,'');
           if(v.length>10){              
               v = v.substring(0,10);
           }
           //$(this).val(v);
           $(".loan_amount").val(v);
       })
      //电话限制
     $(".loan_telno").on('keyup focusout',function(){        
           var v = $(this).val().replace(/\D/g,'');
           if(v.length>20){              
               v = v.substring(0,20);
           }
           //$(this).val(v);
           $(".loan_telno").val(v);
       })
               
      //姓名限制//[\u4E00-\u9FA5]
     $(".loan_name").on('keyup focusout',function(){        
            var v = $(this).val().replace(/[^\u4E00-\u9FA5a-zA-Z]/g,'');          
           if(v.length>10){              
               v = v.substring(0,10);
           }
           //$(this).val(v);
           $(".loan_name").val(v);
       })           
 
       $("#submitBtn").click(function(){
		  
           var url = '/my_loan/addLoan/';
           var data = {};           
           data.loan_amount = parseInt($(".loan_amount").val());
           data.loan_telno = parseInt($(".loan_telno").val());
           data.loan_name = encodeURI($(".loan_name").val());
           data.pid = $("#pid").val();         
         // console.log(data);
		   var tel_re = /^1\d{10}$/;
		   if(!tel_re.test($(".loan_telno").val())){
			  $("#js_error_pop_d").text("请填写正确的手机号码后提交！").parent().show();
		      return false;
		   }
           if(!data.loan_amount || !data.loan_telno || !data.loan_name ){
               //openWin("warning3");  
			   $("#js_error_pop_d").text("请填写正确的信息后提交！").parent().show();

               return false;
           } 
            $.post(url,data,function(result){                
                 if(result.result==1) {
					  //openWin("docation_loading");
					  $("#js_dialogDk").hide();
                    // alert('保存成功！');  
					 openWin("warning1");
                 } else {
                     //alert("保存失败,请重新输入！");
					 //openWin("warning2");
					  $("#js_error_pop_d").text("很遗憾，保存失败！").parent().show();
                 }
                 //$(".link_d").hide();
             },'json');
           
           
           return false;
       })
       
       
       
})


</script>


<div style="display:none;" class="dialog dialogW340 radius5"  id="warning1">
		<div class="hd">
				<h3 class="h3">提示</h3>
				<p class="close close-win" title="关闭">关闭 </p>
		</div>
		<div class="mod">
				<div class="textMod textMod003"><img alt="" src="http://esf.fz.house365.com/zsb/images/v1.0/okBg.png"> 保存成功！</div>
				
		</div>
</div>