|
17 | 17 | <div class="title">钱包充值</div> |
18 | 18 | </div> |
19 | 19 | <div class="body"> |
20 | | - <form action="{{modstart_api_url('member_money/charge/submit')}}" method="post" data-ajax-form> |
| 20 | + @if(!modstart_module_enabled('PayCenter')) |
| 21 | + <div class="ub-alert ub-alert-warning"> |
| 22 | + <i class="iconfont icon-warning"></i> |
| 23 | + 请先安装 <a href="https://modstart.com/m/PayCenter" target="_blank">PayCenter</a> 模块 |
| 24 | + </div> |
| 25 | + @elseif(\Module\PayCenter\Util\PayUtil::preferShowQuick()) |
21 | 26 | <div class="ub-form"> |
22 | 27 | <div class="line"> |
23 | 28 | <div class="label">充值金额</div> |
24 | 29 | <div class="field"> |
25 | | - <input class="form" type="number" step="any" name="money"/> |
| 30 | + <input class="form" type="number" step="any" value="100" name="money"/> |
26 | 31 | </div> |
27 | 32 | </div> |
28 | 33 | <div class="line"> |
29 | | - <div class="label"> </div> |
| 34 | + <div class="label">扫码支付</div> |
30 | 35 | <div class="field"> |
31 | | - <input type="hidden" name="recirect" {{modstart_web_url('member_money')}} /> |
32 | | - <button class="btn btn-primary" type="submit">提交支付</button> |
| 36 | + @include('module::PayCenter.View.inc.quick') |
| 37 | + <script> |
| 38 | + $(function () { |
| 39 | + var refresh = function () { |
| 40 | + var money = parseFloat($('[name="money"]').val()); |
| 41 | + if (money >= 0.01 && money < 1000 * 10000) { |
| 42 | + money = parseFloat(money).toFixed(2) |
| 43 | + $('[name="money"]').val(money + '') |
| 44 | + window.__payCenterQuick.prepareLazy( |
| 45 | + '{{\Module\Member\Core\MemberMoneyChargePayCenterBiz::NAME}}', |
| 46 | + {money: money}, |
| 47 | + {money: money} |
| 48 | + ); |
| 49 | + } else { |
| 50 | + window.__payCenterQuick.empty(); |
| 51 | + } |
| 52 | + }; |
| 53 | + $('[name="money"]').on('keyup', refresh); |
| 54 | + refresh(); |
| 55 | + }); |
| 56 | + </script> |
33 | 57 | </div> |
34 | 58 | </div> |
35 | 59 | </div> |
36 | | - |
37 | | - </form> |
| 60 | + @else |
| 61 | + <form action="{{modstart_api_url('member_money/charge/submit')}}" method="post" data-ajax-form> |
| 62 | + <div class="ub-form"> |
| 63 | + <div class="line"> |
| 64 | + <div class="label">充值金额</div> |
| 65 | + <div class="field"> |
| 66 | + <input class="form" type="number" step="any" value="100" name="money"/> |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + <div class="line"> |
| 70 | + <div class="label"> </div> |
| 71 | + <div class="field"> |
| 72 | + <input type="hidden" name="recirect" {{modstart_web_url('member_money')}} /> |
| 73 | + <button class="btn btn-primary" type="submit">提交支付</button> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + </div> |
| 77 | + </form> |
| 78 | + @endif |
38 | 79 | </div> |
39 | 80 | </div> |
40 | 81 |
|
|
44 | 85 | </div> |
45 | 86 | <div class="body"> |
46 | 87 | <div class="margin-bottom"> |
47 | | - @include('module::PayCenter.View.pc.pay.types') |
| 88 | + @if(!modstart_module_enabled('PayCenter')) |
| 89 | + <div class="ub-alert ub-alert-warning"> |
| 90 | + <i class="iconfont icon-warning"></i> |
| 91 | + 请先安装 <a href="https://modstart.com/m/PayCenter" target="_blank">PayCenter</a> 模块 |
| 92 | + </div> |
| 93 | + @else |
| 94 | + @include('module::PayCenter.View.pc.pay.types') |
| 95 | + @endif |
48 | 96 | </div> |
49 | 97 | @if(modstart_config('Member_MoneyChargeDesc')) |
50 | 98 | <div class="tw-rounded-lg tw-p-3" style="background:#F8F8F8;"> |
|
0 commit comments