Merge remote-tracking branch 'origin/master' into akun
正在显示
20 个修改的文件
包含
496 行增加
和
41 行删除
| @@ -33,7 +33,7 @@ class UpgradeProjectCount extends Command | @@ -33,7 +33,7 @@ class UpgradeProjectCount extends Command | ||
| 33 | protected $description = '升级项目统计'; | 33 | protected $description = '升级项目统计'; |
| 34 | 34 | ||
| 35 | public function handle(){ | 35 | public function handle(){ |
| 36 | - $project_id = 439; | 36 | + $project_id = 450; |
| 37 | ProjectServer::useProject($project_id); | 37 | ProjectServer::useProject($project_id); |
| 38 | $this->count($project_id); | 38 | $this->count($project_id); |
| 39 | DB::disconnect('custom_mysql'); | 39 | DB::disconnect('custom_mysql'); |
| @@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
| 10 | namespace App\Console\Commands\MonthlyCount; | 10 | namespace App\Console\Commands\MonthlyCount; |
| 11 | 11 | ||
| 12 | use App\Helper\FormGlobalsoApi; | 12 | use App\Helper\FormGlobalsoApi; |
| 13 | +use App\Models\Com\UpdateOldInfo; | ||
| 13 | use App\Models\HomeCount\MonthCount; | 14 | use App\Models\HomeCount\MonthCount; |
| 14 | use App\Models\Project\Project; | 15 | use App\Models\Project\Project; |
| 15 | use App\Models\Visit\Visit; | 16 | use App\Models\Visit\Visit; |
| @@ -35,8 +36,10 @@ class UpgradeProjectCount extends Command | @@ -35,8 +36,10 @@ class UpgradeProjectCount extends Command | ||
| 35 | protected $description = '升级项目统计'; | 36 | protected $description = '升级项目统计'; |
| 36 | 37 | ||
| 37 | public function handle(){ | 38 | public function handle(){ |
| 38 | - $project_id = 439; | ||
| 39 | - $url = 'www.cnzyl.com'; | 39 | + $project_id = 450; |
| 40 | + $oldModel = new UpdateOldInfo(); | ||
| 41 | + $info = $oldModel->read(['project_id'=>$project_id]); | ||
| 42 | + $url = $info['old_domain_online']; | ||
| 40 | ProjectServer::useProject($project_id); | 43 | ProjectServer::useProject($project_id); |
| 41 | $this->count($project_id,$url); | 44 | $this->count($project_id,$url); |
| 42 | 45 |
| @@ -50,7 +50,7 @@ class UpdateProductCategory extends Command | @@ -50,7 +50,7 @@ class UpdateProductCategory extends Command | ||
| 50 | public function handle(){ | 50 | public function handle(){ |
| 51 | //获取所有项目 | 51 | //获取所有项目 |
| 52 | $projectModel = new Project(); | 52 | $projectModel = new Project(); |
| 53 | - $list = $projectModel->list(['type'=>['in',[1,2,3,4]]],'id',['id']); | 53 | + $list = $projectModel->list(['id'=>['in',[218]]],'id',['id']); |
| 54 | echo date('Y-m-d H:i:s') . ' start: ' . json_encode($list) . PHP_EOL; | 54 | echo date('Y-m-d H:i:s') . ' start: ' . json_encode($list) . PHP_EOL; |
| 55 | try { | 55 | try { |
| 56 | foreach ($list as $v) { | 56 | foreach ($list as $v) { |
| @@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
| 10 | namespace App\Console\Commands; | 10 | namespace App\Console\Commands; |
| 11 | 11 | ||
| 12 | use App\Helper\Arr; | 12 | use App\Helper\Arr; |
| 13 | +use App\Helper\Translate; | ||
| 13 | use App\Models\CustomModule\CustomModuleCategory; | 14 | use App\Models\CustomModule\CustomModuleCategory; |
| 14 | use App\Models\CustomModule\CustomModuleContent; | 15 | use App\Models\CustomModule\CustomModuleContent; |
| 15 | use App\Models\Product\CategoryRelated; | 16 | use App\Models\Product\CategoryRelated; |
| @@ -54,16 +55,16 @@ class UpdateRoute extends Command | @@ -54,16 +55,16 @@ class UpdateRoute extends Command | ||
| 54 | */ | 55 | */ |
| 55 | public function handle(){ | 56 | public function handle(){ |
| 56 | $projectModel = new Project(); | 57 | $projectModel = new Project(); |
| 57 | - $list = $projectModel->list(['id'=>99]); | 58 | + $list = $projectModel->list(['id'=>426]); |
| 58 | foreach ($list as $v){ | 59 | foreach ($list as $v){ |
| 59 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; | 60 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; |
| 60 | ProjectServer::useProject($v['id']); | 61 | ProjectServer::useProject($v['id']); |
| 61 | // $this->getProduct(); | 62 | // $this->getProduct(); |
| 62 | -// $this->setProductKeyword(); | 63 | + $this->setProductKeyword(); |
| 63 | // $this->getRouteMap(); | 64 | // $this->getRouteMap(); |
| 64 | // $this->getProductCategory(); | 65 | // $this->getProductCategory(); |
| 65 | // $this->delRouteMap(); | 66 | // $this->delRouteMap(); |
| 66 | - $this->setCustomRoute($v['id']); | 67 | +// $this->setCustomRoute($v['id']); |
| 67 | DB::disconnect('custom_mysql'); | 68 | DB::disconnect('custom_mysql'); |
| 68 | } | 69 | } |
| 69 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; | 70 | echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; |
| @@ -100,10 +101,15 @@ class UpdateRoute extends Command | @@ -100,10 +101,15 @@ class UpdateRoute extends Command | ||
| 100 | if(!empty($v['route'])){ | 101 | if(!empty($v['route'])){ |
| 101 | $tag = "-tag"; | 102 | $tag = "-tag"; |
| 102 | if (!(substr($v['route'], -strlen($tag)) === $tag)) { | 103 | if (!(substr($v['route'], -strlen($tag)) === $tag)) { |
| 103 | - $route = $v['route'].$tag; | 104 | +// $route = Translate::tran($v['route'], 'en').$tag; |
| 104 | // 如果不是以 '-tag' 结尾,则拼接上 '-tag' | 105 | // 如果不是以 '-tag' 结尾,则拼接上 '-tag' |
| 106 | + $route = $v['route'].$tag; | ||
| 105 | $route = RouteMap::setRoute($route, RouteMap::SOURCE_PRODUCT_KEYWORD, $v['id'], $v['project_id']); | 107 | $route = RouteMap::setRoute($route, RouteMap::SOURCE_PRODUCT_KEYWORD, $v['id'], $v['project_id']); |
| 106 | $keywordModel->edit(['route'=>$route],['id'=>$v['id']]); | 108 | $keywordModel->edit(['route'=>$route],['id'=>$v['id']]); |
| 109 | +// }else{ | ||
| 110 | +// $route = Translate::tran($v['title'], 'en').$tag; | ||
| 111 | +// $route = RouteMap::setRoute($route, RouteMap::SOURCE_PRODUCT_KEYWORD, $v['id'], $v['project_id']); | ||
| 112 | +// $keywordModel->edit(['route'=>$route],['id'=>$v['id']]); | ||
| 107 | } | 113 | } |
| 108 | }else{ | 114 | }else{ |
| 109 | echo date('Y-m-d H:i:s') . 'id :'.$v['id'] . PHP_EOL; | 115 | echo date('Y-m-d H:i:s') . 'id :'.$v['id'] . PHP_EOL; |
| @@ -287,4 +287,25 @@ class BlogController extends BaseController | @@ -287,4 +287,25 @@ class BlogController extends BaseController | ||
| 287 | $logic->setAllSort(); | 287 | $logic->setAllSort(); |
| 288 | $this->response('success'); | 288 | $this->response('success'); |
| 289 | } | 289 | } |
| 290 | + | ||
| 291 | + /** | ||
| 292 | + * @remark :批量设置产品分类及状态 | ||
| 293 | + * @name :batchSetCategory | ||
| 294 | + * @author :lyh | ||
| 295 | + * @method :post | ||
| 296 | + * @time :2023/8/15 17:51 | ||
| 297 | + */ | ||
| 298 | + public function batchSetCategory(BlogLogic $logic){ | ||
| 299 | + $this->request->validate([ | ||
| 300 | + 'id'=>'required', | ||
| 301 | + 'category_id'=>'required', | ||
| 302 | + 'status'=>'required' | ||
| 303 | + ],[ | ||
| 304 | + 'id.required' => '产品ID不能为空', | ||
| 305 | + 'category_id.required' => '分类ID不能为空', | ||
| 306 | + 'status.required'=>'状态不能为空' | ||
| 307 | + ]); | ||
| 308 | + $logic->batchSetCategory(); | ||
| 309 | + $this->response('success'); | ||
| 310 | + } | ||
| 290 | } | 311 | } |
| @@ -299,9 +299,4 @@ class LoginController extends BaseController | @@ -299,9 +299,4 @@ class LoginController extends BaseController | ||
| 299 | } | 299 | } |
| 300 | return $data; | 300 | return $data; |
| 301 | } | 301 | } |
| 302 | - | ||
| 303 | - public function ceshi(){ | ||
| 304 | - $ceshi = Translate::tran('Полностью Сварной Пластинчатый Теплообменник', 'en'); | ||
| 305 | - return $ceshi; | ||
| 306 | - } | ||
| 307 | } | 302 | } |
| @@ -274,4 +274,26 @@ class NewsController extends BaseController | @@ -274,4 +274,26 @@ class NewsController extends BaseController | ||
| 274 | $newsLogic->setAllSort(); | 274 | $newsLogic->setAllSort(); |
| 275 | $this->response('success'); | 275 | $this->response('success'); |
| 276 | } | 276 | } |
| 277 | + | ||
| 278 | + | ||
| 279 | + /** | ||
| 280 | + * @remark :批量设置产品分类及状态 | ||
| 281 | + * @name :batchSetCategory | ||
| 282 | + * @author :lyh | ||
| 283 | + * @method :post | ||
| 284 | + * @time :2023/8/15 17:51 | ||
| 285 | + */ | ||
| 286 | + public function batchSetCategory(NewsLogic $logic){ | ||
| 287 | + $this->request->validate([ | ||
| 288 | + 'id'=>'required', | ||
| 289 | + 'category_id'=>'required', | ||
| 290 | + 'status'=>'required' | ||
| 291 | + ],[ | ||
| 292 | + 'id.required' => '产品ID不能为空', | ||
| 293 | + 'category_id.required' => '分类ID不能为空', | ||
| 294 | + 'status.required'=>'状态不能为空' | ||
| 295 | + ]); | ||
| 296 | + $logic->batchSetCategory(); | ||
| 297 | + $this->response('success'); | ||
| 298 | + } | ||
| 277 | } | 299 | } |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :TranslateController.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/1/12 9:39 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Controllers\Bside\Setting; | ||
| 11 | + | ||
| 12 | +use App\Enums\Common\Code; | ||
| 13 | +use App\Http\Controllers\Bside\BaseController; | ||
| 14 | +use App\Http\Logic\Bside\Setting\TranslateLogic; | ||
| 15 | +use App\Models\WebSetting\WebLanguage; | ||
| 16 | + | ||
| 17 | +class TranslateController extends BaseController | ||
| 18 | +{ | ||
| 19 | + /** | ||
| 20 | + * @remark :获取翻译校队列表 | ||
| 21 | + * @name :lists | ||
| 22 | + * @author :lyh | ||
| 23 | + * @method :post | ||
| 24 | + * @time :2024/1/12 9:39 | ||
| 25 | + */ | ||
| 26 | + public function lists(TranslateLogic $logic){ | ||
| 27 | + $this->request->validate([ | ||
| 28 | + 'type'=>'required', | ||
| 29 | + 'language_id'=>'required', | ||
| 30 | + 'url'=>'required', | ||
| 31 | + ],[ | ||
| 32 | + 'type.required' => 'type不能为空', | ||
| 33 | + 'language_id.required' => 'language_id不能为空', | ||
| 34 | + 'url.required' => 'url不能为空', | ||
| 35 | + ]); | ||
| 36 | + $data = $logic->getTranslateList(); | ||
| 37 | + $this->response('success',Code::SUCCESS,$data); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * @remark :图片列表 | ||
| 42 | + * @name :imageList | ||
| 43 | + * @author :lyh | ||
| 44 | + * @method :post | ||
| 45 | + * @time :2024/1/12 11:18 | ||
| 46 | + */ | ||
| 47 | + public function imageList(TranslateLogic $logic){ | ||
| 48 | + $this->request->validate([ | ||
| 49 | + 'type'=>'required', | ||
| 50 | + 'language_id'=>'required', | ||
| 51 | + 'url'=>'required', | ||
| 52 | + ],[ | ||
| 53 | + 'type.required' => 'type不能为空', | ||
| 54 | + 'language_id.required' => 'language_id不能为空', | ||
| 55 | + 'url.required' => 'url不能为空', | ||
| 56 | + ]); | ||
| 57 | + $data = $logic->getTranslateImageList(); | ||
| 58 | + $this->response('success',Code::SUCCESS,$data); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * @remark :保存数据 | ||
| 63 | + * @name :save | ||
| 64 | + * @author :lyh | ||
| 65 | + * @method :post | ||
| 66 | + * @time :2024/1/12 11:19 | ||
| 67 | + */ | ||
| 68 | + public function save(TranslateLogic $logic){ | ||
| 69 | + $this->request->validate([ | ||
| 70 | + 'type'=>'required', | ||
| 71 | + 'language_id'=>'required', | ||
| 72 | + 'url'=>'required', | ||
| 73 | + 'alias'=>'required', | ||
| 74 | + ],[ | ||
| 75 | + 'type.required' => 'type不能为空', | ||
| 76 | + 'language_id.required' => 'language_id不能为空', | ||
| 77 | + 'url.required' => 'url不能为空', | ||
| 78 | + 'alias.required' => 'url不能为空', | ||
| 79 | + ]); | ||
| 80 | + $logic->translateSave(); | ||
| 81 | + $this->response('success'); | ||
| 82 | + } | ||
| 83 | +} |
| @@ -38,7 +38,7 @@ class InitHtmlController extends BaseController | @@ -38,7 +38,7 @@ class InitHtmlController extends BaseController | ||
| 38 | 'type.required' => '类型不能为空', | 38 | 'type.required' => '类型不能为空', |
| 39 | ]); | 39 | ]); |
| 40 | $html = $logic->getDetailHtml(); | 40 | $html = $logic->getDetailHtml(); |
| 41 | - $this->response('success',Code::SUCCESS,['html'=>$html]); | 41 | + $this->response('success',Code::SUCCESS,$html); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| @@ -116,7 +116,7 @@ class CustomModuleLogic extends BaseLogic | @@ -116,7 +116,7 @@ class CustomModuleLogic extends BaseLogic | ||
| 116 | public function checkIsName($name,$id = 0){ | 116 | public function checkIsName($name,$id = 0){ |
| 117 | $param['name'] = $name; | 117 | $param['name'] = $name; |
| 118 | if(!empty($id)){ | 118 | if(!empty($id)){ |
| 119 | - $param['id'] = ['id'=>['!=',$id],]; | 119 | + $param['id'] = ['id'=>['!=',$id]]; |
| 120 | } | 120 | } |
| 121 | $info = (new CustomModule())->read($param); | 121 | $info = (new CustomModule())->read($param); |
| 122 | if($info !== false){ | 122 | if($info !== false){ |
| @@ -60,6 +60,12 @@ class CreateKeywordLogic extends BaseLogic | @@ -60,6 +60,12 @@ class CreateKeywordLogic extends BaseLogic | ||
| 60 | if($info !== false){ | 60 | if($info !== false){ |
| 61 | $this->fail('当前名称已存在'); | 61 | $this->fail('当前名称已存在'); |
| 62 | } | 62 | } |
| 63 | + }else{ | ||
| 64 | + $data['id'] = ['!=',$param['id']]; | ||
| 65 | + $info = $this->model->read($data); | ||
| 66 | + if($info !== false){ | ||
| 67 | + $this->fail('当前名称已存在'); | ||
| 68 | + } | ||
| 63 | } | 69 | } |
| 64 | return $this->success($data); | 70 | return $this->success($data); |
| 65 | } | 71 | } |
| @@ -149,7 +149,7 @@ class BTemplateLogic extends BaseLogic | @@ -149,7 +149,7 @@ class BTemplateLogic extends BaseLogic | ||
| 149 | return false; | 149 | return false; |
| 150 | } | 150 | } |
| 151 | //TODO::默认模块定制 | 151 | //TODO::默认模块定制 |
| 152 | - $html = $this->isCustomizedPage($source,$is_list);//获取定制页面的html | 152 | + $html = $this->isCustomizedPage($source,$is_list,$is_custom);//获取定制页面的html |
| 153 | if(!empty($html)){ | 153 | if(!empty($html)){ |
| 154 | return $this->success(['html'=>$html,'template_id'=>$template_id]); | 154 | return $this->success(['html'=>$html,'template_id'=>$template_id]); |
| 155 | } | 155 | } |
| @@ -361,7 +361,7 @@ class BTemplateLogic extends BaseLogic | @@ -361,7 +361,7 @@ class BTemplateLogic extends BaseLogic | ||
| 361 | 'template_id' => $template_id, | 361 | 'template_id' => $template_id, |
| 362 | 'project_id' => $this->user['project_id'], | 362 | 'project_id' => $this->user['project_id'], |
| 363 | 'type'=>$type, | 363 | 'type'=>$type, |
| 364 | - 'is_custom'=>$is_custom, | 364 | + 'is_custom'=>0, |
| 365 | ]; | 365 | ]; |
| 366 | $commonTemplateModel = new BTemplateCommon(); | 366 | $commonTemplateModel = new BTemplateCommon(); |
| 367 | $commonInfo = $commonTemplateModel->read($data); | 367 | $commonInfo = $commonTemplateModel->read($data); |
| @@ -38,6 +38,7 @@ class InitHtmlLogic extends BaseLogic | @@ -38,6 +38,7 @@ class InitHtmlLogic extends BaseLogic | ||
| 38 | $template_id = $this->getTemplateId(); | 38 | $template_id = $this->getTemplateId(); |
| 39 | $is_custom = $this->param['is_custom'] ?? 0;//TODO::1:代表扩展模块 | 39 | $is_custom = $this->param['is_custom'] ?? 0;//TODO::1:代表扩展模块 |
| 40 | $is_list = $this->param['is_list'] ?? 0;//TODO::1:代表分类列表模块 | 40 | $is_list = $this->param['is_list'] ?? 0;//TODO::1:代表分类列表模块 |
| 41 | + $data = array(); | ||
| 41 | //获取设置的默认中间部分 | 42 | //获取设置的默认中间部分 |
| 42 | $bTemplateMainModel = new BTemplateMain(); | 43 | $bTemplateMainModel = new BTemplateMain(); |
| 43 | $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'],'is_list'=>$is_list,'is_custom'=>$is_custom]); | 44 | $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'],'is_list'=>$is_list,'is_custom'=>$is_custom]); |
| @@ -47,11 +48,14 @@ class InitHtmlLogic extends BaseLogic | @@ -47,11 +48,14 @@ class InitHtmlLogic extends BaseLogic | ||
| 47 | }else{ | 48 | }else{ |
| 48 | $main_html = $mainInfo['main_html']; | 49 | $main_html = $mainInfo['main_html']; |
| 49 | $main_style = $mainInfo['main_css']; | 50 | $main_style = $mainInfo['main_css']; |
| 51 | + $data['id'] = $mainInfo['id']; | ||
| 52 | + $data['updated_at'] = $mainInfo['updated_at']; | ||
| 50 | } | 53 | } |
| 51 | $commonInfo = $this->getCommonHtml($this->param['type'],$is_list,$template_id,$is_custom); //获取头部 | 54 | $commonInfo = $this->getCommonHtml($this->param['type'],$is_list,$template_id,$is_custom); //获取头部 |
| 52 | $html = $commonInfo['head_css'].$main_style.$commonInfo['footer_css'].$commonInfo['other'].$commonInfo['head_html'].$main_html.$commonInfo['footer_html']; | 55 | $html = $commonInfo['head_css'].$main_style.$commonInfo['footer_css'].$commonInfo['other'].$commonInfo['head_html'].$main_html.$commonInfo['footer_html']; |
| 53 | $html = $this->getHeadFooter($html);//组装数据 | 56 | $html = $this->getHeadFooter($html);//组装数据 |
| 54 | - return $this->success($html); | 57 | + $data['html'] = $html; |
| 58 | + return $this->success($data); | ||
| 55 | } | 59 | } |
| 56 | 60 | ||
| 57 | /** | 61 | /** |
| @@ -259,14 +263,20 @@ class InitHtmlLogic extends BaseLogic | @@ -259,14 +263,20 @@ class InitHtmlLogic extends BaseLogic | ||
| 259 | */ | 263 | */ |
| 260 | public function getCustomizedHtml(){ | 264 | public function getCustomizedHtml(){ |
| 261 | $is_list = $this->param['is_list'] ?? 0; | 265 | $is_list = $this->param['is_list'] ?? 0; |
| 266 | + $is_custom = $this->param['is_custom'] ?? 0; | ||
| 262 | $bTemplateMainModel = new BTemplateMain(); | 267 | $bTemplateMainModel = new BTemplateMain(); |
| 263 | - $info = $bTemplateMainModel->read(['type'=>$this->param['type'],'is_list'=>$is_list]); | 268 | + $info = $bTemplateMainModel->read(['type'=>$this->param['type'],'is_custom'=>$is_custom,'is_list'=>$is_list]); |
| 264 | if($info === false){ | 269 | if($info === false){ |
| 265 | $html = ''; | 270 | $html = ''; |
| 266 | }else{ | 271 | }else{ |
| 267 | - $type = $this->getCustomizedType($this->param['type'],$is_list); | 272 | + //扩展模块获取头部 |
| 273 | + if($is_custom == BTemplate::IS_CUSTOM){ | ||
| 274 | + $type = $this->param['type']; | ||
| 275 | + }else{ | ||
| 276 | + $type = $this->getCustomizedType($this->param['type'],$is_list); | ||
| 277 | + } | ||
| 268 | $commonTemplateModel = new BTemplateCommon(); | 278 | $commonTemplateModel = new BTemplateCommon(); |
| 269 | - $commonInfo = $commonTemplateModel->read(['template_id' => 0,'type'=>$type]); | 279 | + $commonInfo = $commonTemplateModel->read(['template_id' => 0,'type'=>$type,'is_custom'=>$is_custom,'is_list'=>$is_list]); |
| 270 | if($commonInfo !== false){ | 280 | if($commonInfo !== false){ |
| 271 | $info['main_html'] = $this->handleAllHtml($commonInfo,$info['main_html']); | 281 | $info['main_html'] = $this->handleAllHtml($commonInfo,$info['main_html']); |
| 272 | } | 282 | } |
| @@ -303,21 +313,23 @@ class InitHtmlLogic extends BaseLogic | @@ -303,21 +313,23 @@ class InitHtmlLogic extends BaseLogic | ||
| 303 | public function saveCustomizedHtml(){ | 313 | public function saveCustomizedHtml(){ |
| 304 | try { | 314 | try { |
| 305 | $is_list = $this->param['is_list'] ?? 0; | 315 | $is_list = $this->param['is_list'] ?? 0; |
| 316 | + $is_custom = $this->param['is_custom'] ?? 0; | ||
| 306 | $bTemplateMainModel = new BTemplateMain(); | 317 | $bTemplateMainModel = new BTemplateMain(); |
| 307 | - $mainInfo = $bTemplateMainModel->read(['type'=>$this->param['type'],'is_list'=>$is_list]); | 318 | + $mainInfo = $bTemplateMainModel->read(['type'=>$this->param['type'],'is_custom'=>$is_custom,'is_list'=>$is_list]); |
| 308 | if($mainInfo === false){ | 319 | if($mainInfo === false){ |
| 309 | $mainData = [ | 320 | $mainData = [ |
| 310 | 'project_id'=>$this->user['project_id'], | 321 | 'project_id'=>$this->user['project_id'], |
| 311 | 'type'=>$this->param['type'], | 322 | 'type'=>$this->param['type'], |
| 312 | 'is_list'=>$is_list, | 323 | 'is_list'=>$is_list, |
| 313 | - 'main_html'=>$this->param['html'] | 324 | + 'main_html'=>$this->param['html'], |
| 325 | + 'is_custom'=>$is_custom | ||
| 314 | ]; | 326 | ]; |
| 315 | $bTemplateMainModel->add($mainData); | 327 | $bTemplateMainModel->add($mainData); |
| 316 | }else{ | 328 | }else{ |
| 317 | $bTemplateMainModel->edit(['main_html'=>$this->param['html']],['id'=>$mainInfo['id']]); | 329 | $bTemplateMainModel->edit(['main_html'=>$this->param['html']],['id'=>$mainInfo['id']]); |
| 318 | } | 330 | } |
| 319 | //更新头部底部 | 331 | //更新头部底部 |
| 320 | - $this->saveCustomizeCommon($this->param['html'],$this->param['type'],$is_list); | 332 | + $this->saveCustomizeCommon($this->param['html'],$this->param['type'],$is_list,$is_custom); |
| 321 | }catch (\Exception $exception){ | 333 | }catch (\Exception $exception){ |
| 322 | $this->fail('保存失败,请联系开发人员'); | 334 | $this->fail('保存失败,请联系开发人员'); |
| 323 | } | 335 | } |
| @@ -331,16 +343,21 @@ class InitHtmlLogic extends BaseLogic | @@ -331,16 +343,21 @@ class InitHtmlLogic extends BaseLogic | ||
| 331 | * @method :post | 343 | * @method :post |
| 332 | * @time :2024/1/6 10:29 | 344 | * @time :2024/1/6 10:29 |
| 333 | */ | 345 | */ |
| 334 | - public function saveCustomizeCommon($html,$source,$is_list){ | ||
| 335 | - $type = $this->getCustomizedType($source,$is_list); | 346 | + public function saveCustomizeCommon($html,$source,$is_list,$is_custom){ |
| 347 | + if($is_custom == BTemplate::IS_CUSTOM){ | ||
| 348 | + $type = $source; | ||
| 349 | + }else{ | ||
| 350 | + $type = $this->getCustomizedType($source,$is_list); | ||
| 351 | + } | ||
| 336 | $templateCommonModel = new BTemplateCommon(); | 352 | $templateCommonModel = new BTemplateCommon(); |
| 337 | - $commonInfo = $templateCommonModel->read(['template_id'=>0,'type'=>$type]);//查看当前头部是否存在 | 353 | + $commonInfo = $templateCommonModel->read(['template_id'=>0,'type'=>$type,'is_custom'=>$is_custom,'is_list'=>$is_list]);//查看当前头部是否存在 |
| 338 | $handleInfo = $this->handleCommonParam($html); | 354 | $handleInfo = $this->handleCommonParam($html); |
| 339 | if($commonInfo === false){ | 355 | if($commonInfo === false){ |
| 340 | $data = [ | 356 | $data = [ |
| 341 | 'head_html'=>$handleInfo['head_html'], 'head_css'=>$handleInfo['head_css'], | 357 | 'head_html'=>$handleInfo['head_html'], 'head_css'=>$handleInfo['head_css'], |
| 342 | 'footer_html'=>$handleInfo['footer_html'], 'footer_css'=>$handleInfo['footer_css'], | 358 | 'footer_html'=>$handleInfo['footer_html'], 'footer_css'=>$handleInfo['footer_css'], |
| 343 | 'type'=>$type,'template_id'=>0, 'project_id'=>$this->user['project_id'], | 359 | 'type'=>$type,'template_id'=>0, 'project_id'=>$this->user['project_id'], |
| 360 | + 'is_custom'=>$is_custom,'is_list'=>$is_list | ||
| 344 | ]; | 361 | ]; |
| 345 | $templateCommonModel->add($data); | 362 | $templateCommonModel->add($data); |
| 346 | }else{ | 363 | }else{ |
| @@ -362,4 +362,32 @@ class BlogLogic extends BaseLogic | @@ -362,4 +362,32 @@ class BlogLogic extends BaseLogic | ||
| 362 | 362 | ||
| 363 | return false; | 363 | return false; |
| 364 | } | 364 | } |
| 365 | + | ||
| 366 | + /** | ||
| 367 | + * @remark :批量设置产品分类及状态 | ||
| 368 | + * @name :batchSetCategory | ||
| 369 | + * @author :lyh | ||
| 370 | + * @method :post | ||
| 371 | + * @time :2023/8/15 17:53 | ||
| 372 | + */ | ||
| 373 | + public function batchSetCategory(){ | ||
| 374 | + if(isset($this->param['category_id']) && !empty($this->param['category_id'])) { | ||
| 375 | + DB::connection('custom_mysql')->beginTransaction(); | ||
| 376 | + $this->param['category_id'] = ','.implode(',',$this->param['category_id']).','; | ||
| 377 | + try { | ||
| 378 | + //批量 | ||
| 379 | + $param = [ | ||
| 380 | + 'category_id'=>$this->param['category_id'], | ||
| 381 | + 'status'=>$this->param['status'] | ||
| 382 | + ]; | ||
| 383 | + $this->model->edit($param,['id'=>['in',$this->param['id']]]); | ||
| 384 | + DB::connection('custom_mysql')->commit(); | ||
| 385 | + //对应添加关联表 | ||
| 386 | + }catch (\Exception $e){ | ||
| 387 | + DB::connection('custom_mysql')->rollBack(); | ||
| 388 | + $this->fail('系统错误,请联系管理员'); | ||
| 389 | + } | ||
| 390 | + } | ||
| 391 | + return $this->success(); | ||
| 392 | + } | ||
| 365 | } | 393 | } |
| @@ -396,4 +396,32 @@ class NewsLogic extends BaseLogic | @@ -396,4 +396,32 @@ class NewsLogic extends BaseLogic | ||
| 396 | 396 | ||
| 397 | return false; | 397 | return false; |
| 398 | } | 398 | } |
| 399 | + | ||
| 400 | + /** | ||
| 401 | + * @remark :批量设置产品分类及状态 | ||
| 402 | + * @name :batchSetCategory | ||
| 403 | + * @author :lyh | ||
| 404 | + * @method :post | ||
| 405 | + * @time :2023/8/15 17:53 | ||
| 406 | + */ | ||
| 407 | + public function batchSetCategory(){ | ||
| 408 | + if(isset($this->param['category_id']) && !empty($this->param['category_id'])) { | ||
| 409 | + DB::connection('custom_mysql')->beginTransaction(); | ||
| 410 | + $this->param['category_id'] = ','.implode(',',$this->param['category_id']).','; | ||
| 411 | + try { | ||
| 412 | + //批量 | ||
| 413 | + $param = [ | ||
| 414 | + 'category_id'=>$this->param['category_id'], | ||
| 415 | + 'status'=>$this->param['status'] | ||
| 416 | + ]; | ||
| 417 | + $this->model->edit($param,['id'=>['in',$this->param['id']]]); | ||
| 418 | + DB::connection('custom_mysql')->commit(); | ||
| 419 | + //对应添加关联表 | ||
| 420 | + }catch (\Exception $e){ | ||
| 421 | + DB::connection('custom_mysql')->rollBack(); | ||
| 422 | + $this->fail('系统错误,请联系管理员'); | ||
| 423 | + } | ||
| 424 | + } | ||
| 425 | + return $this->success(); | ||
| 426 | + } | ||
| 399 | } | 427 | } |
| @@ -82,19 +82,19 @@ class RankDataLogic extends BaseLogic | @@ -82,19 +82,19 @@ class RankDataLogic extends BaseLogic | ||
| 82 | $lang_data = $quanqiusou_api->getLangRankData($api_no); | 82 | $lang_data = $quanqiusou_api->getLangRankData($api_no); |
| 83 | $lang_data = Arr::setValueToKey($lang_data, 'language'); | 83 | $lang_data = Arr::setValueToKey($lang_data, 'language'); |
| 84 | $data['langs'] = []; | 84 | $data['langs'] = []; |
| 85 | - foreach($project['deploy_optimize']['minor_languages']??[] as $lang){ | ||
| 86 | - $remain_day = $lang_data[$lang['tl']]['dabiao_day'] ?? 0; | ||
| 87 | - $data['langs'][$lang['tl'] ?? ''] = [ | ||
| 88 | - 'lang_text' => Translate::getTls($lang['tl'] ?? ''), | ||
| 89 | - 'keyword_num' => $lang['keywords'] ?? 0, | ||
| 90 | - 'reach_day' => $lang_data[$lang['tl']]['dabiao_day'] ?? 0, | ||
| 91 | - 'home_cnt' => $lang_data[$lang['tl']]['home_cnt'] ?? 0, | ||
| 92 | - 'remain_day' => ($lang['type']??0) == 1 ? $data['project']['remain_day'] : $lang['service_day'] - $remain_day, | ||
| 93 | - 'type' => $lang['type'] ?? 0, //1 项目关键词 项目天数 2 保证首页关键词 项目达标天数 | ||
| 94 | - ]; | 85 | + if(isset($project['deploy_optimize']['minor_languages']) && !empty($project['deploy_optimize']['minor_languages']) && is_array($project['deploy_optimize']['minor_languages'])){ |
| 86 | + foreach($project['deploy_optimize']['minor_languages']??[] as $lang){ | ||
| 87 | + $remain_day = $lang_data[$lang['tl']]['dabiao_day'] ?? 0; | ||
| 88 | + $data['langs'][$lang['tl'] ?? ''] = [ | ||
| 89 | + 'lang_text' => Translate::getTls($lang['tl'] ?? ''), | ||
| 90 | + 'keyword_num' => $lang['keywords'] ?? 0, | ||
| 91 | + 'reach_day' => $lang_data[$lang['tl']]['dabiao_day'] ?? 0, | ||
| 92 | + 'home_cnt' => $lang_data[$lang['tl']]['home_cnt'] ?? 0, | ||
| 93 | + 'remain_day' => ($lang['type']??0) == 1 ? $data['project']['remain_day'] : $lang['service_day'] - $remain_day, | ||
| 94 | + 'type' => $lang['type'] ?? 0, //1 项目关键词 项目天数 2 保证首页关键词 项目达标天数 | ||
| 95 | + ]; | ||
| 96 | + } | ||
| 95 | } | 97 | } |
| 96 | - | ||
| 97 | - | ||
| 98 | //测速 | 98 | //测速 |
| 99 | $data['speed'] = $speed['data'] ?? []; | 99 | $data['speed'] = $speed['data'] ?? []; |
| 100 | 100 |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :TranslateLogic.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/1/12 9:42 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Logic\Bside\Setting; | ||
| 11 | + | ||
| 12 | +use App\Enums\Common\Code; | ||
| 13 | +use App\Http\Logic\Bside\BaseLogic; | ||
| 14 | +use App\Models\WebSetting\Proofreading; | ||
| 15 | +use App\Models\WebSetting\Translate as TranslateModel; | ||
| 16 | +use App\Models\WebSetting\WebLanguage; | ||
| 17 | +use App\Helper\Translate; | ||
| 18 | +use Illuminate\Support\Facades\DB; | ||
| 19 | + | ||
| 20 | +class TranslateLogic extends BaseLogic | ||
| 21 | +{ | ||
| 22 | + public function __construct() | ||
| 23 | + { | ||
| 24 | + parent::__construct(); | ||
| 25 | + $this->model = new TranslateModel(); | ||
| 26 | + $this->param = $this->requestAll; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * @remark : | ||
| 31 | + * @name :getTranslateList | ||
| 32 | + * @author :lyh | ||
| 33 | + * @method :post | ||
| 34 | + * @time :2024/1/12 9:43 | ||
| 35 | + */ | ||
| 36 | + public function getTranslateList(){ | ||
| 37 | + $languageInfo = $this->getLanguage($this->param['language_id']); | ||
| 38 | + $info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]); | ||
| 39 | + //获取当前URl的所有文本内容 | ||
| 40 | + $new_key = $this->getUrlRead($this->param['url']); | ||
| 41 | + if($info === false){ | ||
| 42 | + $data = []; | ||
| 43 | + $translate_list = Translate::tran($new_key, $languageInfo['short']); | ||
| 44 | + foreach ($new_key as $k=>$v){ | ||
| 45 | + $data[] = [ | ||
| 46 | + trim($v)=>$translate_list[$k], | ||
| 47 | + ]; | ||
| 48 | + } | ||
| 49 | + return $this->response('success',Code::SUCCESS,$data); | ||
| 50 | + } | ||
| 51 | + $old_key = [];//key值组成数据 | ||
| 52 | + $data = json_decode($info['data'],true); | ||
| 53 | + foreach ($data as $k => $v){ | ||
| 54 | + $old_key[] = $k; | ||
| 55 | + } | ||
| 56 | + $arr2 = array_values(array_diff($new_key, $old_key)); | ||
| 57 | + if(!empty($arr2)){ | ||
| 58 | + $translate_list = Translate::tran($arr2, $languageInfo['short']); | ||
| 59 | + foreach ($arr2 as $k1=>$v1){ | ||
| 60 | + $data[] = [ | ||
| 61 | + trim($v1)=>$translate_list[$k1] | ||
| 62 | + ]; | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + $this->response('success',Code::SUCCESS,$data); | ||
| 66 | + } | ||
| 67 | + /** | ||
| 68 | + * @remark :获取图片列表 | ||
| 69 | + * @name :imageList | ||
| 70 | + * @author :lyh | ||
| 71 | + * @method :post | ||
| 72 | + * @time :2023/11/23 17:29 | ||
| 73 | + */ | ||
| 74 | + public function getTranslateImageList(){ | ||
| 75 | + $info = $this->model->read(['url'=>$this->param['url'],'language_id'=>$this->param['language_id'],'type'=>$this->param['type']]); | ||
| 76 | + $data = []; | ||
| 77 | + if($info === false){ | ||
| 78 | + $new_list = $this->getUrlImageRead($this->param['url']); | ||
| 79 | + foreach ($new_list as $v){ | ||
| 80 | + $data[] = [ | ||
| 81 | + $v=>$v, | ||
| 82 | + ]; | ||
| 83 | + } | ||
| 84 | + return $this->response('success',Code::SUCCESS,$data); | ||
| 85 | + } | ||
| 86 | + $new_list = $this->getUrlImageRead($this->param['url']); | ||
| 87 | + $old_list = []; | ||
| 88 | + $data = json_decode($info['data'],true); | ||
| 89 | + foreach ($data as $k=>$v){ | ||
| 90 | + $old_list[] = $v; | ||
| 91 | + $data[] = [ | ||
| 92 | + $k=>$v, | ||
| 93 | + ]; | ||
| 94 | + } | ||
| 95 | + $arr2 = array_values(array_diff($new_list, $old_list)); | ||
| 96 | + if(!empty($arr2)){ | ||
| 97 | + foreach ($arr2 as $v1){ | ||
| 98 | + $data[] = [ | ||
| 99 | + $v1=>$v1 | ||
| 100 | + ]; | ||
| 101 | + } | ||
| 102 | + } | ||
| 103 | + $this->response('success',Code::SUCCESS,$data); | ||
| 104 | + } | ||
| 105 | + /** | ||
| 106 | + * @remark :获取语种信息 | ||
| 107 | + * @name :getLanguage | ||
| 108 | + * @author :lyh | ||
| 109 | + * @method :post | ||
| 110 | + * @time :2024/1/12 9:45 | ||
| 111 | + */ | ||
| 112 | + public function getLanguage($language_id){ | ||
| 113 | + //获取语种信息 | ||
| 114 | + $languageModel = new WebLanguage(); | ||
| 115 | + $languageInfo = $languageModel->read(['id'=>$language_id]); | ||
| 116 | + if($languageInfo === false){ | ||
| 117 | + $this->fail('请选择语种'); | ||
| 118 | + } | ||
| 119 | + return $this->success($languageInfo); | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + /** | ||
| 123 | + * @remark :获取Url内容 | ||
| 124 | + * @name :getUrlRead | ||
| 125 | + * @author :lyh | ||
| 126 | + * @method :post | ||
| 127 | + * @time :2023/11/22 10:02 | ||
| 128 | + */ | ||
| 129 | + public function getUrlRead($url){ | ||
| 130 | + $contextOptions = [ | ||
| 131 | + 'ssl' => [ | ||
| 132 | + 'verify_peer' => false, | ||
| 133 | + 'verify_peer_name' => false, | ||
| 134 | + ], | ||
| 135 | + ]; | ||
| 136 | + $context = stream_context_create($contextOptions); | ||
| 137 | + $sourceCode = file_get_contents($url, false, $context); | ||
| 138 | + $pattern = '/<style\b[^>]*>(.*?)<\/style>/s'; // 定义匹配`<style>`标签及其内容的正则表达式 | ||
| 139 | + $strippedContent = preg_replace($pattern, '', $sourceCode); // 删除`<style>`标签及其内容 | ||
| 140 | + $pattern = '/<script\b[^>]*>(.*?)<\/script>/s'; // 定义匹配`<script>`标签及其内容的正则表达式 | ||
| 141 | + $strippedContent = preg_replace($pattern, '', $strippedContent); // 删除`<script>`标签及其内容 | ||
| 142 | + $pattern = '/<link\b[^>]*>/'; // 定义匹配 `<link>` 标签的正则表达式 | ||
| 143 | + $strippedContent = preg_replace($pattern, '', $strippedContent); // 删除 `<link>` 标签 | ||
| 144 | + $pattern = '/>([^<]+)</'; // 定义匹配中间内容不是标签的正则表达式 | ||
| 145 | + $matches = array(); | ||
| 146 | + preg_match_all($pattern, $strippedContent, $matches); | ||
| 147 | + $textContentArray = array_filter($matches[1], function($item) { | ||
| 148 | + return !empty(trim($item)); | ||
| 149 | + }); | ||
| 150 | + $data = []; | ||
| 151 | + foreach ($textContentArray as $v){ | ||
| 152 | + $content = trim($v); | ||
| 153 | + $trimmedString = preg_replace('/\s+/', ' ', $content); | ||
| 154 | + $data[] = $trimmedString; | ||
| 155 | + } | ||
| 156 | + $data = array_values($data); | ||
| 157 | + return $data; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + /** | ||
| 161 | + * @remark :获取Url内容 | ||
| 162 | + * @name :getUrlRead | ||
| 163 | + * @author :lyh | ||
| 164 | + * @method :post | ||
| 165 | + * @time :2023/11/22 10:02 | ||
| 166 | + */ | ||
| 167 | + public function getUrlImageRead($url){ | ||
| 168 | + $contextOptions = [ | ||
| 169 | + 'ssl' => [ | ||
| 170 | + 'verify_peer' => false, | ||
| 171 | + 'verify_peer_name' => false, | ||
| 172 | + ], | ||
| 173 | + ]; | ||
| 174 | + $pattern = '/<img.*?src="(.*?)".*?>/i'; | ||
| 175 | + $matches = array(); | ||
| 176 | + $context = stream_context_create($contextOptions); | ||
| 177 | + $sourceCode = file_get_contents($url, false, $context); | ||
| 178 | + preg_match_all($pattern, $sourceCode, $matches); | ||
| 179 | + $textContentArray = $matches[1]; | ||
| 180 | + $data = []; | ||
| 181 | + foreach ($textContentArray as $v){ | ||
| 182 | + if(!empty($v)){ | ||
| 183 | + $data[] = $v; | ||
| 184 | + } | ||
| 185 | + } | ||
| 186 | + $uniqueArray = array_unique($data); | ||
| 187 | + $data = array_values($uniqueArray); | ||
| 188 | + return $data; | ||
| 189 | + } | ||
| 190 | + | ||
| 191 | + /** | ||
| 192 | + * @name :(新增/更新多语言)save | ||
| 193 | + * @author :lyh | ||
| 194 | + * @method :post | ||
| 195 | + * @time :2023/6/12 10:52 | ||
| 196 | + */ | ||
| 197 | + public function translateSave(){ | ||
| 198 | + try { | ||
| 199 | + $info = $this->model->read(['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'type'=>$this->param['type']]); | ||
| 200 | + if($info === false){ | ||
| 201 | + $param = [ | ||
| 202 | + 'type'=>1, | ||
| 203 | + 'project_id'=>$this->user['project_id'], | ||
| 204 | + 'url'=>$this->param['url'], | ||
| 205 | + 'language_id'=>$this->param['language_id'], | ||
| 206 | + 'alias'=>$this->param['alias'], | ||
| 207 | + ]; | ||
| 208 | + $param['data'] = json_encode($this->param['data'],true); | ||
| 209 | + $this->model->add($param); | ||
| 210 | + }else{ | ||
| 211 | + $data = json_encode($this->param['data'],true); | ||
| 212 | + $this->model->edit(['data'=>$data],['language_id'=>$this->param['language_id'],'url'=>$this->param['url'],'type'=>$this->param['type']]); | ||
| 213 | + } | ||
| 214 | + }catch (\Exception $e){ | ||
| 215 | + $this->fail('系统错误请联系管理员'); | ||
| 216 | + } | ||
| 217 | + $this->response('success'); | ||
| 218 | + } | ||
| 219 | +} |
| @@ -2,9 +2,10 @@ | @@ -2,9 +2,10 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Models\Com; | 3 | namespace App\Models\Com; |
| 4 | 4 | ||
| 5 | +use App\Models\Base; | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
| 6 | 7 | ||
| 7 | -class UpdateOldInfo extends Model | 8 | +class UpdateOldInfo extends Base |
| 8 | { | 9 | { |
| 9 | //设置关联表名 | 10 | //设置关联表名 |
| 10 | protected $table = 'gl_update_old_info'; | 11 | protected $table = 'gl_update_old_info'; |
app/Models/WebSetting/Translate.php
0 → 100644
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :Translate.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/1/12 9:38 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Models\WebSetting; | ||
| 11 | + | ||
| 12 | +use App\Models\Base; | ||
| 13 | + | ||
| 14 | +class Translate extends Base | ||
| 15 | +{ | ||
| 16 | + protected $table = 'gl_translate'; | ||
| 17 | + //连接数据库 | ||
| 18 | + protected $connection = 'custom_mysql'; | ||
| 19 | +} |
| @@ -75,6 +75,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -75,6 +75,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 75 | Route::any('/status', [\App\Http\Controllers\Bside\News\NewsController::class, 'status'])->name('news_status'); | 75 | Route::any('/status', [\App\Http\Controllers\Bside\News\NewsController::class, 'status'])->name('news_status'); |
| 76 | Route::any('/sort', [\App\Http\Controllers\Bside\News\NewsController::class, 'sort'])->name('news_sort'); | 76 | Route::any('/sort', [\App\Http\Controllers\Bside\News\NewsController::class, 'sort'])->name('news_sort'); |
| 77 | Route::any('/allSort', [\App\Http\Controllers\Bside\News\NewsController::class, 'allSort'])->name('news_allSort'); | 77 | Route::any('/allSort', [\App\Http\Controllers\Bside\News\NewsController::class, 'allSort'])->name('news_allSort'); |
| 78 | + Route::any('/batchSetCategory', [\App\Http\Controllers\Bside\News\NewsController::class, 'batchSetCategory'])->name('news_batchSetCategory'); | ||
| 78 | Route::any('/statusNum', [\App\Http\Controllers\Bside\News\NewsController::class, 'getStatusNumber'])->name('news_statusNum'); | 79 | Route::any('/statusNum', [\App\Http\Controllers\Bside\News\NewsController::class, 'getStatusNumber'])->name('news_statusNum'); |
| 79 | }); | 80 | }); |
| 80 | 81 | ||
| @@ -91,6 +92,7 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -91,6 +92,7 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 91 | Route::any('/status', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'status'])->name('blog_status'); | 92 | Route::any('/status', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'status'])->name('blog_status'); |
| 92 | Route::any('/sort', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'sort'])->name('blog_sort'); | 93 | Route::any('/sort', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'sort'])->name('blog_sort'); |
| 93 | Route::any('/allSort', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'allSort'])->name('blog_allSort'); | 94 | Route::any('/allSort', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'allSort'])->name('blog_allSort'); |
| 95 | + Route::any('/batchSetCategory', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'batchSetCategory'])->name('blog_batchSetCategory'); | ||
| 94 | Route::any('/statusNum', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'getStatusNumber'])->name('blog_statusNum'); | 96 | Route::any('/statusNum', [\App\Http\Controllers\Bside\Blog\BlogController::class, 'getStatusNumber'])->name('blog_statusNum'); |
| 95 | //分类 | 97 | //分类 |
| 96 | Route::any('/category/', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'lists'])->name('blog_category_lists'); | 98 | Route::any('/category/', [\App\Http\Controllers\Bside\Blog\BlogCategoryController::class, 'lists'])->name('blog_category_lists'); |
| @@ -174,7 +176,12 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -174,7 +176,12 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 174 | Route::any('/save', [\App\Http\Controllers\Bside\Setting\ProofreadingController::class, 'save'])->name('web_proofreading_save'); | 176 | Route::any('/save', [\App\Http\Controllers\Bside\Setting\ProofreadingController::class, 'save'])->name('web_proofreading_save'); |
| 175 | Route::any('/saveImage', [\App\Http\Controllers\Bside\Setting\ProofreadingController::class, 'saveImage'])->name('web_proofreading_saveImage'); | 177 | Route::any('/saveImage', [\App\Http\Controllers\Bside\Setting\ProofreadingController::class, 'saveImage'])->name('web_proofreading_saveImage'); |
| 176 | }); | 178 | }); |
| 177 | - | 179 | + //新版翻译校队 |
| 180 | + Route::prefix('translate_check')->group(function () {//languageList | ||
| 181 | + Route::any('/', [\App\Http\Controllers\Bside\Setting\TranslateController::class, 'lists'])->name('translate_check_lists'); | ||
| 182 | + Route::any('/imageList', [\App\Http\Controllers\Bside\Setting\TranslateController::class, 'imageList'])->name('translate_checkg_imageList'); | ||
| 183 | + Route::any('/save', [\App\Http\Controllers\Bside\Setting\TranslateController::class, 'save'])->name('translate_check_save'); | ||
| 184 | + }); | ||
| 178 | //seo设置 | 185 | //seo设置 |
| 179 | Route::prefix('seo')->group(function () { | 186 | Route::prefix('seo')->group(function () { |
| 180 | Route::any('/info', [\App\Http\Controllers\Bside\Setting\WebSettingSeoController::class, 'info'])->name('web_seo_info'); | 187 | Route::any('/info', [\App\Http\Controllers\Bside\Setting\WebSettingSeoController::class, 'info'])->name('web_seo_info'); |
-
请 注册 或 登录 后发表评论