diff --git a/Application/Home/Controller/WithdrawController.class.php b/Application/Home/Controller/WithdrawController.class.php index 1c78b1a17..d554827b3 100644 --- a/Application/Home/Controller/WithdrawController.class.php +++ b/Application/Home/Controller/WithdrawController.class.php @@ -145,7 +145,12 @@ class WithdrawController extends BaseController } $this->poolCount($dbres['pool_id']); M("company_statement_info","tab_")->save($savedata); - $this->ajaxReturn(["msg"=>"打款成功","data"=>$dbres,"status"=>1]); + + if ($savedata["pay_status"] == -1) { + $this->ajaxReturn(["msg"=>"提现失败","data"=>$dbres,"status"=>0]); + } + + $this->ajaxReturn(["msg"=>"提现成功","data"=>$dbres,"status"=>1]); } /** diff --git a/Application/Home/View/default/Withdraw/index.html b/Application/Home/View/default/Withdraw/index.html index a00a87bde..b7728142f 100644 --- a/Application/Home/View/default/Withdraw/index.html +++ b/Application/Home/View/default/Withdraw/index.html @@ -326,14 +326,10 @@ dataType: "json", data: { id:id }, success: function (result) { - if (result.status == 0) { - layer.msg(result.msg); - } else { - layer.msg('提现成功~'); - setTimeout(function () { - location.reload(); - }, 1000); - } + layer.msg(result.msg); + setTimeout(function () { + location.reload(); + }, 1000); }, error: function () {