mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-25 12:09:09 +08:00
修复退款项目空白,以及弹窗高度自适应,取消退款内部错误
This commit is contained in:
parent
7453a1448a
commit
f4dda5a58c
@ -44,12 +44,7 @@ class RefundController extends Controller
|
|||||||
|
|
||||||
$service->handle();
|
$service->handle();
|
||||||
|
|
||||||
$content = [
|
return $this->jsonSuccess(['msg' => '申请退款成功']);
|
||||||
'location' => $this->url->get(['for' => 'home.uc.refunds']),
|
|
||||||
'msg' => '申请退款成功',
|
|
||||||
];
|
|
||||||
|
|
||||||
return $this->jsonSuccess($content);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,12 +73,7 @@ class RefundController extends Controller
|
|||||||
|
|
||||||
$service->handle($sn);
|
$service->handle($sn);
|
||||||
|
|
||||||
$content = [
|
return $this->jsonSuccess(['msg' => '取消退款成功']);
|
||||||
'location' => $this->url->get(['for' => 'home.uc.refunds']),
|
|
||||||
'msg' => '取消退款成功',
|
|
||||||
];
|
|
||||||
|
|
||||||
return $this->jsonSuccess($content);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<br>
|
<br>
|
||||||
<div class="center">
|
<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>
|
<button class="kg-refund layui-btn" data-sn="{{ refund.sn }}" data-url="{{ cancel_url }}">取消退款</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@ -40,15 +40,17 @@
|
|||||||
parent.layer.iframeAuto(index);
|
parent.layer.iframeAuto(index);
|
||||||
|
|
||||||
$('.kg-refund').on('click', function () {
|
$('.kg-refund').on('click', function () {
|
||||||
|
var url = $(this).data('url');
|
||||||
|
var data = {sn: $(this).data('sn')};
|
||||||
layer.confirm('确定要取消退款吗?', function () {
|
layer.confirm('确定要取消退款吗?', function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: $(this).data('url'),
|
url: url,
|
||||||
data: {sn: $(this).data('sn')},
|
data: data,
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
layer.msg(res.msg, {icon: 1});
|
layer.msg(res.msg, {icon: 1});
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
parent.window.location.href = '/my/refunds';
|
parent.window.location.href = '/uc/refunds';
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user