1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-24 20:06:09 +08:00

修复退款项目空白,以及弹窗高度自适应,取消退款内部错误

This commit is contained in:
xiaochong0302 2020-11-10 14:33:27 +08:00
parent 7453a1448a
commit f4dda5a58c
2 changed files with 8 additions and 16 deletions

View File

@ -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' => '取消退款成功']);
}
}

View File

@ -21,7 +21,7 @@
</table>
<br>
<div class="center">
{% if refund.status == 'approved' %}
{% if refund.status == 3 %}
<button class="kg-refund layui-btn" data-sn="{{ refund.sn }}" data-url="{{ cancel_url }}">取消退款</button>
{% endif %}
</div>
@ -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);
}
});