This commit is contained in:
gongfuxiang 2019-05-25 17:12:56 +08:00
parent 9ff6cf019a
commit d3415cfa3a
3 changed files with 14 additions and 4 deletions

View File

@ -194,7 +194,7 @@
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-icon-paint-brush submit-ajax submit-cancel" data-url="{{:MyUrl('index/order/cancel')}}" data-id="{{$data.id}}" data-view="reload"> 取消</button>
{{/if}}
{{if in_array($data['status'], [1])}}
<button class="am-btn am-btn-primary am-btn-xs am-radius am-icon-paypal submit-pay" data-id="{{$data.id}}" data-payment-id="{{$data.payment_id}}" data-am-modal="{target: '#order-pay-popup'}" data-is-auto="{{if isset($params['is_pay_auto']) and $params['is_pay_auto'] eq 1}}1{{else /}}0{{/if}}"> 支付</button>
<button class="am-btn am-btn-primary am-btn-xs am-radius am-icon-paypal submit-pay" data-id="{{$data.id}}" data-payment-id="{{$data.payment_id}}" data-am-modal="{target: '#order-pay-popup'}" data-is-auto="{{if isset($params['is_pay_auto']) and $params['is_pay_auto'] eq 1}}1{{else /}}0{{/if}}" data-is-pay="{{if isset($params['is_pay_submit']) and $params['is_pay_submit'] eq 1}}1{{else /}}0{{/if}}"> 支付</button>
{{/if}}
{{if in_array($data['status'], [3])}}
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-check-circle-o submit-ajax submit-confirm" data-url="{{:MyUrl('index/order/collect')}}" data-id="{{$data.id}}" data-view="reload" data-msg="请仔细确认已收到货物、确认继续吗?"> 收货</button>

View File

@ -36,7 +36,7 @@ class Auth extends Controller
// 订单url处理
if(!empty($params['id']))
{
$url = MyUrl('index/order/detail', ['id'=>intval($params['id']), 'is_pay_auto'=>1]);
$url = MyUrl('index/order/detail', ['id'=>intval($params['id']), 'is_pay_auto'=>1, 'is_pay_submit'=>1]);
session('plugins_pay_order_detail_url', $url);
}

View File

@ -61,9 +61,19 @@ $(function()
});
// 是否自动开启支付窗口
if($('.submit-pay').length > 0 && $('.submit-pay').data('is-auto') == 1)
if($('.submit-pay').length > 0)
{
$('.submit-pay').trigger('click');
// 是否自动打开支付窗口
if($('.submit-pay').data('is-auto') == 1)
{
$('.submit-pay').trigger('click');
// 是否自动提交支付表单
if($('.submit-pay').data('is-pay') == 1)
{
$('#order-pay-popup button["submit"]').trigger('click');
}
}
}
});