mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
43 lines
1.3 KiB
PHP
43 lines
1.3 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>JSAPI支付DEMO</h3>
|
||
<hr/>
|
||
<p class="price">金额: 0.01元</p>
|
||
<hr/>
|
||
<p class="orderno">订单号:13412341234</p>
|
||
<hr/>
|
||
<div class="form-group">
|
||
<div class="col-sm-offset-2 col-sm-10">
|
||
<button type="submit" class="btn btn-success">立即支付</button>
|
||
</div>
|
||
</div>
|
||
</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 src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
||
<script>
|
||
wx.error(function (e) {
|
||
console.log(e);
|
||
});
|
||
wx.config($.parseJSON('{$jsSign|json_encode}'));
|
||
wx.ready(function () {
|
||
$('[type="submit"]').on('click', function () {
|
||
$.get('{:url("payjs")}', {'action': 'options'}, function (ret) {
|
||
wx.chooseWXPay(ret);
|
||
});
|
||
});
|
||
});
|
||
</script>
|
||
</html> |