From 3d5da261207fa90b2b147c58bbe710bb4d248ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Thu, 15 May 2025 14:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=A0=E9=99=A4=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/manager/controller/Account.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/app/manager/controller/Account.php b/app/manager/controller/Account.php index eaa2f4d..cfab0e9 100644 --- a/app/manager/controller/Account.php +++ b/app/manager/controller/Account.php @@ -64,4 +64,30 @@ class Account extends Controller \result($count,'',30000); } + + public function delete() { + $data = json_decode(file_get_contents("php://input"), true); + $account_model = new ProductAccount; + + $where = [ + 'Id' => $data['id'], + 'DeleteTag' => 0 + ]; + + $account_info = $account_model->getOne($where); + + $update_data['DeleteTag'] = 1; + + if ($account_info['ProductId'] == 29) { + $url = "http://124.236.113.166:18702/api/agent/deleteAcct/apikey/80cf4f64e990b78a9fc5eb/account/".$account_info['Account']; + linkcurl($url,'GET',[],[],0); + } elseif ($account_info['ProductId'] == 3 || $account_info['ProductId'] == 26) { + $url = "http://106.119.166.87:18702/api/agent/deleteAcct/apikey/80cf4f64e990b78a9fc5eb/account/".$account_info['Account']; + linkcurl($url,'GET',[],[],0); + } + + $account_model->updateOne($where,$update_data); + + echo json_encode(['Code'=>30000,]); + } }