新增扫码付款
This commit is contained in:
56
dhdg-pay/index.html
Normal file
56
dhdg-pay/index.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>抖火收银台</title>
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
body{ padding: 0; margin: 0; }
|
||||
.pages{ width: 100vw; height: 90vh; display: flex; align-items: center; flex-direction: column; justify-content: center; }
|
||||
img{ width: 62px; height: 62px; border-radius: 10px; }
|
||||
h4{ font-size: 16px; margin-bottom: 100px; }
|
||||
p{ font-size: 14px; color: red; }
|
||||
button{ margin-bottom: 20px; width: 60vw; height: 50px; line-height: 50px; border: none; padding: 0; font-size: 16px; font-weight: bold; border-radius: 5px; background: #e80050; color: white; }
|
||||
button.closeBtn{ border:solid 1px #e80050; color: #e80050; background-color: white; line-height: 48px; }
|
||||
.footer{ font-size: 14px; color: gray; position: absolute; bottom: 10vh; }
|
||||
</style>
|
||||
<div class="pages">
|
||||
<img src="logo.png" alt="抖火法律">
|
||||
<h4>抖火收银台</h4>
|
||||
<p id="toast" style="display: none;">!!!参数错误</p>
|
||||
<button id="pay" onclick="onPay()">立即支付</button>
|
||||
<button class="closeBtn" id="btn" onclick="onClose()">支付完成</button>
|
||||
<div class="footer">河北抖火法律咨询服务有限公司</div>
|
||||
</div>
|
||||
<script>
|
||||
var wxCodeVal = window.location.search.indexOf('miniurlcode=')
|
||||
var wxMiniUrl = ''
|
||||
if(wxCodeVal > 0){
|
||||
var wxCodeUrl = window.location.search.substring((wxCodeVal + 'miniurlcode='.length), window.location.search.length)
|
||||
wxMiniUrl = decodeURIComponent(wxCodeUrl);
|
||||
window.location.href = decodeURIComponent(wxCodeUrl);
|
||||
}else{
|
||||
document.getElementById("btn").style.display = 'none'
|
||||
document.getElementById("toast").style.display = 'block'
|
||||
}
|
||||
|
||||
// 支付
|
||||
document.getElementById("pay").onPay = function() {
|
||||
if(wxMiniUrl != ''){
|
||||
window.location.href = decodeURIComponent(wxCodeUrl);
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭支付
|
||||
document.getElementById("btn").onClose = function(){
|
||||
document.addEventListener("WeixinJSBridgeReady", function() {
|
||||
WeixinJSBridge.call("closeWindow");
|
||||
},false);
|
||||
WeixinJSBridge.call("closeWindow");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
dhdg-pay/logo.png
Normal file
BIN
dhdg-pay/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user