From cf3a44235e16f5eea6ca4bb615e8b882a52945c2 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 16:35:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E7=94=A8=E6=88=B7=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=88=A0=E9=99=A4=E8=B4=A6=E5=8F=B7=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/api/controller/Account.php | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/app/api/controller/Account.php b/app/api/controller/Account.php index c04ef92..cabab5e 100644 --- a/app/api/controller/Account.php +++ b/app/api/controller/Account.php @@ -261,4 +261,40 @@ class Account echo $result; } + + //退款 + public function deleteAcct() + { + $data = $_GET; + $apikey = $data['apikey']; + $user_model = new User; + $user_info = $user_model->getOne(['apikey'=>$apikey]); + $account_model = new ProductAccount; + + if ($user_info['Id'] != 163642) { + die; + } + + $where = [ + 'UserId' => $user_info['Id'], + 'account' => $data['account'], + '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'=>10000,'Message' => '删除成功']); + } } \ No newline at end of file