<!DOCTYPE html>
<html style="background: #f6f6f6;min-height: 100%;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta id="viewport" name="viewport" content="width=640, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="white">
<title>付款</title>
<!-- <link rel="stylesheet" type="text/css" href="http://b.pay9.cn/css/styleMa.css?v=1591699989" /> -->
<link rel="stylesheet" type="text/css" href="scanPay.css" />
<script src="/common/static/js/fastclick.js" type="text/javascript"></script>
<script type="text/javascript" src="js/libs/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="/common/static/js/bin.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<!-- <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=hvCfp64TZxWEBZY1AmHT8MhI0GrkGGlZ"></script> -->
<meta name="format-detection" content="telephone=no" />
</head>
<body style="background: #F6F6F6;width:640px;">
<div class="alert_tip"><img src="alert.png" />千万别远程支付,任何要求远程付款的都是骗子</div>
<div style="position: relative;padding-top: 60px;">
<img src="http://wx.qlogo.cn/mmopen/GfOCwujib9pOibqawMjOWbT54lvt25r39kod5Z5gV9n3sxAEHC8EkBVBj7npbgk3kaO5dnO8ZjcqlOXib49uiaQAgHW7Rus8E9qL/0"
class="pay_photo" style="display:block;margin:0px auto;position: relative;left: 0px;" />
<p style="overflow: hidden;white-space:nowrap;text-overflow:ellipsis;margin: 0px auto;text-align: center;" class="wupin">壮壮收款</p>
<p class="point_name" style="margin: 0px auto;text-align: center;">琰通支付</p>
</div>
<div class="payMM" ontouchstart="show_jianpan()">
<p class="paymoney"><span class="jine">金额</span><span id="money"></span><span class="renminbi">¥</span></p>
</div>
<div class="pay_foot">
<span class="line-left"></span>
<span class="elecode">琰通支付</span>
<span class="line-right"></span>
</div>
<div class="space-day"> </div>
<div id="jianpan_container">
<table id="jianpan" class="tablediv" cellpadding="0px" cellspacing="0px">
<tr>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn" style="border-top:1px solid #e5e5e5;">1</td>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn" style="border-top:1px solid #e5e5e5;">2</td>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn" style="border-top:1px solid #e5e5e5;">3</td>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn" style="border-right:0;border-top:1px solid #e5e5e5;"
id="tuige"><img style="height:40px;width:58px;" src="shanchu.png" /></td>
</tr>
<tr>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn">4</td>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn">5</td>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn">6</td>
<td id="pay_btn" class="pay gray_btn" rowspan="3" onclick="payMoneyNow()">付款</td>
</tr>
<tr>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn">7</td>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn">8</td>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn">9</td>
</tr>
<tr>
<td ontouchstart="hidden_jianpan()"><img style="width:65px;height:44px" src="jianpan.png" /></td>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn">0</td>
<td ontouchstart="input(this)" ontouchend="canceltouch(this)" class="jisuanqi_btn">.</td>
</tr>
</table>
</div>
<script type="text/javascript">
var str = '';
var temp = '';
var pointflag = false;
var count = 0;
function hidden_jianpan() {
if ($('#jianpan_container').css('display') != "none") {
$('#jianpan_container').css('display', 'none');
}
}
function show_jianpan() {
if ($('#jianpan_container').css('display') == "none") {
$('#jianpan_container').css('display', 'block');
}
}
function canceltouch(obj) {
$(obj).css("background", "#ffffff");
}
function input(obj) {
str = $("#money").html();
$(".jisuanqi_btn").css("background", '#ffffff');
$(obj).css("background", "#d6d6d6");
temp = $(obj).text();
//判断是否出现了小数点,若是有小数点,则小数点后面只能在输两位数字
if (temp == "." && pointflag == true) {
return false;
}
if (temp == "." && pointflag == false) {
pointflag = true;//已经出现小数点了,将开关设为正
}
var quedingfl;
//小数点后面只能有两位
//如果是退格
if ($(obj).attr("id") == "tuige") {
if (str.substr(str.length - 1, 1) == ".") {
pointflag = false;
count = 0;
}
str = str.slice(0, -1);
//退格,但是不是小数点
if (pointflag == true) {
if (count == 4) {
count = count - 2;
} else {
count = count - 1;
}
}
temp = '';
} else {
if (pointflag == true) {
count++;
if (count >= 4) {
count = 4;
return false;
}
}
if (str == "0" && temp == "0") {
return false;
}
str += temp;
quedingfl = parseFloat("0" + str);
if (quedingfl > 99999999.99) {
return;
}
if (str == ".") {
str = "0.";
}
};
quedingfl = parseFloat("0" + str);
if (quedingfl != 0) {
if ($("#pay_btn").hasClass("gray_btn")) {
$("#pay_btn").removeClass("gray_btn");
}
} else {
if (!$("#pay_btn").hasClass("gray_btn")) {
$("#pay_btn").addClass("gray_btn");
}
}
//如果第一个输入的就是小数点,则自动变成0.
$("#money").html(str);
}//end_click
var jsApiParameters;
//调用微信JS api 支付
function jsApiCall() {
WeixinJSBridge.invoke(
'getBrandWCPayRequest',
jsApiParameters,
function (res) {
// alert(res.err_msg);
if (res.err_msg == "get_brand_wcpay_request:ok") {
alert("支付成功");
} else {
alert("支付取消");
}
WeixinJSBridge.log(res.err_msg);
WeixinJSBridge.invoke('closeWindow', {}, function (res) { });
}
);
}
function callpay(data) {
jsApiParameters = eval("(" + data + ")");;
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', jsApiCall);
document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
}
} else {
jsApiCall();
}
}
// function pay(){
// if (!$("#pay_btn").hasClass("gray_btn")) {
// $("#pay_btn").addClass("gray_btn");
// var quedingstr,quedingfl;
// quedingstr = $("#money").html();
// quedingfl = parseInt(parseFloat(quedingstr) * 100);
// if (quedingfl >= 2000000) {
// alert("超出单笔限额20000元");
// return;
// }
// // if (quedingfl >= 5000000) {
// // alert("超出支付宝单笔限额50000元");
// // return;
// // }
// if (quedingfl < 5000000) {
// return;
// var url = "http://b.pay9.cn/index.php?r=saasdirect/payone&price="+quedingfl+"&shop_id="+97186+"&code="+20200609185142387889+"&card_id="+683628+"&pay_config="+3+"&pay_open_id="+""+"&shop_name="+"壮壮收款"+"&city="+city;
// window.location.href = url;
//