mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-08-06 22:09:45 +08:00
[更新]修改微信支付demo
This commit is contained in:
parent
68d9633780
commit
4ca54aa7ef
@ -70,6 +70,7 @@ class Wap extends BasicWechat {
|
||||
if ($options === false) {
|
||||
$options = ['code' => 3, 'msg' => "创建支付失败,{$pay->errMsg}[$pay->errCode]"];
|
||||
}
|
||||
$options['order_no'] = $order_no;
|
||||
return json($options);
|
||||
case 'reset':
|
||||
session('pay-test-order-no', null);
|
||||
|
@ -14,7 +14,7 @@
|
||||
<hr/>
|
||||
<p class="price">金额: 0.01元</p>
|
||||
<hr/>
|
||||
<p class="orderno">订单号:13412341234</p>
|
||||
<p class="orderno"></p>
|
||||
<hr/>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10" id="test">
|
||||
@ -36,6 +36,7 @@
|
||||
wx.ready(function () {
|
||||
$('[type="submit"]').on('click', function () {
|
||||
$.get('{:url("payjs")}', {'action': 'options'}, function (ret) {
|
||||
$('.orderno').html('订单号:' + ret.order_no);
|
||||
if (ret.code && ret.code === 2) {
|
||||
$('#test').append('<button type="button" class="btn btn-success">已支付,刷新支付号</button>');
|
||||
return $('[type="submit"]').remove();
|
||||
|
Loading…
x
Reference in New Issue
Block a user