From 272d5e6132e50891cb2c6f100a654d3c77e151f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Wed, 28 May 2025 10:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E6=9F=9A=E4=BF=AE=E6=94=B9=E9=99=90?= =?UTF-8?q?=E5=88=B6=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/jinyou/controller/Jinyoudt.php | 10 +++++++++- app/jinyou/controller/Jinyoujt.php | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/jinyou/controller/Jinyoudt.php b/app/jinyou/controller/Jinyoudt.php index 9c5fb72..76234d6 100644 --- a/app/jinyou/controller/Jinyoudt.php +++ b/app/jinyou/controller/Jinyoudt.php @@ -21,7 +21,15 @@ class Jinyoudt extends Controller $account_model = new AccountModel; - $account_model->updateOne($where, ['im' => '1']); + $im_now = $account_model->getOne($where); + + $im = 1; + if ($im_now) { + $im = 0; + } + + $account_model->updateOne($where, ['im' => $im]); + $jinyou = new Jinyou(); $status = $jinyou::openTxLimit($data['account']); echo json_encode(['Code'=>30000,]); diff --git a/app/jinyou/controller/Jinyoujt.php b/app/jinyou/controller/Jinyoujt.php index 037079c..91b9f8f 100644 --- a/app/jinyou/controller/Jinyoujt.php +++ b/app/jinyou/controller/Jinyoujt.php @@ -444,7 +444,14 @@ class Jinyoujt extends Controller $account_model = new AccountModel; - $account_model->updateOne($where, ['im' => '1']); + $im_now = $account_model->getOne($where); + + $im = 1; + if ($im_now) { + $im = 0; + } + + $account_model->updateOne($where, ['im' => $im]); $jinyou = new Jinyoujingtai(); $status = $jinyou::setFirewallStatus($data['account'],$type,121);