作者 lyh

扩展模块不允许使用默认路由

<?php
/**
* @remark :
* @name :WhiteHatReportController.php
* @name :AuthorityScoreController.php
* @author :lyh
* @method :post
* @time :2025/7/1 11:11
... ... @@ -11,22 +11,22 @@ namespace App\Http\Controllers\Bside\BCom;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\Com\WhiteHatReportLogic;
use App\Http\Logic\Bside\BCom\AuthorityScoreLogic;
use Illuminate\Http\Request;
/**
* @remark :白帽版本报表
* @name :WhiteHatReportController
* @name :AuthorityScoreController
* @author :lyh
* @method :post
* @time :2025/7/1 11:12
*/
class WhiteHatReportController extends BaseController
class AuthorityScoreController extends BaseController
{
public function __construct(Request $request)
{
parent::__construct($request);
$this->logic = new WhiteHatReportLogic();
$this->logic = new AuthorityScoreLogic();
}
/**
... ... @@ -36,13 +36,13 @@ class WhiteHatReportController extends BaseController
* @method :post
* @time :2025/7/1 11:13
*/
public function whiteHatReportInfo(){
public function AuthorityScoreInfo(){
$this->request->validate([
'date'=>'required',
], [
'date.required' => '请选择报表时间',
]);
$data = $this->logic->LogicWhiteHatReportInfo();
$data = $this->logic->LogicAuthorityScoreInfo();
$this->response('success',Code::SUCCESS,$data);
}
}
... ...
<?php
/**
* @remark :
* @name :WhiteHatReportLogic.php
* @name :AuthorityScoreLogic.php
* @author :lyh
* @method :post
* @time :2025/7/1 11:15
*/
namespace App\Http\Logic\Bside\Com;
namespace App\Http\Logic\Bside\BCom;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\Ai\AiBlog;
... ... @@ -17,12 +17,12 @@ use App\Models\SeoSetting\LinkData;
/**
* @remark :报表详情数据
* @name :WhiteHatReportLogic
* @name :AuthorityScoreLogic
* @author :lyh
* @method :post
* @time :2025/7/1 11:15
*/
class WhiteHatReportLogic extends BaseLogic
class AuthorityScoreLogic extends BaseLogic
{
public function __construct()
{
... ... @@ -37,7 +37,7 @@ class WhiteHatReportLogic extends BaseLogic
* @method :post
* @time :2025/7/1 11:43
*/
public function LogicWhiteHatReportInfo(){
public function LogicAuthorityScoreInfo(){
$data = [];
$bSeoModel = new RankDataBmseo();
$bSeoInfo = $bSeoModel->read(['project_id'=>$this->user['project_id'],'lang'=>''],['first_num','first_page_num','first_three_pages_num','first_five_pages_num','first_ten_pages_num','indexed_pages_num']);
... ...
... ... @@ -746,7 +746,7 @@ Route::middleware(['bloginauth'])->group(function () {
});
//白帽版本
Route::prefix('white_hat_report')->group(function () {
Route::any('/whiteHatReportInfo', [\App\Http\Controllers\Bside\BCom\WhiteHatReportController::class,'whiteHatReportInfo'])->name('white_hat_report_whiteHatReportInfo');
Route::any('/whiteHatReportInfo', [\App\Http\Controllers\Bside\BCom\AuthorityScoreController::class,'whiteHatReportInfo'])->name('white_hat_report_whiteHatReportInfo');
});
});
//无需登录验证的路由组
... ...