148 lines
6.7 KiB
HTML
Executable File
148 lines
6.7 KiB
HTML
Executable File
<!-- 导航 -->
|
|
<ul class="am-nav am-nav-pills">
|
|
<li {{if !isset($plugins_control) or (isset($plugins_control) and $plugins_control eq 'wallet')}}class="am-active"{{/if}}>
|
|
<a href="{{:PluginsHomeUrl('wallet', 'wallet', 'index')}}">账户余额</a>
|
|
</li>
|
|
<li {{if isset($plugins_control) and $plugins_control eq 'recharge'}}class="am-active"{{/if}}>
|
|
<a href="{{:PluginsHomeUrl('wallet', 'recharge', 'index')}}">充值明细</a>
|
|
</li>
|
|
<li {{if isset($plugins_control) and $plugins_control eq 'cash'}}class="am-active"{{/if}}>
|
|
<a href="{{:PluginsHomeUrl('wallet', 'cash', 'index')}}">余额提现</a>
|
|
</li>
|
|
|
|
<div class="am-topbar-right">
|
|
{{if in_array($plugins_control, ['wallet', 'recharge'])}}
|
|
<button class="am-btn am-btn-secondary am-topbar-btn am-btn-sm am-icon-shield" data-am-modal="{target: '#plugins-recharge-pay-modal', width: 260, height: 130}"> 在线充值</button>
|
|
{{/if}}
|
|
{{if in_array($plugins_control, ['wallet', 'cash'])}}
|
|
<a class="am-btn am-btn-success am-topbar-btn am-btn-sm am-icon-money"> 申请提现</a>
|
|
{{/if}}
|
|
</div>
|
|
</ul>
|
|
|
|
<!-- 账户信息 -->
|
|
{{if empty($wallet_error)}}
|
|
<div class="am-alert am-alert-secondary" data-am-alert>
|
|
<div class="available">
|
|
<span>可用金额</span>
|
|
<span class="integral-value">{{$user_wallet.normal_money}}</span>
|
|
<em>元</em>
|
|
<span class="integral-tips">正常可以使用的金额</span>
|
|
</div>
|
|
<div class="locking">
|
|
<span>冻结金额</span>
|
|
<span class="integral-value">{{$user_wallet.frozen_money}}</span>
|
|
<em>元</em>
|
|
<span class="integral-tips">一般积分交易中、提现、交易并未完成,锁定相应的积分</span>
|
|
</div>
|
|
</div>
|
|
{{else /}}
|
|
<div class="am-alert am-alert-warning" data-am-alert>
|
|
{{$wallet_error}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<!-- 充值窗口 -->
|
|
<div class="am-modal am-modal-no-btn" tabindex="-1" id="plugins-recharge-pay-modal">
|
|
<div class="am-modal-dialog">
|
|
<div class="am-modal-hd">
|
|
<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>×</a>
|
|
</div>
|
|
<div class="am-modal-bd">
|
|
<form class="am-form form-validation-plugins-recharge-modal" action="{{:PluginsHomeUrl('wallet', 'recharge', 'create')}}" method="POST" request-type="ajax-fun" request-value="PluginsRechargeBack">
|
|
<label>充值金额</label>
|
|
<div class="am-input-group am-input-group-sm">
|
|
<input type="number" autocomplete="off" name="money" step="0.01" class="am-radius" placeholder="充值金额" data-validation-message="请输入充值金额" required />
|
|
<span class="am-input-group-btn">
|
|
<button type="button" class="am-btn am-btn-default am-radius">元</button>
|
|
</span>
|
|
</div>
|
|
|
|
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">提交</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 支付方式 -->
|
|
<div class="am-popup" id="plugins-recharge-pay-popup">
|
|
<div class="am-popup-inner">
|
|
<div class="am-popup-hd">
|
|
<h4 class="am-popup-title">支付确认</h4>
|
|
<span data-am-modal-close class="am-close">×</span>
|
|
</div>
|
|
<div class="am-popup-bd">
|
|
<form class="am-form form-validation-plugins-recharge-popup" action="{{:PluginsHomeUrl('wallet', 'recharge', 'pay')}}" method="POST" request-type="ajax-fun" request-value="PluginsRechargePayBack">
|
|
<div class="base">
|
|
<p>充值单号:<span class="recharge-no">...</span></p>
|
|
<p class="price">充值金额:<strong>...</strong></p>
|
|
</div>
|
|
<div class="business-item">
|
|
<label>支付选择</label>
|
|
{{if !empty($buy_payment_list)}}
|
|
<ul class="payment-list" data-type="payment">
|
|
{{foreach $buy_payment_list as $payment}}
|
|
{{if !in_array($payment['payment'], config('shopxo.under_line_list'))}}
|
|
<li class="payment-items-{{$payment.id}}" data-value="{{$payment.id}}">
|
|
{{if !empty($payment.logo)}}
|
|
<img src="{{$payment.logo}}" />
|
|
{{/if}}
|
|
<span>{{$payment.name}}</span>
|
|
<i class="icon-active"></i>
|
|
</li>
|
|
{{/if}}
|
|
{{/foreach}}
|
|
</ul>
|
|
{{/if}}
|
|
{{if empty($buy_payment_list)}}
|
|
<div class="table-no"><i class="am-icon-warning"></i> 没有支付方式</div>
|
|
{{/if}}
|
|
<input type="number" name="payment_id" min="1" data-validation-message="请选择支付方式" value="0" required />
|
|
</div>
|
|
|
|
<div class="am-form-group am-form-group-refreshing">
|
|
<input type="hidden" name="recharge_id" value="" />
|
|
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-btn-block" data-am-loading="{loadingText:'处理中...'}">确认支付</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/**
|
|
* 充值回调
|
|
*/
|
|
function PluginsRechargeBack(e)
|
|
{
|
|
$.AMUI.progress.done();
|
|
$('form.form-validation-plugins-recharge-modal').find('button[type="submit"]').button('reset');
|
|
if(e.code == 0)
|
|
{
|
|
$('#plugins-recharge-pay-modal').modal('close');
|
|
var $popup = $('#plugins-recharge-pay-popup');
|
|
$popup.find('.business-item ul li').removeClass('selected');
|
|
$popup.find('input[name="payment_id"]').val('');
|
|
$popup.find('input[name="recharge_id"]').val(e.data.recharge_id);
|
|
$popup.find('.base .recharge-no').text(e.data.recharge_no);
|
|
$popup.find('.base .price strong').text('¥'+e.data.money);
|
|
$popup.modal('open');
|
|
} else {
|
|
Prompt(e.msg);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 支付回调
|
|
*/
|
|
function PluginsRechargePayBack(e)
|
|
{
|
|
if(e.code == 0)
|
|
{
|
|
window.location.href = e.data;
|
|
} else {
|
|
$('form.form-validation-plugins-recharge-popup').find('button[type="submit"]').button('reset');
|
|
$.AMUI.progress.done();
|
|
Prompt(e.msg);
|
|
}
|
|
}
|
|
</script> |