mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
71 lines
2.5 KiB
PHP
71 lines
2.5 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>JSAPI支付DEMO</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
|
</head>
|
|
<body style="text-align:center">
|
|
|
|
<div class="contrainer">
|
|
<h3>扫码支付DEMO</h3>
|
|
<form class="form-horizontal">
|
|
<div class="form-group">
|
|
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
|
|
<div class="col-sm-10">
|
|
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
|
|
<div class="col-sm-10">
|
|
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox"> Remember me
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
<button type="submit" class="btn btn-default">Sign in</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
</body>
|
|
<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
|
|
<script src="//cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
|
<script>
|
|
$(function () {
|
|
|
|
payTest.call(this), setInterval(payTest, 3000);
|
|
|
|
/*! 支付测试动作 */
|
|
function payTest() {
|
|
$.get('{:url("payqrc")}', {'action': 'payqrc'}, function (ret) {
|
|
if (ret.code === 2) {
|
|
ret.url = '__STATIC__/theme/default/img/wechat/qrc_payed.jpg';
|
|
}
|
|
console.log(ret);
|
|
$('#showbox').html('<img style="width:300px" class="img-thumbnail" src="' + ret.url + '"/>');
|
|
$('#orderno').html('订单号:' + ret.order_no);
|
|
});
|
|
}
|
|
|
|
$('[data-reset]').on('click', function () {
|
|
$.get('{:url("payqrc")}', {'action': 'reset'}, function () {
|
|
window.location.reload();
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
</html> |