监测账号是否存在
This commit is contained in:
@@ -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');
|
$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 = [
|
$return_data = [
|
||||||
'Code' => 0,
|
'Code' => 0,
|
||||||
'Data' => $info,
|
'Data' => $info,
|
||||||
|
|||||||
Reference in New Issue
Block a user