From 1da5da1ea51edf5088526f2fe54fa92d6a3c576c Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 22 Jun 2020 17:34:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=B8=E6=98=9F-=E4=BC=98=E5=8C=96=E6=8F=90?= =?UTF-8?q?=E7=8E=B0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/WithdrawController.class.php | 7 ++++++- Application/Home/View/default/Withdraw/index.html | 12 ++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) 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 () {