From f4dda5a58cb4760ad1ef33820027f856460ebe14 Mon Sep 17 00:00:00 2001 From: xiaochong0302 Date: Tue, 10 Nov 2020 14:33:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=80=E6=AC=BE=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=A9=BA=E7=99=BD=EF=BC=8C=E4=BB=A5=E5=8F=8A=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E9=AB=98=E5=BA=A6=E8=87=AA=E9=80=82=E5=BA=94=EF=BC=8C?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E9=80=80=E6=AC=BE=E5=86=85=E9=83=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Home/Controllers/RefundController.php | 14 ++------------ app/Http/Home/Views/refund/info.volt | 10 ++++++---- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/app/Http/Home/Controllers/RefundController.php b/app/Http/Home/Controllers/RefundController.php index 767050d1..1aaf813a 100644 --- a/app/Http/Home/Controllers/RefundController.php +++ b/app/Http/Home/Controllers/RefundController.php @@ -44,12 +44,7 @@ class RefundController extends Controller $service->handle(); - $content = [ - 'location' => $this->url->get(['for' => 'home.uc.refunds']), - 'msg' => '申请退款成功', - ]; - - return $this->jsonSuccess($content); + return $this->jsonSuccess(['msg' => '申请退款成功']); } /** @@ -78,12 +73,7 @@ class RefundController extends Controller $service->handle($sn); - $content = [ - 'location' => $this->url->get(['for' => 'home.uc.refunds']), - 'msg' => '取消退款成功', - ]; - - return $this->jsonSuccess($content); + return $this->jsonSuccess(['msg' => '取消退款成功']); } } diff --git a/app/Http/Home/Views/refund/info.volt b/app/Http/Home/Views/refund/info.volt index 31ae9047..d2365231 100644 --- a/app/Http/Home/Views/refund/info.volt +++ b/app/Http/Home/Views/refund/info.volt @@ -21,7 +21,7 @@
- {% if refund.status == 'approved' %} + {% if refund.status == 3 %} {% endif %}
@@ -40,15 +40,17 @@ parent.layer.iframeAuto(index); $('.kg-refund').on('click', function () { + var url = $(this).data('url'); + var data = {sn: $(this).data('sn')}; layer.confirm('确定要取消退款吗?', function () { $.ajax({ type: 'POST', - url: $(this).data('url'), - data: {sn: $(this).data('sn')}, + url: url, + data: data, success: function (res) { layer.msg(res.msg, {icon: 1}); setTimeout(function () { - parent.window.location.href = '/my/refunds'; + parent.window.location.href = '/uc/refunds'; }, 1500); } });