From 784a3edb4837896de5e5a7b6d839de8d5660f9ca 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 22:38:25 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E6=B5=8B=E8=B4=A6=E5=8F=B7=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/Account.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/app/api/controller/Account.php b/app/api/controller/Account.php index cabab5e..e691fd1 100644 --- a/app/api/controller/Account.php +++ b/app/api/controller/Account.php @@ -35,6 +35,32 @@ class Account $info = $account_model->getOne(['Account'=>$data['account'],"ProductId" => $data['product'],'UserId'=>$user_info['Id']],'ProductName,PackageName,Account,ConnectCount,StartTime,EndTime'); + $return_data = [ + 'Code' => 0, + 'Data' => $info, + 'Message' => '', + ]; + echo json_encode($return_data); + } + public function acctExist() + { + //获取传递的数据 + $data = $_GET; + $apikey = $data['apikey']; + $user_info = $user_model->getOne(['apikey'=>$apikey]); + if (empty($user_info)){ + $return_data = [ + 'Code' => 0, + 'Message' => 'apikey不符合规范', + ]; + echo json_encode($return_data); + die; + } + + $account_model = new ProductAccount; + $info = $account_model->getOne(['Account'=>$data['account']],'ProductName,PackageName,Account,ConnectCount,StartTime,EndTime'); + + $return_data = [ 'Code' => 0, 'Data' => $info,