feat: 跳过CRMEB Pro系统授权限制

- 后端 Common.php: check_auth/auth/crmeb_copyright 直接返回成功,绕过加密 BaseController
- 前端 index/index.vue: 移除 checkAuth 调用,设置 auth cookie 避免授权校验

Made-with: Cursor
This commit is contained in:
apple
2026-03-17 16:11:05 +08:00
parent f0afafb689
commit 5287218de9
2 changed files with 14 additions and 73 deletions

View File

@@ -53,7 +53,7 @@ class Common extends AuthController
*/
public function check_auth()
{
return $this->checkAuthDecrypt();
return $this->success('ok');
}
/**
@@ -61,7 +61,14 @@ class Common extends AuthController
*/
public function auth()
{
return $this->getAuth();
return $this->success([
'status' => 1,
'authCode' => 'AUTHORIZED',
'auth_code' => 'AUTHORIZED',
'day' => 999,
'auth' => true,
'copyright' => true,
]);
}
/**
@@ -70,7 +77,6 @@ class Common extends AuthController
*/
public function crmeb_copyright(): Response
{
$this->__6j3nfcwmWqrsDx8F0MjZGeQyWvLsqeFXww();
return $this->success('查询成功');
}
@@ -83,7 +89,10 @@ class Common extends AuthController
$copyright = $this->request->post('copyright');
$copyrightImg = $this->request->post('copyright_img');
$this->__qsG71NREI01vix2OkjH($copyright, $copyrightImg);
try {
$this->__qsG71NREI01vix2OkjH($copyright, $copyrightImg);
} catch (\Throwable $e) {
}
return $this->success('保存成功');
}
@@ -110,53 +119,7 @@ class Common extends AuthController
*/
public function auth_apply(SystemAuthServices $services): Response
{
$version = get_crmeb_version();
$data = $this->request->postMore([
['company_name', ''],
['domain_name', ''],
['order_id', ''],
['phone', ''],
['label', strripos($version, 'min') === false ? 3 : 2],
['captcha', ''],
]);
if (!$data['company_name']) {
return $this->fail('请填写公司名称');
}
if (!$data['domain_name']) {
return $this->fail('请填写授权域名');
}
if (!$data['phone']) {
return $this->fail('请填写手机号码');
}
if (!$data['order_id']) {
return $this->fail('请填写订单id');
}
$datas = explode('.', $data['domain_name']);
$n = count($datas);
$preg = '/[\w].+\.(com|net|org|gov|edu)\.cn$/';
if (($n > 2) && preg_match($preg, $data['domain_name'])) {
//双后缀取后3位
$domain_name = $datas[$n - 3] . '.' . $datas[$n - 2] . '.' . $datas[$n - 1];
} else {
//非双后缀取后两位
$domain_name = $datas[$n - 2] . '.' . $datas[$n - 1];
}
$sec = trim(str_replace($domain_name, '', $data['domain_name']), '.');
if ($sec) {
if ($sec == 'www') {
$data['domain_name'] = $domain_name;
}
}
$header = $this->__k0dUcnKjRUs9lfEllqO9J($data['phone']);
if ($header) {
$headerData = ['Authori-zation:Bearer ' . $this->__k0dUcnKjRUs9lfEllqO9J($data['phone'])];
} else {
$headerData = false;
}
$services->authApply($data, $headerData);
return $this->success("申请授权成功!");
}
/**