正在显示
15 个修改的文件
包含
294 行增加
和
18 行删除
| @@ -43,6 +43,7 @@ class KeywordVideoController extends BaseController | @@ -43,6 +43,7 @@ class KeywordVideoController extends BaseController | ||
| 43 | 'gl_keyword_video_task.project_id AS project_id', | 43 | 'gl_keyword_video_task.project_id AS project_id', |
| 44 | 'gl_keyword_video_task.number AS number', | 44 | 'gl_keyword_video_task.number AS number', |
| 45 | 'gl_keyword_video_task.status AS status', | 45 | 'gl_keyword_video_task.status AS status', |
| 46 | + 'gl_keyword_video_task.keywords AS keywords', | ||
| 46 | 'gl_keyword_video_task.sort AS sort', | 47 | 'gl_keyword_video_task.sort AS sort', |
| 47 | 'gl_keyword_video_task.created_at AS created_at', | 48 | 'gl_keyword_video_task.created_at AS created_at', |
| 48 | 'gl_keyword_video_task.updated_at AS updated_at', | 49 | 'gl_keyword_video_task.updated_at AS updated_at', |
| @@ -96,12 +96,30 @@ class UpdateController extends BaseController | @@ -96,12 +96,30 @@ class UpdateController extends BaseController | ||
| 96 | try { | 96 | try { |
| 97 | if($this->param['old_collect'] == 1){ | 97 | if($this->param['old_collect'] == 1){ |
| 98 | //现有数据需要重新采集页面 | 98 | //现有数据需要重新采集页面 |
| 99 | + $collect_routes = ''; | ||
| 100 | + if(isset($this->param['collect_routes'])){ | ||
| 101 | + //填写了采集路由 | ||
| 102 | + $routes_arr = explode(',',$this->param['collect_routes']); | ||
| 103 | + foreach ($routes_arr as &$route){ | ||
| 104 | + $route = "'".$route."'"; | ||
| 105 | + } | ||
| 106 | + $collect_routes = implode(',',$routes_arr); | ||
| 107 | + } | ||
| 108 | + | ||
| 99 | DB::connection('custom_mysql')->statement("DELETE FROM `gl_collect_source` WHERE `origin` LIKE '%.css%' OR `origin` LIKE '%.js%'"); | 109 | DB::connection('custom_mysql')->statement("DELETE FROM `gl_collect_source` WHERE `origin` LIKE '%.css%' OR `origin` LIKE '%.js%'"); |
| 100 | if ($domain_info) { | 110 | if ($domain_info) { |
| 101 | //已上线项目 | 111 | //已上线项目 |
| 102 | - DB::connection('custom_mysql')->statement("UPDATE `gl_collect_task` SET `status` = 0,`domain` = '" . $test_domain . "' WHERE `language` = ''"); | 112 | + if($collect_routes){ |
| 113 | + DB::connection('custom_mysql')->statement("UPDATE `gl_collect_task` SET `status` = 0,`domain` = '" . $test_domain . "' WHERE `language` = '' AND `route` IN (".$collect_routes.")"); | ||
| 114 | + }else{ | ||
| 115 | + DB::connection('custom_mysql')->statement("UPDATE `gl_collect_task` SET `status` = 0,`domain` = '" . $test_domain . "' WHERE `language` = ''"); | ||
| 116 | + } | ||
| 103 | } else { | 117 | } else { |
| 104 | - DB::connection('custom_mysql')->statement("UPDATE `gl_collect_task` SET `status` = 0 WHERE `language` = ''"); | 118 | + if($collect_routes){ |
| 119 | + DB::connection('custom_mysql')->statement("UPDATE `gl_collect_task` SET `status` = 0 WHERE `language` = '' AND `route` IN (".$collect_routes.")"); | ||
| 120 | + }else{ | ||
| 121 | + DB::connection('custom_mysql')->statement("UPDATE `gl_collect_task` SET `status` = 0 WHERE `language` = ''"); | ||
| 122 | + } | ||
| 105 | } | 123 | } |
| 106 | } | 124 | } |
| 107 | 125 |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :ReplaceHtmlController.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/5/8 10:02 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Controllers\Aside\Template; | ||
| 11 | + | ||
| 12 | +use App\Enums\Common\Code; | ||
| 13 | +use App\Http\Controllers\Aside\BaseController; | ||
| 14 | +use App\Http\Logic\Aside\Template\ReplaceHtmlLogic; | ||
| 15 | +use App\Models\Template\TemplateReplaceHtml; | ||
| 16 | +use App\Models\Template\TemplateReplaceHtmlLog; | ||
| 17 | + | ||
| 18 | +class ReplaceHtmlController extends BaseController | ||
| 19 | +{ | ||
| 20 | + /** | ||
| 21 | + * @remark :替换同一种类型的html代码 | ||
| 22 | + * @name :replaceTemplateMainHtml | ||
| 23 | + * @author :lyh | ||
| 24 | + * @method :post | ||
| 25 | + * @time :2024/5/7 14:39 | ||
| 26 | + */ | ||
| 27 | + public function replaceTemplateMainHtml(ReplaceHtmlLogic $logic){ | ||
| 28 | + $this->request->validate([ | ||
| 29 | + 'old_html'=>'required', | ||
| 30 | + 'html'=>'required', | ||
| 31 | + 'type'=>'required', | ||
| 32 | + 'is_list'=>'required', | ||
| 33 | + 'is_custom'=>'required', | ||
| 34 | + ],[ | ||
| 35 | + 'old_html.required' => '需替换的html不能为空', | ||
| 36 | + 'html.required' => 'html不能为空', | ||
| 37 | + 'type.required' => '类型type不能为空', | ||
| 38 | + 'is_custom.required' => '类型is_custom不能为空', | ||
| 39 | + 'is_list.required' => '类型is_list不能为空', | ||
| 40 | + ]); | ||
| 41 | + $logic->replaceHtml(); | ||
| 42 | + $this->response('success'); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * @remark :替换的记录 | ||
| 47 | + * @name :replaceTemplateLog | ||
| 48 | + * @author :lyh | ||
| 49 | + * @method :post | ||
| 50 | + * @time :2024/5/8 10:28 | ||
| 51 | + */ | ||
| 52 | + public function replaceTemplateLog(TemplateReplaceHtml $replaceModel){ | ||
| 53 | + $lists = $replaceModel->lists($this->map,$this->page,$this->row,$this->order); | ||
| 54 | + $this->response('success',Code::SUCCESS,$lists); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + /** | ||
| 58 | + * @remark :还原 | ||
| 59 | + * @name :reductionHtml | ||
| 60 | + * @author :lyh | ||
| 61 | + * @method :post | ||
| 62 | + * @time :2024/5/8 10:27 | ||
| 63 | + */ | ||
| 64 | + public function reductionHtml(ReplaceHtmlLogic $logic){ | ||
| 65 | + $this->request->validate([ | ||
| 66 | + 'id'=>'required', | ||
| 67 | + ],[ | ||
| 68 | + 'id.required' => 'id不能为空', | ||
| 69 | + ]); | ||
| 70 | + $logic->reductionHtml(); | ||
| 71 | + $this->response('success'); | ||
| 72 | + } | ||
| 73 | +} |
| @@ -298,11 +298,9 @@ class BlogController extends BaseController | @@ -298,11 +298,9 @@ class BlogController extends BaseController | ||
| 298 | $this->request->validate([ | 298 | $this->request->validate([ |
| 299 | 'id'=>'required', | 299 | 'id'=>'required', |
| 300 | 'category_id'=>'required', | 300 | 'category_id'=>'required', |
| 301 | - 'status'=>'required' | ||
| 302 | ],[ | 301 | ],[ |
| 303 | 'id.required' => '产品ID不能为空', | 302 | 'id.required' => '产品ID不能为空', |
| 304 | 'category_id.required' => '分类ID不能为空', | 303 | 'category_id.required' => '分类ID不能为空', |
| 305 | - 'status.required'=>'状态不能为空' | ||
| 306 | ]); | 304 | ]); |
| 307 | $logic->batchSetCategory(); | 305 | $logic->batchSetCategory(); |
| 308 | $this->response('success'); | 306 | $this->response('success'); |
| @@ -281,7 +281,7 @@ class NewsController extends BaseController | @@ -281,7 +281,7 @@ class NewsController extends BaseController | ||
| 281 | 281 | ||
| 282 | 282 | ||
| 283 | /** | 283 | /** |
| 284 | - * @remark :批量设置产品分类及状态 | 284 | + * @remark :批量设置分类及状态 |
| 285 | * @name :batchSetCategory | 285 | * @name :batchSetCategory |
| 286 | * @author :lyh | 286 | * @author :lyh |
| 287 | * @method :post | 287 | * @method :post |
| @@ -291,11 +291,9 @@ class NewsController extends BaseController | @@ -291,11 +291,9 @@ class NewsController extends BaseController | ||
| 291 | $this->request->validate([ | 291 | $this->request->validate([ |
| 292 | 'id'=>'required', | 292 | 'id'=>'required', |
| 293 | 'category_id'=>'required', | 293 | 'category_id'=>'required', |
| 294 | - 'status'=>'required' | ||
| 295 | ],[ | 294 | ],[ |
| 296 | 'id.required' => '产品ID不能为空', | 295 | 'id.required' => '产品ID不能为空', |
| 297 | 'category_id.required' => '分类ID不能为空', | 296 | 'category_id.required' => '分类ID不能为空', |
| 298 | - 'status.required'=>'状态不能为空' | ||
| 299 | ]); | 297 | ]); |
| 300 | $logic->batchSetCategory(); | 298 | $logic->batchSetCategory(); |
| 301 | $this->response('success'); | 299 | $this->response('success'); |
| @@ -165,14 +165,16 @@ class FileController | @@ -165,14 +165,16 @@ class FileController | ||
| 165 | */ | 165 | */ |
| 166 | public function getOnlyFilename($name,$project_id = 0){ | 166 | public function getOnlyFilename($name,$project_id = 0){ |
| 167 | $nameArr = explode('.',$name); | 167 | $nameArr = explode('.',$name); |
| 168 | - $enName = generateRoute(Translate::tran($nameArr[0], 'en')); | 168 | + $suffix = array_pop($nameArr) ?? 'jpg'; |
| 169 | + $nameStr = implode('-', $nameArr); | ||
| 170 | + $enName = generateRoute(Translate::tran($nameStr, 'en')); | ||
| 169 | $fileName = $enName; | 171 | $fileName = $enName; |
| 170 | $i=1; | 172 | $i=1; |
| 171 | - while($this->onlyName($enName.'.'.$nameArr[1],$project_id)){ | 173 | + while($this->onlyName($enName.'.'.$suffix,$project_id)){ |
| 172 | $enName = $fileName .'-'.$i; | 174 | $enName = $fileName .'-'.$i; |
| 173 | $i++; | 175 | $i++; |
| 174 | } | 176 | } |
| 175 | - return $enName.'.'.$nameArr[1]; | 177 | + return $enName.'.'.$suffix; |
| 176 | } | 178 | } |
| 177 | 179 | ||
| 178 | /** | 180 | /** |
| @@ -224,15 +224,18 @@ class ImageController extends Controller | @@ -224,15 +224,18 @@ class ImageController extends Controller | ||
| 224 | * @time :2024/4/26 16:10 | 224 | * @time :2024/4/26 16:10 |
| 225 | */ | 225 | */ |
| 226 | public function getOnlyFilename($name,$project_id = 0){ | 226 | public function getOnlyFilename($name,$project_id = 0){ |
| 227 | + | ||
| 227 | $nameArr = explode('.',$name); | 228 | $nameArr = explode('.',$name); |
| 228 | - $enName = generateRoute(Translate::tran($nameArr[0], 'en')); | 229 | + $suffix = array_pop($nameArr) ?? 'jpg'; |
| 230 | + $nameStr = implode('-', $nameArr); | ||
| 231 | + $enName = generateRoute(Translate::tran($nameStr, 'en')); | ||
| 229 | $fileName = $enName; | 232 | $fileName = $enName; |
| 230 | $i=1; | 233 | $i=1; |
| 231 | - while($this->onlyName($enName.'.'.$nameArr[1],$project_id)){ | 234 | + while($this->onlyName($enName.'.'.$suffix,$project_id)){ |
| 232 | $enName = $fileName .'-'.$i; | 235 | $enName = $fileName .'-'.$i; |
| 233 | $i++; | 236 | $i++; |
| 234 | } | 237 | } |
| 235 | - return $enName.'.'.$nameArr[1]; | 238 | + return $enName.'.'.$suffix; |
| 236 | } | 239 | } |
| 237 | 240 | ||
| 238 | /** | 241 | /** |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :ReplaceHtmlLogic.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/5/8 10:03 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Http\Logic\Aside\Template; | ||
| 11 | + | ||
| 12 | +use App\Http\Logic\aside\BaseLogic; | ||
| 13 | +use App\Models\Template\BTemplate; | ||
| 14 | +use App\Models\Template\TemplateReplaceHtml; | ||
| 15 | +use App\Models\Template\TemplateReplaceHtmlLog; | ||
| 16 | +use App\Services\ProjectServer; | ||
| 17 | +use Illuminate\Support\Facades\DB; | ||
| 18 | + | ||
| 19 | +class ReplaceHtmlLogic extends BaseLogic | ||
| 20 | +{ | ||
| 21 | + public function __construct() | ||
| 22 | + { | ||
| 23 | + parent::__construct(); | ||
| 24 | + $this->model = new TemplateReplaceHtml(); | ||
| 25 | + $this->param = $this->requestAll; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * @remark :替换可视化的html代码(按类型) | ||
| 30 | + * @name :replaceHtml | ||
| 31 | + * @author :lyh | ||
| 32 | + * @method :post | ||
| 33 | + * @time :2024/5/7 15:52 | ||
| 34 | + */ | ||
| 35 | + public function replaceHtml(){ | ||
| 36 | + ProjectServer::useProject($this->param['project_id']); | ||
| 37 | + $type = $this->getCustomizedType($this->param['type'], $this->param['is_list']);//获取定制界面类型 | ||
| 38 | + //查看当前页面是否定制,是否开启可视化 | ||
| 39 | + $page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面 | ||
| 40 | + if (in_array($type, $page_array)) {//当前页面是定制界面 | ||
| 41 | + $this->param['template_id'] = 0; | ||
| 42 | + } | ||
| 43 | + $replaceId = $this->saveReplaceHtml($this->param); | ||
| 44 | + //TODO::生成一条任务记录 | ||
| 45 | + //查询当前所有装修的 | ||
| 46 | + $condition = ['source'=>$this->param['type'],'is_custom'=>$this->param['is_custom'],'is_list'=>$this->param['is_list'], | ||
| 47 | + 'template_id'=>$this->param['template_id']]; | ||
| 48 | + $list = $this->model->list($condition); | ||
| 49 | + foreach ($list as $v){ | ||
| 50 | + if($v['type'] == 0){ | ||
| 51 | + $main_html = str_replace($this->param['old_html'],$this->param['html'],$v['main_html']); | ||
| 52 | + $this->model->edit(['main_html'=>$main_html],['id'=>$v['id']]); | ||
| 53 | + }else{ | ||
| 54 | + $html = str_replace($this->param['old_html'],$this->param['html'],$v['html']); | ||
| 55 | + $this->model->edit(['html'=>$html],['id'=>$v['id']]); | ||
| 56 | + } | ||
| 57 | + $this->saveReplaceHtmlLog($replaceId,$v['id']); | ||
| 58 | + } | ||
| 59 | + DB::disconnect('custom_mysql'); | ||
| 60 | + return $this->success(); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + /** | ||
| 64 | + * @remark :生成一条记录 | ||
| 65 | + * @name :saveTemplateLog | ||
| 66 | + * @author :lyh | ||
| 67 | + * @method :post | ||
| 68 | + * @time :2024/5/8 9:23 | ||
| 69 | + */ | ||
| 70 | + public function saveReplaceHtml($data,$template_id){ | ||
| 71 | + $logData = [ | ||
| 72 | + 'type'=>$data['type'], | ||
| 73 | + 'is_custom'=>$data['is_custom'], | ||
| 74 | + 'is_list'=>$data['is_list'], | ||
| 75 | + 'template_id'=>$template_id, | ||
| 76 | + 'old_html'=>$data['old_html'], | ||
| 77 | + 'html'=>$data['html'], | ||
| 78 | + ]; | ||
| 79 | + return $this->model->addReturnId($logData); | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + /** | ||
| 83 | + * @remark :保存每条替换记录 | ||
| 84 | + * @name :saveReplaceHtmlLog | ||
| 85 | + * @author :lyh | ||
| 86 | + * @method :post | ||
| 87 | + * @time :2024/5/8 9:37 | ||
| 88 | + */ | ||
| 89 | + public function saveReplaceHtmlLog($replace_id,$replace_template_id){ | ||
| 90 | + $logData = [ | ||
| 91 | + 'replace_id'=>$replace_id, | ||
| 92 | + 'replace_template_id'=>$replace_template_id, | ||
| 93 | + 'uid'=>$this->user['manager_id'], | ||
| 94 | + ]; | ||
| 95 | + $replaceHtmlModel = new TemplateReplaceHtmlLog(); | ||
| 96 | + return $replaceHtmlModel->add($logData); | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + /** | ||
| 100 | + * @remark :还原所有记录 | ||
| 101 | + * @name :reductionHtml | ||
| 102 | + * @author :lyh | ||
| 103 | + * @method :post | ||
| 104 | + * @time :2024/5/8 10:35 | ||
| 105 | + */ | ||
| 106 | + public function reductionHtml(){ | ||
| 107 | + ProjectServer::useProject($this->param['project_id']); | ||
| 108 | + //获取当前数据详情 | ||
| 109 | + $info = $this->model->read(['id'=>$this->param['id']]); | ||
| 110 | + if($info === false){ | ||
| 111 | + $this->fail('当前数据不存在'); | ||
| 112 | + } | ||
| 113 | + $replaceLogModel = new TemplateReplaceHtmlLog(); | ||
| 114 | + $logList = $replaceLogModel->list(['replace_id'=>$this->param['id']]); | ||
| 115 | + $replaceArr = []; | ||
| 116 | + foreach ($logList as $v){ | ||
| 117 | + $replaceArr[] = $v['replace_template_id']; | ||
| 118 | + } | ||
| 119 | + if(!empty($replaceArr)){ | ||
| 120 | + //查询可视化数据 | ||
| 121 | + $bTemplateModel = new BTemplate(); | ||
| 122 | + $templateList = $bTemplateModel->list(['id'=>['in',$replaceArr]]); | ||
| 123 | + foreach ($templateList as $value){ | ||
| 124 | + if($v['type'] == 0){ | ||
| 125 | + $main_html = str_replace($info['html'],$info['old_html'],$value['main_html']); | ||
| 126 | + $this->model->edit(['main_html'=>$main_html],['id'=>$v['id']]); | ||
| 127 | + }else{ | ||
| 128 | + $html = str_replace($info['html'],$info['old_html'],$value['html']); | ||
| 129 | + $this->model->edit(['html'=>$html],['id'=>$v['id']]); | ||
| 130 | + } | ||
| 131 | + } | ||
| 132 | + } | ||
| 133 | + DB::disconnect('custom_mysql'); | ||
| 134 | + return $this->success(); | ||
| 135 | + } | ||
| 136 | +} |
| @@ -22,6 +22,8 @@ use App\Models\Template\Setting; | @@ -22,6 +22,8 @@ use App\Models\Template\Setting; | ||
| 22 | use App\Models\Template\BTemplate; | 22 | use App\Models\Template\BTemplate; |
| 23 | use App\Models\Template\BTemplateLog; | 23 | use App\Models\Template\BTemplateLog; |
| 24 | use App\Models\Template\Template; | 24 | use App\Models\Template\Template; |
| 25 | +use App\Models\Template\TemplateReplaceHtml; | ||
| 26 | +use App\Models\Template\TemplateReplaceHtmlLog; | ||
| 25 | use App\Models\Template\TemplateTypeMain; | 27 | use App\Models\Template\TemplateTypeMain; |
| 26 | use Illuminate\Support\Facades\Cache; | 28 | use Illuminate\Support\Facades\Cache; |
| 27 | use Illuminate\Support\Facades\DB; | 29 | use Illuminate\Support\Facades\DB; |
| @@ -158,7 +158,9 @@ class UserLoginLogic | @@ -158,7 +158,9 @@ class UserLoginLogic | ||
| 158 | $info['aicc'] = $project['aicc'] ?? ''; | 158 | $info['aicc'] = $project['aicc'] ?? ''; |
| 159 | $info['hagro'] = $project['hagro'] ?? ''; | 159 | $info['hagro'] = $project['hagro'] ?? ''; |
| 160 | $info['plan'] = Project::planMap()[$project['deploy_build']['plan']]; | 160 | $info['plan'] = Project::planMap()[$project['deploy_build']['plan']]; |
| 161 | - $info['domain'] = (!empty($project['deploy_optimize']['domain']) ? ((new DomainInfo())->getDomain($project['deploy_optimize']['domain'])) : ($project['deploy_build']['test_domain'] ?? '')); | 161 | + $info['test_domain'] = $project['deploy_build']['test_domain'] ?? ''; |
| 162 | + $info['domain'] = (!empty($project['deploy_optimize']['domain']) ? | ||
| 163 | + ((new DomainInfo())->getDomain($project['deploy_optimize']['domain'])) : ''); | ||
| 162 | $info['is_customized'] = $project['is_customized']; | 164 | $info['is_customized'] = $project['is_customized']; |
| 163 | $info['is_upload_manage'] = $project['is_upload_manage']; | 165 | $info['is_upload_manage'] = $project['is_upload_manage']; |
| 164 | $info['is_upgrade'] = $project['is_upgrade']; | 166 | $info['is_upgrade'] = $project['is_upgrade']; |
| @@ -258,8 +260,9 @@ class UserLoginLogic | @@ -258,8 +260,9 @@ class UserLoginLogic | ||
| 258 | $info['hagro'] = $project['hagro'] ?? ''; | 260 | $info['hagro'] = $project['hagro'] ?? ''; |
| 259 | $info['plan'] = Project::planMap()[$project['deploy_build']['plan']]; | 261 | $info['plan'] = Project::planMap()[$project['deploy_build']['plan']]; |
| 260 | $info['is_domain'] = empty($project['deploy_optimize']['domain']) ? 0 : 1; | 262 | $info['is_domain'] = empty($project['deploy_optimize']['domain']) ? 0 : 1; |
| 263 | + $info['test_domain'] = $project['deploy_build']['test_domain'] ?? ''; | ||
| 261 | $info['domain'] = (!empty($project['deploy_optimize']['domain']) ? | 264 | $info['domain'] = (!empty($project['deploy_optimize']['domain']) ? |
| 262 | - ((new DomainInfo())->getDomain($project['deploy_optimize']['domain'])) : ($project['deploy_build']['test_domain'] ?? '')); | 265 | + ((new DomainInfo())->getDomain($project['deploy_optimize']['domain'])) : ''); |
| 263 | $info['is_customized'] = $project['is_customized']; | 266 | $info['is_customized'] = $project['is_customized']; |
| 264 | $info['is_upgrade'] = $project['is_upgrade']; | 267 | $info['is_upgrade'] = $project['is_upgrade']; |
| 265 | $info['is_upload_manage'] = $project['is_upload_manage']; | 268 | $info['is_upload_manage'] = $project['is_upload_manage']; |
| @@ -52,7 +52,7 @@ class NavRequest extends FormRequest | @@ -52,7 +52,7 @@ class NavRequest extends FormRequest | ||
| 52 | 'name.required' => '名称必须', | 52 | 'name.required' => '名称必须', |
| 53 | 'name.max' => '名称不能超过100个字符', | 53 | 'name.max' => '名称不能超过100个字符', |
| 54 | 'url.required' => '链接不能为空', | 54 | 'url.required' => '链接不能为空', |
| 55 | - 'remark.max' => '描述最长为500字符', | 55 | + 'remark.max' => '描述超过最长500字符', |
| 56 | ]; | 56 | ]; |
| 57 | } | 57 | } |
| 58 | } | 58 | } |
app/Models/Template/TemplateReplaceHtml.php
0 → 100644
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :TemplateReplaceHtml.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/5/8 9:05 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Models\Template; | ||
| 11 | + | ||
| 12 | +use App\Models\Base; | ||
| 13 | + | ||
| 14 | +class TemplateReplaceHtml extends Base | ||
| 15 | +{ | ||
| 16 | + protected $table = 'gl_replace_html'; | ||
| 17 | + //连接数据库 | ||
| 18 | + protected $connection = 'custom_mysql'; | ||
| 19 | +} |
| 1 | +<?php | ||
| 2 | +/** | ||
| 3 | + * @remark : | ||
| 4 | + * @name :TemplateReplaceHtmlLog.php | ||
| 5 | + * @author :lyh | ||
| 6 | + * @method :post | ||
| 7 | + * @time :2024/5/8 9:34 | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +namespace App\Models\Template; | ||
| 11 | + | ||
| 12 | +use App\Models\Base; | ||
| 13 | + | ||
| 14 | +class TemplateReplaceHtmlLog extends Base | ||
| 15 | +{ | ||
| 16 | + protected $table = 'gl_replace_html_log'; | ||
| 17 | + //连接数据库 | ||
| 18 | + protected $connection = 'custom_mysql'; | ||
| 19 | +} |
| @@ -376,7 +376,12 @@ Route::middleware(['aloginauth'])->group(function () { | @@ -376,7 +376,12 @@ Route::middleware(['aloginauth'])->group(function () { | ||
| 376 | Route::any('/del', [Aside\Template\ATemplateTypeController::class, 'del'])->name('admin.ATemplateType_del'); | 376 | Route::any('/del', [Aside\Template\ATemplateTypeController::class, 'del'])->name('admin.ATemplateType_del'); |
| 377 | }); | 377 | }); |
| 378 | }); | 378 | }); |
| 379 | - | 379 | + //可视化数据替换 |
| 380 | + Route::prefix('replace')->group(function () { | ||
| 381 | + Route::any('/replaceTemplateMainHtml', [Aside\Template\ReplaceHtmlController::class, 'replaceTemplateMainHtml'])->name('admin.replace_replaceTemplateMainHtml'); | ||
| 382 | + Route::any('/replaceTemplateLog', [Aside\Template\ReplaceHtmlController::class, 'replaceTemplateLog'])->name('admin.replace_replaceTemplateLog'); | ||
| 383 | + Route::any('/reductionHtml', [Aside\Template\ReplaceHtmlController::class, 'reductionHtml'])->name('admin.replace_reductionHtml'); | ||
| 384 | + }); | ||
| 380 | 385 | ||
| 381 | Route::any('/generate_aicc_token', [Aside\Com\IndexController::class, 'generateAiCCToken'])->name('admin.generate_aicc_token'); | 386 | Route::any('/generate_aicc_token', [Aside\Com\IndexController::class, 'generateAiCCToken'])->name('admin.generate_aicc_token'); |
| 382 | Route::any('/getAutoToken', [Aside\Com\IndexController::class, 'getAutoToken'])->name('admin.getAutoToken'); | 387 | Route::any('/getAutoToken', [Aside\Com\IndexController::class, 'getAutoToken'])->name('admin.getAutoToken'); |
| @@ -357,7 +357,6 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -357,7 +357,6 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 357 | Route::any('/savePublicTemplate', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'savePublicTemplate'])->name('template_savePublicTemplate'); | 357 | Route::any('/savePublicTemplate', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'savePublicTemplate'])->name('template_savePublicTemplate'); |
| 358 | Route::any('/getDetailInfo', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'getDetailInfo'])->name('template_getDetailInfo'); | 358 | Route::any('/getDetailInfo', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'getDetailInfo'])->name('template_getDetailInfo'); |
| 359 | Route::any('/saveDetail', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'saveDetail'])->name('template_saveDetail'); | 359 | Route::any('/saveDetail', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'saveDetail'])->name('template_saveDetail'); |
| 360 | - Route::any('/getSource', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'getSource'])->name('template_getSource'); | ||
| 361 | // 模板 | 360 | // 模板 |
| 362 | Route::prefix('module')->group(function () { | 361 | Route::prefix('module')->group(function () { |
| 363 | //获取所有左侧模版 | 362 | //获取所有左侧模版 |
-
请 注册 或 登录 后发表评论