作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

... ... @@ -55,7 +55,7 @@ class InitProject extends Command
$project = Project::find($item['data']['project_id']);
$project_logic = new ProjectLogic();
//初始化数据库
if(!empty($project['mysql_id'])){
if(!empty($project['mysql_id']) && ($project['type'] == 1)){
$project_logic->initializationMysql($project['id']);
}
//初始账号
... ...
... ... @@ -31,6 +31,10 @@ class NoticeController extends BaseController
$referrer_url = $request->input('referrer_url');
$user_agent = $request->input('user_agent');
// 数据占时不入库, 些日志分析数据
file_put_contents(storage_path('logs/trafficVisit.log'), var_export($request->all(), true) . PHP_EOL, FILE_APPEND);
// return $this->success([]);
if (empty($ip))
return $this->error('IP不能为空');
if (empty($url))
... ... @@ -38,7 +42,6 @@ class NoticeController extends BaseController
if (empty($user_agent))
return $this->error('请求头信息user_agent不能为空');
//
$url_array = parse_url($url);
$array = [
'ip' => $ip,
... ...
... ... @@ -212,8 +212,8 @@ class ProofreadingController extends BaseController
$data[] = $trimmedString;
}
$data = array_values($data);
$uniqueArray = array_unique($data);
$data = array_values($uniqueArray);
// $uniqueArray = array_unique($data);
// $data = array_values($uniqueArray);
return $data;
}
... ...
... ... @@ -105,7 +105,7 @@ class ProjectServer
$created_at = date('Y-m-d H:i:s');
self::initGroup($project_id,$created_at);
//初始化单页
self::init404Page($project_id);
self::init404Page($project_id,$created_at);
//初始化模块数据
self::initModule($project_id);
DB::disconnect('custom_mysql');
... ... @@ -172,7 +172,7 @@ class ProjectServer
* @method :post
* @time :2023/12/29 9:32
*/
public function init404Page($project_id){
public function init404Page($project_id,$created_at){
$info = DB::connection('custom_mysql')->table('gl_web_custom_template')->first();
if(empty($info)) {
$main_404_html = '<main>
... ... @@ -208,7 +208,10 @@ class ProjectServer
'status' => 1,
'url' => BCustomTemplate::NOT_FOUND_PAGE_URL,
'html' => $main_404_html,
'html_style' => '<style id="globalsojs-styles"></style>','title' => '404-Page not found', 'description' => 'Sorry. The page has either moved or cannot be found.', 'created_at' => $created_at, 'updated_at' => $created_at];
'html_style' => '<style id="globalsojs-styles"></style>',
'title' => '404-Page not found',
'description' => 'Sorry. The page has either moved or cannot be found.',
'created_at' => $created_at, 'updated_at' => $created_at];
$id = DB::connection('custom_mysql')->table('gl_web_custom_template')->insertGetId($data);
//路由
$info = DB::connection('custom_mysql')->table('gl_route_map')->first();
... ...
... ... @@ -357,7 +357,7 @@ Route::middleware(['aloginauth'])->group(function () {
//无需登录验证的路由组
Route::group([], function () {
Route::any('/login', [Aside\LoginController::class, 'login'])->name('admin.login.white');
Route::any('/image/{hash}/{w?}/{h?}', [\App\Http\Controllers\File\ImageController::class, 'index'])->name('admin.image_show');
// Route::any('/image/{hash}/{w?}/{h?}', [\App\Http\Controllers\File\ImageController::class, 'index'])->name('admin.image_show');
Route::any('/file/{hash}', [\App\Http\Controllers\File\FileController::class, 'index'])->name('admin.file_show');
Route::any('/download_files', [\App\Http\Controllers\File\FileController::class, 'downLoad'])->name('admin.files_downLoad');//导出文件
Route::any('/download_images', [\App\Http\Controllers\File\ImageController::class, 'downLoad'])->name('admin.images_downLoad');//导出图片
... ...