From d3415cfa3ad1f15ee81defd4a130c147b34f11e7 Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Sat, 25 May 2019 17:12:56 +0800 Subject: [PATCH] wx pay --- application/index/view/default/order/detail.html | 2 +- .../plugins/weixinwebauthorization/index/Auth.php | 2 +- public/static/index/default/js/order.js | 14 ++++++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/application/index/view/default/order/detail.html b/application/index/view/default/order/detail.html index e4525fc24..f4d2bd809 100755 --- a/application/index/view/default/order/detail.html +++ b/application/index/view/default/order/detail.html @@ -194,7 +194,7 @@ {{/if}} {{if in_array($data['status'], [1])}} - + {{/if}} {{if in_array($data['status'], [3])}} diff --git a/application/plugins/weixinwebauthorization/index/Auth.php b/application/plugins/weixinwebauthorization/index/Auth.php index b62ecd712..621ec2187 100644 --- a/application/plugins/weixinwebauthorization/index/Auth.php +++ b/application/plugins/weixinwebauthorization/index/Auth.php @@ -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); } diff --git a/public/static/index/default/js/order.js b/public/static/index/default/js/order.js index 714b0127d..0f69e192b 100755 --- a/public/static/index/default/js/order.js +++ b/public/static/index/default/js/order.js @@ -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'); + } + } } }); \ No newline at end of file