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); } });