添加解除屏蔽接口

This commit is contained in:
“wanyongkang”
2025-05-23 14:43:30 +08:00
parent bbf663365d
commit 9695c0114a

View File

@@ -10,9 +10,26 @@ class Account
public function __construct ()
{
error_reporting(0);
ini_set('display_errors', 0);
if(empty($_GET['apikey'])){
die;
}
$data = $_GET;
$apikey = $data['apikey'];
$user_model = new User;
$user_info = $user_model->getOne(['apikey'=>$apikey]);
if (empty($user_info)){
$return_data = [
'Code' => 0,
'Message' => 'apikey不符合规范',
];
echo json_encode($return_data);
die;
}
}
//查询账号信息 ?apikey=1232455165&product=5&account=test1231
public function queryAccount()
@@ -278,7 +295,7 @@ class Account
{
//获取传递的数据
$data = $_GET;
$url = 'https://juip.com/api/course/v1/order/ApiRefund';
$url = 'http://localhost:5000/api/course/v1/order/ApiRefund';
$params = array(
"apikey" => $data['apikey'],
@@ -336,4 +353,40 @@ class Account
echo json_encode(['Code'=>10000,'Message' => '删除成功']);
}
//解除账号限制
public function openlimit() {
$data = $_GET;
if(!$data){
die;
}
$data = $_GET;
$apikey = $data['apikey'];
$user_model = new User;
$user_info = $user_model->getOne(['apikey'=>$apikey]);
$account_model = new ProductAccount;
$where = [
'UserId' => $user_info['Id'],
'account' => $data['account'],
'DeleteTag' => 0
];
$account_info = $account_model->getOne($where);
if ($account_info) {
// dump($data);die;
if ($data['productId'] == 18) {
$url = "http://rds-api.juip.com/api/agent/openIM/account/".$data['account'];
} elseif ($data['productId'] == 29) {
$url = "http://124.236.113.166:18702/api/agent/openIM/apikey/80cf4f64e990b78a9fc5eb/account/".$data['account'];
} elseif ($data['productId'] == 3 || $data['productId'] == 26) {
$url = "http://106.119.166.87:18702/api/agent/openIM/apikey/80cf4f64e990b78a9fc5eb/account/".$data['account'];
}
linkcurl($url,'GET',[],[],0);
echo json_encode(['Code'=>10000,'Message' => '解除成功']);
} else {
echo json_encode(['Code'=>-10000,'Message' => '账号不存在']);
}
}
}