chore: finalize license compliance cleanup
This commit is contained in:
@@ -8,10 +8,9 @@ namespace app\services\system;
|
||||
|
||||
use app\services\BaseServices;
|
||||
use crmeb\exceptions\AdminException;
|
||||
use crmeb\services\HttpService;
|
||||
|
||||
/**
|
||||
* 商业授权
|
||||
* 原厂授权申请入口已禁用。
|
||||
* Class SystemAuthServices
|
||||
* @package app\services\system
|
||||
*/
|
||||
@@ -19,24 +18,13 @@ class SystemAuthServices extends BaseServices
|
||||
{
|
||||
|
||||
/**
|
||||
* 申请授权
|
||||
* 原厂授权申请入口已禁用。
|
||||
* @param array $data
|
||||
* @param $headerData
|
||||
* @return bool
|
||||
*/
|
||||
public function authApply(array $data, $headerData)
|
||||
{
|
||||
$res = HttpService::postRequest('http://authorize.crmeb.net/api/auth_apply', $data, $headerData);
|
||||
if ($res === false) {
|
||||
throw new AdminException('申请失败,服务器没有响应!');
|
||||
}
|
||||
$res = json_decode($res, true);
|
||||
if (isset($res['status'])) {
|
||||
if ($res['status'] == 400) {
|
||||
throw new AdminException($res['msg'] ?? "申请失败");
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
throw new AdminException('CRMEB 原厂授权申请入口已禁用,请使用本项目自有版权配置');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user