You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1080 lines
38 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>银行卡快捷支付</title>
<script src="__JS__/jquery-1.11.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/shortcut/reset.css" />
<link rel="stylesheet" type="text/css" href="__CSS__/shortcut/bank_order.css" />
</head>
<body>
<div class="bank_order">
<div class="heard">
<div class="heard_box">
<a onclick="history.back(-1);"></a>
银行卡快捷支付
</div>
</div>
<form id="wfform" name="wfform" method="post" action="{:U('Shortcut/shortcut_pay')}" target="_parent" >
<div class="containner">
<div class="bank_select">
<div class="bank_select_box arrows">
<img src="__IMG__/shortcut/{$bank_info.image}" alt="">
<div class="bank_info">
<div>{$bank_info.bank_info}</div>
<div>尾号{$bank_info.end_num} <span>{$bank_info.card_info}</span> </div>
</div>
</div>
</div>
<div class="bank_text">*请使用本人信息进行支付,支付成功后不可修改</div>
<div class="bank_select_info">
<div class="bank_select_info_box">
<input type="hidden" id="wfddll" name="wfddll" value="wfddll" />
<input type="hidden" name="user_id" id="user_id" value="{$user_id}" />
<input type="hidden" name="game_id" id="game_id" value="{$game_id}" />
<input type="hidden" name="extend" id="extend" value="{$extend}" />
<input type="hidden" name="order_id" id="order_id" value="{$order_id}" />
<input type="hidden" name="user_token" id="user_token" value="{$user_token}" />
<input type="hidden" name="api_ver" id="api_ver" value="2" />
<input type="hidden" name="cardNo" id="cardNo" value="{$cardNo}" />
<input type="hidden" name="payAmount" id="payAmount" value="{$pay_amount}" />
<div class="select_info_content">
<div>姓名:</div>
<input type="text" placeholder="请输入真实姓名" id="custName" name="custName">
</div>
<div class="select_info_content">
<div>身份证号:</div>
<input type="text" placeholder="请输入身份证号" id="idNo" name="idNo">
</div>
<div class="select_info_content">
<div>手机号:</div>
<input type="text" placeholder="请输入手机号" id="phoneNo" name="phoneNo">
</div>
<div class="select_info_price">
<div>支付金额:</div>
<span>{$pay_amount|0}</span>
</div>
</div>
</div>
</div>
<!-- 银行卡弹窗 -->
<div class="bank_mode"></div>
<div class="bank_window">
<div class="win_heard">
<div class="win_heard_box">
<a href="#" class="close"></a>
<div>银行卡名称</div>
<div>单笔限额</div>
<div>单日限额</div>
</div>
</div>
<div class="win_info">
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank1.png" alt="">
<div>工商银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank2.png" alt="">
<div>农业银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank3.png" alt="">
<div>中国银行</div>
</div>
<div>10000</div>
<div>10000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank4.png" alt="">
<div>建设银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank5.png" alt="">
<div>招商银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank6.png" alt="">
<div>交通银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank7.png" alt="">
<div>中信银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank8.png" alt="">
<div>光大银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank9.png" alt="">
<div>兴业银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank10.png" alt="">
<div>邮政银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank11.png" alt="">
<div>平安银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank12.png" alt="">
<div>浦发银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank13.png" alt="">
<div>广发银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank14.png" alt="">
<div>华夏银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank15.png" alt="">
<div>民生银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank16.png" alt="">
<div>北京银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank17.png" alt="">
<div>上海银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank18.png" alt="">
<div>恒丰银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank19.png" alt="">
<div>渤海银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank20.png" alt="">
<div>浙商银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
</div>
</div>
<!-- 支付弹窗 -->
<div class="payment_code">
<div class="payment_code_box">
<div class="payment_code_top">
请输入验证码
<a href="#"></a>
</div>
<div class="payment_money">
<div>支付金额</div>
<div>¥{$pay_amount|0}</div>
</div>
<div class="payment_money_bank">
<img src="__IMG__/shortcut/{$bank_info.image}" alt="">
<div>{$bank_info.bank_info}{$bank_info.card_info}{$bank_info.end_num}</div>
</div>
<div class="payment_input_code">
<div><input id="smsCode" name="smsCode" type="text" placeholder="请输入验证码"> <img src="__IMG__/shortcut/dacha.png" alt=""> </div>
<div id="sms" onclick="getSms()" >获取验证码</div>
</div>
<div class="payment_input_phone">验证码已发送至:<span>18000000000</span></div>
<div class="payment_input_phone_btn">确认</div>
</div>
</div>
</form>
<div class="foot_btn pay_submit" data-url="{:U('Shortcut/yee_step2', array('user_id'=>I('user_id'),'game_id'=>I('game_id'),'user_token'=>I('user_token'),'code'=>1,'extend'=>I('extend'),'api_ver'=>2))}">提交订单</div>
<!-- 错误弹窗 -->
<div class="forbid_model" style="display: none"></div>
<div class="forbid_window" style="display: none">
<div class="forbid_pay">
<img src="__IMG__/shortcut/forbid.png" alt="">
<div>请填写正确的银行卡号</div>
</div>
<div class="forbid_confirm">确认</div>
<div class="forbid_close"><img src="img/close2.png" alt=""></div>
</div>
</div>
<!-- 横屏 -->
<div class="bank_order_heng">
<div class="heard">
<div class="heard_box">
<a href=""></a>
银行卡快捷支付
</div>
</div>
<form id="wfform_heng" name="wfform_heng" method="post" action="{:U('Shortcut/shortcut_pay')}" target="_parent" >
<div class="containner">
<div class="bank_select">
<div class="bank_select_box arrows">
<img src="__IMG__/shortcut/{$bank_info.image}" alt="">
<div class="bank_info">
<div>{$bank_info.bank_info}</div>
<div>尾号{$bank_info.end_num} <span>{$bank_info.card_info}</span> </div>
</div>
</div>
</div>
<div class="bank_text">*请使用本人信息进行支付,支付成功后不可修改</div>
<div class="bank_select_info">
<div class="bank_select_info_box">
<input type="hidden" id="wfddll_heng" name="wfddll" value="wfddll" />
<input type="hidden" name="user_id" id="user_id_heng" value="{$user_id}" />
<input type="hidden" name="game_id" id="game_id_heng" value="{$game_id}" />
<input type="hidden" name="extend" id="extend_heng" value="{$extend}" />
<input type="hidden" name="order_id" id="order_id_heng" value="{$order_id}" />
<input type="hidden" name="user_token" id="user_token_heng" value="{$user_token}" />
<input type="hidden" name="api_ver" id="api_ver_heng" value="2" />
<input type="hidden" name="cardNo" id="cardNo_heng" value="{$cardNo}" />
<input type="hidden" name="payAmount" id="payAmount_heng" value="{$pay_amount}" />
<div class="select_info_content">
<div>姓名:</div>
<input type="text" placeholder="请输入真实姓名" id="custName_heng" name="custName">
</div>
<div class="select_info_content">
<div>身份证号:</div>
<input type="text" placeholder="请输入身份证号" id="idNo_heng" name="idNo">
</div>
<div class="select_info_content">
<div>手机号:</div>
<input type="text" placeholder="请输入手机号" id="phoneNo_heng" name="phoneNo">
</div>
<div class="select_info_price">
<div>支付金额: <span>{$pay_amount|0}</span> </div>
<div class="foot_btn foot_btn_heng" >提交订单</div>
</div>
</div>
</div>
</div>
<!-- 银行卡弹窗 -->
<div class="bank_mode"></div>
<div class="bank_window">
<div class="win_heard">
<div class="win_heard_box">
<a href="#"></a>
<div>银行卡名称</div>
<div>单笔限额</div>
<div>单日限额</div>
</div>
</div>
<div class="win_info">
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank1.png" alt="">
<div>工商银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank2.png" alt="">
<div>农业银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank3.png" alt="">
<div>中国银行</div>
</div>
<div>10000</div>
<div>10000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank4.png" alt="">
<div>建设银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank5.png" alt="">
<div>招商银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank6.png" alt="">
<div>交通银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank7.png" alt="">
<div>中信银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank8.png" alt="">
<div>光大银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank9.png" alt="">
<div>兴业银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank10.png" alt="">
<div>邮政银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank11.png" alt="">
<div>平安银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank12.png" alt="">
<div>浦发银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank13.png" alt="">
<div>广发银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank14.png" alt="">
<div>华夏银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank15.png" alt="">
<div>民生银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank16.png" alt="">
<div>北京银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank17.png" alt="">
<div>上海银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank18.png" alt="">
<div>恒丰银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank19.png" alt="">
<div>渤海银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
<div class="win_info_box">
<div class="win_bank">
<div class="win_bank_img">
<img src="__IMG__/shortcut/bank20.png" alt="">
<div>浙商银行</div>
</div>
<div>5000</div>
<div>5000</div>
</div>
</div>
</div>
</div>
<div class="payment_code" style="display: none">
<div class="payment_code_box">
<div class="payment_code_top">
请输入验证码
<a href="#"></a>
</div>
<div class="payment_money">
<div>支付金额</div>
<div>¥{$pay_amount|0}</div>
</div>
<div class="payment_money_bank">
<img src="__IMG__/shortcut/{$bank_info.image}" alt="">
<div>{$bank_info.bank_info}{$bank_info.card_info}{$bank_info.end_num}</div>
</div>
<div class="payment_input_code">
<div><input type="text" placeholder="请输入验证码" id="smsCode_heng" name="smsCode" > <img src="__IMG__/shortcut/dacha.png" alt=""> </div>
<div id="sms_heng" onclick="getSms_heng()" >获取验证码</div>
</div>
<div class="payment_input_phone">验证码已发送至:<span>18000000000</span></div>
<div class="payment_input_phone_btn_heng">确认</div>
</div>
</div>
</form>
<!-- 错误弹窗 -->
<div class="forbid_model" style="display: none"></div>
<div class="forbid_window" style="display: none">
<div class="forbid_pay">
<img src="__IMG__/shortcut/forbid.png" alt="">
<div>请填写正确的银行卡号</div>
</div>
<div class="forbid_confirm">确认</div>
<div class="forbid_close"><img src="img/close2.png" alt=""></div>
</div>
</div>
</body>
</html>
<script>
$(function (){
$(".bank_select_box").click(function(){
$(".bank_mode").show();
$(".bank_window").show();
})
$(".bank_mode").click(function(){
$(".bank_mode").hide();
$(".bank_window").hide();
$(".payment_code").hide();
})
// 新增弹窗
$(".pay_submit").click(function(){
if (!$("#custName").val()&&!$("#custName").val()) {
// $('.forbid_pay').children().next().text('真实姓名不能为空');
forbit('真实姓名不能为空');
// $('.forbid_model').show();
// $('.forbid_window').show();
return;
}
if (!Check.idcardCheck($("#idNo").val())&&!$("#idNo_heng").val()) {
// $('.forbid_model').show();
// $('.forbid_window').show();
forbit('身份证号不符合规则');
return;
}
if (!Check.mobileCheck($("#phoneNo").val())&&!$("#phoneNo_heng").val()) {
// $('.forbid_model').show();
// $('.forbid_window').show();
forbit('手机号不符合规则');
return;
}
$(".bank_mode").show();
$(".payment_code").show();
$('.payment_input_phone').children().text($("#phoneNo").val());
$('.payment_input_phone').hide();
});
// 新增弹窗
$(".foot_btn_heng").click(function(){
if (!$("#custName_heng").val()) {
forbit('真实姓名不能为空');
return;
}
if (!Check.idcardCheck($("#idNo_heng").val())) {
forbit('身份证号不符合规则');
return;
}
if (!Check.mobileCheck($("#phoneNo_heng").val())) {
// $('.forbid_model').show();
// $('.forbid_window').show();
forbit('手机号不符合规则');
return;
}
$(".bank_mode").show();
$(".payment_code").show();
$('.payment_input_phone').children().text($("#phoneNo").val());
$('.payment_input_phone').hide();
});
$(".payment_code_top>a").click(function(){
$(".bank_mode").hide();
$(".payment_code").hide();
});
$(".close").click(function(){
$(".bank_mode").hide();
$(".bank_window").hide();
});
$('.forbid_model').click(function() {
$('.forbid_model').hide();
$('.forbid_window').hide();
});
$('.forbid_confirm').click(function() {
$('.forbid_model').hide();
$('.forbid_window').hide();
});
$(".pay_submit").click(function() {
var url = $(this).data('url');
});
});
//验证类
var Check={
trim(val){
//去除全部空白
return val.replace(/\s+/g, "");
},
mobileCheck(mobile){
mobile = Check.trim(mobile);
if(!(/^1[3456789]\d{9}$/.test(mobile))){
console.log($('.forbid_pay').children().next().text('手机号码有误,请重填'));
// Tip.msgShow("手机号码有误,请重填");
return false;
}
return mobile;
},
bankcardCheck(bankcard){
bankcard = Check.trim(bankcard);
if(!(/^([1-9]{1})(\d{15}|\d{18})$/.test(bankcard))){
$('.forbid_pay').children().next().text('银行卡格式错误,请重新填写');
// Tip.msgShow("银行卡格式错误,请重新填写");
return false;
}
return bankcard;
},
idcardCheck(idcard){
idcard = Check.trim(idcard);
if(!(/(^\d{15}$)|(^\d{17}([0-9]|X|x)$)/.test(idcard))){
$('.forbid_pay').children().next().text('身份证格式错误,请重新填写');
return false;
}
return idcard;
},
codeCheck(code){
code = Check.trim(code);
if(!(/^\d{6}$/.test(code))){
$('.forbid_pay').children().next().text('验证码格式错误应为6位数字');
// Tip.msgShow("验证码格式错误应为6位数字");
return false;
}
return code;
}
};
// 提示类
var Tip = {
showDom:false,
msgShow:function(str){
//信息提示
forbit(str);
}
}
var validCode=true;
var smsstatus = true;
function getSms() {
// if ($("#custName").val() == '' || $("#idNo").val() == '' || $("#phoneNo").val() == '') {
// $("#tipmsg").html('参数不能为空');
// $("#msgdialog").show();
// return ;
// }
if (!smsstatus) return;
$("#sms").html("请求中");
smsstatus = false;
var sms=document.getElementById("sms");
//获取短信验证码
$.ajax({
type: "POST",
url: "/sdk.php/Shortcut/shortcut_pay",
dataType:'json',
data: {
'user_id' : $("#user_id").val(),
'game_id' : $("#game_id").val(),
'custName' : $("#custName").val(),
'cardNo' : $("#cardNo").val(),
'idNo' : $("#idNo").val(),
'phoneNo' : $("#phoneNo").val(),
'extend' : $("#extend").val(),
'order_id' : $("#order_id").val(),
'api_ver' : 2,
'user_token' : $("#user_token").val(),
},
success:function(res){
if (res.code == 200) {
window.location.href = res.url;
}
// 返回列表数组,构造数据流模块
if(res.status == 0){
// $("#tipmsg").html(res.info);
// $("#msgdialog").show();
Tip.msgShow(res.info);
sms.innerText="获取验证码";
smsstatus = true;
return ;
}
if (res.status == 1) {
var time=60;
if (validCode) {
validCode=false;
var t=setInterval(function () {
time--;
sms.innerText=time+"秒"
if (time==0) {
clearInterval(t);
sms.innerText="获取验证码";
validCode=true;
smsstatus = true;
}
},1000);
}
}
if (res.status == 2) {
// 未签约
// 展示未签约页面
Tip.msgShow(res.info);
sms.innerText="获取验证码";
smsstatus = true;
}
}
});
}
function getSms_heng() {
// if ($("#custName").val() == '' || $("#idNo").val() == '' || $("#phoneNo").val() == '') {
// $("#tipmsg").html('参数不能为空');
// $("#msgdialog").show();
// return ;
// }
if (!smsstatus) return;
$("#sms_heng").html("请求中");
smsstatus = false;
var sms=document.getElementById("sms_heng");
//获取短信验证码
$.ajax({
type: "POST",
url: "/sdk.php/Shortcut/shortcut_pay",
dataType:'json',
data: {
'user_id' : $("#user_id_heng").val(),
'game_id' : $("#game_id_heng").val(),
'custName' : $("#custName_heng").val(),
'cardNo' : $("#cardNo_heng").val(),
'idNo' : $("#idNo_heng").val(),
'phoneNo' : $("#phoneNo_heng").val(),
'extend' : $("#extend_heng").val(),
'order_id' : $("#order_id_heng").val(),
'api_ver' : 2,
'user_token' : $("#user_token_heng").val(),
},
success:function(res){
if (res.code == 200) {
window.location.href = res.url;
}
// 返回列表数组,构造数据流模块
if(res.status == 0){
Tip.msgShow(res.info);
sms.innerText="获取验证码";
smsstatus = true;
return ;
}
if (res.status == 1) {
var time=60;
if (validCode) {
validCode=false;
var t=setInterval(function () {
time--;
sms.innerText=time+"秒"
if (time==0) {
clearInterval(t);
sms.innerText="获取验证码";
validCode=true;
smsstatus = true;
}
},1000);
}
}
if (res.status == 2) {
// 未签约
// 展示未签约页面
Tip.msgShow(res.info);
sms.innerText="获取验证码";
smsstatus = true;
}
}
});
}
function forbit(text) {
$('.forbid_pay').children().next().text(text);
$('.forbid_model').show();
$('.forbid_window').show();
}
var btnpay = false;
$(".payment_input_phone_btn").click(function(){
if (btnpay == true) return ;
var isok = true;
//名字
if(Check.trim($("#custName").val()) == ''){
isok = false;
forbit('真实姓名不能为空');
return ;
}
if(!Check.bankcardCheck($("#cardNo").val())){
forbit('银行卡格式错误,请重新填写');
isok = false;
return;
}
if(!Check.idcardCheck($("#idNo").val())){
forbit('身份证格式错误,请重新填写');
isok = false;
return;
}
if(!Check.mobileCheck($("#phoneNo").val())){
forbit('手机号码有误,请重填');
isok = false;
return;
}
if(!Check.codeCheck($("#smsCode").val())){
forbit('验证码有误,请重填');
isok = false;
return;
}
if(isok){
btnpay = true;
// Tip.loadShow();
$.ajax({
type: "POST",
dataType: "json",
url: "{:U('Shortcut/shortcut_pay')}" ,
data: $('#wfform').serialize(),
success: function (result) {
if (result.code == 200) {
window.location.href = res.url;
}
btnpay = false;
//处理结果
if(result.status == 0){
Tip.msgShow(result.info);
}else if(result.status == 1){
Tip.msgShow("充值成功");
$("#tipok").click(function(){
$("#msgdialog").hide();
window.location.href = result.url;
});
}else{
Tip.msgShow('未知信息');
}
},
error: function() {
btnpay = false;
Tip.msgShow('网络请求异常,请稍后再试');
}
});
// $("#wfform").submit();
}
});
$(".payment_input_phone_btn_heng").click(function(){
if (btnpay == true) return ;
var isok = true;
//名字
if(Check.trim($("#custName_heng").val()) == ''){
isok = false;
forbit('真实姓名不能为空');
return ;
}
if(!Check.bankcardCheck($("#cardNo_heng").val())){
forbit('银行卡格式错误,请重新填写');
isok = false;
return;
}
if(!Check.idcardCheck($("#idNo_heng").val())){
forbit('身份证格式错误,请重新填写');
isok = false;
return;
}
if(!Check.mobileCheck($("#phoneNo_heng").val())){
forbit('手机号码有误,请重填');
isok = false;
return;
}
if(!Check.codeCheck($("#smsCode_heng").val())){
forbit('验证码有误,请重填');
isok = false;
return;
}
if(isok){
btnpay = true;
// Tip.loadShow();
$.ajax({
type: "POST",
dataType: "json",
url: "{:U('Shortcut/shortcut_pay')}" ,
data: $('#wfform_heng').serialize(),
success: function (result) {
if (result.code == 200) {
window.location.href = res.url;
}
btnpay = false;
//处理结果
if(result.status == 0){
Tip.msgShow(result.info);
}else if(result.status == 1){
Tip.msgShow("充值成功");
$("#tipok").click(function(){
$("#msgdialog").hide();
window.location.href = result.url;
});
}else{
Tip.msgShow('未知信息');
}
},
error: function() {
btnpay = false;
Tip.msgShow('网络请求异常,请稍后再试');
}
});
// $("#wfform").submit();
}
})
</script>
<script type="text/javascript">
var evt = "onorientationchange" in window ? "orientationchange" : "resize";
window.addEventListener(evt,resize,false);
function resize(fals) {
if(window.orientation == 0 || window.orientation == 180) {
$(".bank_order").show();
$(".bank_order_heng").hide();
}else {
$(".bank_order").hide();
$(".bank_order_heng").show();
}
}
resize(true);
</script>