Commit 6e3716a1 by LiuJunYi

申请退款加弹窗,和修复金额大小BUG

parent 2b80549a
......@@ -362,7 +362,7 @@ class Order extends AuthBase
return json(['code' => 1, 'msg' => '退款异常,请刷新页面重试!']);
}
//查看是否超过退款金额
if ($order['total_fee'] > input('price')) {
if ($order['total_fee'] < input('price')) {
return json(['code' => 1, 'msg' => '超过退款金额']);
}
Db::startTrans();
......
......@@ -90,10 +90,12 @@
// 文档加载完毕之后,会进入该方法
$(function () {
$('.refund').click(function(){
layer.load(2);
let id =$(this).closest('tr').attr('data-id')
let price =$(this).closest('tr').find('input').val()
let that =this
layer.confirm('确认退款?', function(index){
layer.close(index)
layer.load(2);
let id =$(that).closest('tr').attr('data-id')
let price =$(that).closest('tr').find('input').val()
$.post("{:url('cardRefund')}",{id:id,price:price},function (res) {
layer.closeAll()
layer.msg(res.msg)
......@@ -102,5 +104,7 @@
}
});
});
});
});
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment