作者 lyh

gx头部底部代码

正在显示 36 个修改的文件 包含 552 行增加91 行删除
... ... @@ -15,6 +15,7 @@ use App\Models\Project\CountryCustom;
use App\Models\Project\Project;
use Illuminate\Console\Command;
use App\Models\Domain\DomainInfo as DomainInfoModel;
use Symfony\Component\Process\Process;
class DomainInfo extends Command
{
... ... @@ -86,6 +87,7 @@ class DomainInfo extends Command
{
$domainModel = new DomainInfoModel();
$projectModel = new Project();
$serverIpModel = new ServersIp();
$end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
$list = $domainModel->where('status', '=', 1)->where(function ($query) use ($end_day) {
$query->whereNull('certificate_end_time')->orWhere('certificate_end_time', '<', $end_day);
... ... @@ -100,9 +102,8 @@ class DomainInfo extends Command
$project_info = $projectModel->read(['id' => $v['project_id']], ['serve_id']);
if ($v['type'] == 1 && $ssl['to'] < $end_day && $project_info) {
$serverIpModel = new ServersIp();
$servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id']);
if ($servers_ip_info && $servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID) {
$servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id', 'ip', 'domain']);
if ($servers_ip_info && $servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID && $this->check_cname($v['domain'], $servers_ip_info)) {
//非自建站项目,申请免费证书
$this->updatePrivate($v);
... ... @@ -126,6 +127,7 @@ class DomainInfo extends Command
{
$domainModel = new DomainInfoModel();
$projectModel = new Project();
$serverIpModel = new ServersIp();
$end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
$list = $domainModel->where('status', '=', 1)->where('amp_status', 1)->where(function ($query) use ($end_day) {
$query->whereNull('amp_certificate_end_time')->orWhere('amp_certificate_end_time', '<', $end_day);
... ... @@ -149,15 +151,14 @@ class DomainInfo extends Command
$project_info = $projectModel->read(['id' => $v['project_id']], ['serve_id']);
if ($v['amp_type'] == 1 && $ssl['to'] < $end_day && $project_info) {
$serverIpModel = new ServersIp();
$servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id']);
if ($servers_ip_info && $servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID) {
$servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id', 'ip', 'domain']);
if ($servers_ip_info && $servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID && $this->check_cname($amp_domain, $servers_ip_info)) {
//非自建站项目,申请免费证书
$this->updateAmpPrivate($v);
$ssl_new = $this->updateDomainSsl($v['domain']);
$ssl_new['from'] && $data['certificate_start_time'] = $ssl_new['from'];
$ssl_new['to'] && $data['certificate_end_time'] = $ssl_new['to'];
$ssl_new = $this->updateDomainSsl($amp_domain);
$ssl_new['from'] && $data['amp_certificate_start_time'] = $ssl_new['from'];
$ssl_new['to'] && $data['amp_certificate_end_time'] = $ssl_new['to'];
}
}
... ... @@ -173,6 +174,8 @@ class DomainInfo extends Command
public function startUpdateCustomCert()
{
$customModel = new CountryCustom();
$projectModel = new Project();
$serverIpModel = new ServersIp();
$end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
$list = $customModel->where('status', 1)->where('is_create', 1)->where(function ($query) use ($end_day) {
$query->whereNull('certificate_end_time')->orWhere('certificate_end_time', '<', $end_day);
... ... @@ -184,13 +187,17 @@ class DomainInfo extends Command
$ssl['from'] && $data['certificate_start_time'] = $ssl['from'];
$ssl['to'] && $data['certificate_end_time'] = $ssl['to'];
if ($v['type'] == 1 && $ssl['to'] < $end_day) {
//申请免费证书
$this->updateCustomPrivate($v['custom_domain']);
$project_info = $projectModel->read(['id' => $v['project_id']], ['serve_id']);
if ($v['type'] == 1 && $ssl['to'] < $end_day && $project_info) {
$servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id', 'ip', 'domain']);
if ($servers_ip_info && $servers_ip_info['servers_id'] != ServerConfig::SELF_SITE_ID && $this->check_cname($v['custom_domain'], $servers_ip_info)) {
//申请免费证书
$this->updateCustomPrivate($v['custom_domain']);
$ssl_new = $this->updateDomainSsl($v['domain']);
$ssl_new['from'] && $data['certificate_start_time'] = $ssl_new['from'];
$ssl_new['to'] && $data['certificate_end_time'] = $ssl_new['to'];
$ssl_new = $this->updateDomainSsl($v['domain']);
$ssl_new['from'] && $data['certificate_start_time'] = $ssl_new['from'];
$ssl_new['to'] && $data['certificate_end_time'] = $ssl_new['to'];
}
}
$customModel->edit($data, ['id' => $v['id']]);
... ... @@ -336,4 +343,41 @@ class DomainInfo extends Command
}
return ['start' => $start, 'end' => $end];
}
/**
* 验证是否cname或者A记录解析到目标服务器
* @param $domain
* @param $server_info
* @return mixed
* @author zbj
* @date 2023/11/13
*/
public function check_cname($domain, $server_info)
{
$process = new Process(['nslookup', '-qt=a', $domain]);
$process->run();
$output = explode(PHP_EOL, $process->getOutput());
foreach ($output as $line) {
if ($line) {
$checkA = strpos($line, $server_info['ip']) !== false;
if ($checkA) {
return $domain;
}
}
}
//是否cname
$process = new Process(['nslookup', '-qt=cname', $domain]);
$process->run();
$output = explode(PHP_EOL, $process->getOutput());
foreach ($output as $line) {
if ($line) {
$checkCname = (strpos($line, $server_info['domain']) !== false);
if ($checkCname) {
return $domain;
}
}
}
return false;
}
}
... ...
... ... @@ -6,6 +6,7 @@ use App\Models\Project\DeployOptimize;
use App\Models\Project\OnlineCheck;
use App\Models\Project\Project;
use Illuminate\Console\Command;
use App\Models\Domain\DomainInfo as DomainInfoModel;
/**
* 剩余服务时长
... ... @@ -76,6 +77,13 @@ class RemainDay extends Command
$item->remain_day = $remain_day > 0 ? $remain_day : 0;
if($item->remain_day == 0){
$item->extend_type = Project::TYPE_FIVE;
$item->site_status = Project::TYPE_ONE;//关闭站点
//TODO::未续费网站禁止登录及通知C端禁止网站
$domainModel = new DomainInfoModel();
$domainInfos = $domainModel->read(['project_id'=>$item->id]);
if($domainInfos !== false){
curl_get('https://'.$domainInfos['domain'].'/api/stop_or_start_website/');
}
}
$item->save();
}
... ...
... ... @@ -187,6 +187,7 @@ class SyncProject extends Command
'lead_name' => $param['principal_name'],
'mobile' => $param['principal_mobile'],
'mysql_id'=>Project::MYSQL_ID,
'serve_id'=>9,
'qq' => $param['customer_qq'],
'channel' => Channel::getProjectChannel($param['company_id'], $param['username_sales']),
'requirement' => $param['remark'],
... ...
... ... @@ -90,7 +90,7 @@ class RecommendedSuppliers extends Command
];
$res = http_post($url,json_encode($param));
echo date('Y-m-d H:i:s') . json_encode($res) . PHP_EOL;
if(!empty($res) && $res['code'] == 200 && !empty($res['data'])){
if(!empty($res) && isset($res['code']) && $res['code'] == 200 && !empty($res['data'])){
//保存多条数据
$saveData = [
'project_id'=>$project_id,
... ... @@ -115,8 +115,6 @@ class RecommendedSuppliers extends Command
* @time :2024/7/1 18:07
*/
public function getKeywords($project_id){
$keywordModel = new Keyword();
$keywordModel->
$info = Keyword::inRandomOrder()->first();
$keywordInfo = $this->getPurchaser($info->title,$project_id);
if($keywordInfo !== false){
... ...
... ... @@ -8,8 +8,11 @@
namespace App\Console\Commands\Test;
use App\Helper\Arr;
use App\Models\Blog\Blog;
use App\Models\Com\KeywordVideoTask;
use App\Models\Com\KeywordVideoTaskLog;
use App\Models\CustomModule\CustomModuleContent;
use App\Models\Devops\ServerConfig;
use App\Models\Devops\Servers;
use App\Models\Devops\ServersIp;
... ... @@ -23,6 +26,7 @@ use App\Models\Project\DeployOptimize;
use App\Models\Project\MinorLanguages;
use App\Models\Project\Project;
use App\Models\Purchaser\PurchaserInfo;
use App\Models\RouteMap\RouteMap;
use App\Services\AmazonS3Service;
use App\Services\ProjectServer;
use App\Utils\EncryptUtils;
... ... @@ -48,7 +52,7 @@ class Demo extends Command
protected $description = 'demo';
public function handle(){
$this->synchronizationFile('/upload/m/file/2024-07/tongli-haiyuan-keywords.pdf');
}
public function synchronizationFile($path_name){
... ...
... ... @@ -9,10 +9,13 @@
namespace App\Console\Commands\Test;
use App\Models\Project\Project;
use App\Models\Template\BTemplateCom;
use App\Models\Template\BTemplateCommon;
use App\Models\Template\Setting;
use App\Services\ProjectServer;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
/**
* @remark :头部底部分开 脚本数据
... ... @@ -49,7 +52,8 @@ class HeaderFooter extends Command
foreach ($list as $v){
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
ProjectServer::useProject($v['id']);
DB::table('gl_web_template_com')->truncate();
$templateComModel = new BTemplateCom();
$templateComModel->truncate();
$this->saveTemplateCom($v['id']);
DB::disconnect('custom_mysql');
}
... ...
... ... @@ -442,8 +442,8 @@ class HtmlCollect extends Command
foreach ($source as $vs) {
if ($vs['download']) {
if ($project_id == 1355 && in_array(substr($vs['url_complete'], -3), ['pdf', 'zip', 'rar', '.gz'])) {
//项目id为1355的项目,可下载类资源要保持原名称,做特殊处理
if (in_array(substr($vs['url_complete'], -3), ['pdf', 'zip', 'rar', '.gz'])) {
//可下载类资源要保持原名称
$new_source = CosService::uploadRemote($project_id, 'source', $vs['url_complete'], '', '', 1);
} else {
$new_source = CosService::uploadRemote($project_id, 'source', $vs['url_complete']);
... ...
... ... @@ -14,6 +14,7 @@ use App\Http\Controllers\Aside\BaseController;
use App\Http\Logic\Aside\Devops\ServersLogic;
use App\Models\Devops\Servers as ServersModel;
use App\Models\Devops\ServersIp;
use App\Models\Project\Project;
class ServersController extends BaseController
{
... ... @@ -46,6 +47,18 @@ class ServersController extends BaseController
if(isset($this->map['server_name']) && !empty($this->map['server_name'])){
$this->map['server_name'] = ['like','%'.$this->map['server_name'].'%'];
}
if(isset($this->map['project_name']) && !empty($this->map['project_name'])){
$projectModel = new Project();
$projectInfo = $projectModel->read(['title'=>['like','%'.$this->map['project_name'].'%']],['id','serve_id']);
if($projectInfo !== false){
$serversIpModel = new ServersIp();
$ipInfo = $serversIpModel->read(['id'=>$projectInfo['serve_id']],['servers_id']);
if($ipInfo !== false){
$this->map['id'] = $ipInfo['servers_id'];
}
}
unset($this->map['project_name']);
}
$serversModel = new ServersModel();
$data = $serversModel->lists($this->map,$this->page,$this->row,$this->order);
$this->response('success',Code::SUCCESS,$data);
... ...
... ... @@ -39,7 +39,7 @@ class ServersIpController extends BaseController
}
$serversIpModel = new ServersIpModel();
$this->map['status'] = 0;
$data = $serversIpModel->list($this->map);
$data = $serversIpModel->list($this->map,'total',['*'],'asc');
foreach ($data as $k => $v){
$v['is_optional'] = 0;//是否可选择
if($v['total'] >= $info['ip_total']){
... ... @@ -169,11 +169,14 @@ class ServersIpController extends BaseController
$info = $serverModel->read(['id'=>$this->map['servers_id']]);
$data = [];
$serversIpModel = new ServersIpModel();
$this->map['status'] = 0;
$list = $serversIpModel->list($this->map);
foreach ($list as $v){
$position = strpos($v['domain'], '.');
$result = substr($v['domain'], 0, $position);
$data[] = ['记录类型'=>'A','主机记录'=>$result,'解析线路'=>'默认','记录值'=>$v['ip'],'MAX优先级'=>'','TTL值'=>600,'状态(暂停/启用)'=>'启用','备注'=>$info['server_name']];
if(!empty($list)){
foreach ($list as $v){
$position = strpos($v['domain'], '.');
$result = substr($v['domain'], 0, $position);
$data[] = ['记录类型'=>'A','主机记录'=>$result,'解析线路'=>'默认','记录值'=>$v['ip'],'MAX优先级'=>'','TTL值'=>600,'状态(暂停/启用)'=>'启用','备注'=>$info['server_name']];
}
}
$this->response('success',Code::SUCCESS,$data);
}
... ...
... ... @@ -174,6 +174,7 @@ class OptimizeController extends BaseController
'gl_project.is_translate AS is_translate',
'gl_project.is_translate_tag AS is_translate_tag',
'gl_project.is_upgrade AS is_upgrade',
'gl_project.site_status AS site_status',
'gl_project_online_check.id AS online_check_id',
'gl_project_online_check.question AS question',
'gl_project_online_check.go_question AS go_question',
... ... @@ -220,6 +221,9 @@ class OptimizeController extends BaseController
if(isset($this->map['title']) && !empty($this->map['title'])){
$query = $query->where('gl_project.title','like','%'.$this->map['title'].'%');
}
if(isset($this->map['site_status'])){
$query = $query->where('gl_project.site_status',$this->map['site_status']);
}
if(isset($this->map['ai_video']) && !empty($this->map['ai_video'])){
$query = $query->where('gl_project_deploy_optimize.ai_video',$this->map['ai_video']);
}
... ...
... ... @@ -21,6 +21,7 @@ use App\Models\Com\City;
use App\Models\Com\UpdateLog;
use App\Models\Devops\ServerConfig;
use App\Models\Domain\DomainInfo;
use App\Models\Domain\DomainInfo as DomainInfoModel;
use App\Models\HomeCount\Count;
use App\Models\Inquiry\InquirySet;
use App\Models\Manage\BelongingGroup;
... ... @@ -92,6 +93,7 @@ class ProjectController extends BaseController
'gl_project.is_upgrade AS is_upgrade',
'gl_project.created_at AS created_at',
'gl_project.cooperate_date AS cooperate_date',
'gl_project.site_status AS site_status',
'gl_project_online_check.id AS online_check_id',
'gl_project_online_check.question AS question',
'gl_project_online_check.optimist_status AS optimist_status',
... ... @@ -273,6 +275,12 @@ class ProjectController extends BaseController
if(isset($this->map['optimize_optimist_mid'])){
$query = $query->where('gl_project_deploy_optimize.optimist_mid',$this->map['optimize_optimist_mid']);
}
if(isset($this->map['plan'])){
$query = $query->where('gl_project_deploy_build.plan',$this->map['plan']);
}
if(isset($this->map['site_status'])){
$query = $query->where('gl_project.site_status',$this->map['site_status']);
}
return $query;
}
... ... @@ -1047,4 +1055,32 @@ class ProjectController extends BaseController
$deployBuildModel->edit(['is_participle'=>$this->param['is_participle']],['project_id'=>$this->param['project_id']]);
$this->response('success');
}
/**
* @remark :(on/off)站点
* @param : site_status(站点状态0/1:开启/关闭),id(项目id)
* @name :saveSiteStatus
* @author :lyh
* @method :post
* @time :2024/7/29 17:12
*/
public function saveSiteStatus(){
$projectModel = new Project();
$this->request->validate([
'project_id'=>'required',
'site_status'=>'required'
],[
'project_id.required' => '项目id不能为空',
'site_status.required' => '状态不能为空',
]);
$projectModel->edit(['site_status'=>$this->map['site_status']],['id'=>$this->param['project_id']]);
//TODO::通知C端
$domainModel = new DomainInfoModel();
$domainInfo = $domainModel->read(['project_id'=>$this->param['project_id']]);
if($domainInfo !== false){
$rs = curl_get('https://'.$domainInfo['domain'].'/api/stop_or_start_website/');
@file_put_contents(storage_path('logs/site_status.log'), var_export('通知C端on/off'.$domainInfo['domain'].'.返回结果:'.json_encode($rs), true) . PHP_EOL, FILE_APPEND);
}
$this->response('success');
}
}
... ...
... ... @@ -108,7 +108,9 @@ class RenewProjectController extends BaseController
*/
public function notHaveRenewItems(Project $project){
$this->map['extend_type'] = $project::TYPE_FIVE;//未续费网站 if(!empty($param['search']) && !empty($param['search_type'])){
$this->map['title'] = ['like', '%'.$this->map['title'].'title'];
if(!empty($this->map['title'])){
$this->map['title'] = ['like', '%'.$this->map['title'].'%'];
}
$lists = $project->where($this->map)->with('payment')->with('deploy_build')
->with('deploy_optimize')->with('online_check')
->with('project_after')->paginate($this->row, ['*'], 'page', $this->page);
... ... @@ -165,6 +167,7 @@ class RenewProjectController extends BaseController
'optimist_status'=>$item['online_check']['optimist_status'] ?? 0,
'qa_status'=>$item['online_check']['qa_status'] ?? 0,
'service_day'=>$item['remain_day'] ?? 0,
'site_status'=>$item['site_status'],
];
return $item;
}
... ...
... ... @@ -48,7 +48,6 @@ class CNoticeController extends BaseController
$url = $request->input('url', []);
$language = $request->input('language', []);
$is_sitemap = intval($request->input('is_sitemap', 0));
//获取项目所在服务器
$project_model = new Project();
$project_info = $project_model->read(['id'=>$project_id],['serve_id']);
... ... @@ -106,8 +105,10 @@ class CNoticeController extends BaseController
'is_sitemap' => $is_sitemap
];
http_post($c_url, json_encode($param));
// $shell = 'curl -X POST ' . escapeshellarg($c_url) . ' -H "Content-Type: application/json"' .
// ' -d ' . escapeshellarg(json_encode($param)) . ' > /dev/null 2>&1 &';
// shell_exec($shell);
}
$this->response('更新中请稍后, 更新完成将会发送站内信通知更新结果!');
}
... ...
... ... @@ -278,4 +278,5 @@ class BaseController extends Controller
];
return http_post($c_url, json_encode($param));
}
}
... ...
... ... @@ -159,6 +159,7 @@ class ProductController extends BaseController
$query = $query->whereIn('id',$product_id_arr);
}
if(isset($this->map['title']) && !empty($this->map['title'])){
$this->map['title'] = str_replace('+',' ',$this->map['title']);
$query = $query->where('title','like','%'.$this->map['title'].'%');
}
if(isset($this->map['status'])){
... ...
... ... @@ -220,7 +220,7 @@ class RankDataController extends BaseController
$res = HttpUtils::get('http://rank.waimaoq.com/luminati_rank', $param);
if ($res) {
$res = Arr::s2a($res);
$data['position'] = $res['position'];
$data['position'] = $res['position'] ?? '';
}
}
... ...
... ... @@ -60,9 +60,9 @@ class TranslateController extends BaseController
'language_id.required' => 'language_id不能为空',
]);
$this->map['type'] = 1;
$data = $translate->list($this->map);
$data = $translate->formatQuery($this->map)->with('translate_data')->get()->toArray();
foreach ($data as $k=>$v){
$v['data'] = json_decode($v['data']);
$v['data'] = json_decode($v['translate_data']['data'],JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$data[$k] = $v;
}
$this->response('success',Code::SUCCESS,$data);
... ...
<?php
/**
* @remark :
* @name :BProjectComConfigController.php
* @author :lyh
* @method :post
* @time :2024/8/1 14:24
*/
namespace App\Http\Controllers\Bside\Template;
use App\Enums\Common\Code;
use App\Http\Controllers\Bside\BaseController;
use App\Http\Logic\Bside\BTemplate\BProjectComConfigLogic;
class BProjectComConfigController extends BaseController
{
/**
* @remark :获取头部底部配置
* @name :getIsComConfig
* @author :lyh
* @method :post
* @time :2024/8/1 15:08
*/
public function getIsComConfig(BProjectComConfigLogic $logic){
$data = $logic->getIsComConfig();
$this->response('success',Code::SUCCESS,$data);
}
/**
* @remark :保存配置
* @name :saveComConfig
* @author :lyh
* @method :post
* @time :2024/8/1 15:38
*/
public function saveComConfig(BProjectComConfigLogic $logic){
$this->request->validate([
'data'=>'required',
],[
'data.required' => 'data不能为空',
]);
$logic->saveComConfig();
$this->response('success');
}
}
... ...
... ... @@ -31,6 +31,23 @@ class BTemplateController extends BaseController
}
/**
* @remark :获取数据详情
* @name :templateInfo
* @author :lyh
* @method :post
* @time :2024/7/31 14:27
*/
public function publicInfo(BTemplateLogic $BTemplateLogic){
$this->request->validate([
'id'=>'required',
],[
'id.required' => 'id不能为空',
]);
$info = $BTemplateLogic->getPublicTemplateInfo();
$this->response('success',Code::SUCCESS,$info);
}
/**
* @remark :获取用户模版id
* @name :getUserTemplate
* @author :lyh
... ...
... ... @@ -93,9 +93,11 @@ class CustomModuleLogic extends BaseLogic
'name'=>$this->param['route'],
'module_id'=>$id,
'project_id'=>$this->param['project_id'],
'route'=>RouteMap::setRoute($this->param['route'],RouteMap::SOURCE_MODULE_CATE,$id,$this->param['project_id'])
'route'=>$this->param['route']
];
$customModuleCateModel->add($data);
$cateId = $customModuleCateModel->addReturnId($data);
$route = RouteMap::setRoute($this->param['route'],RouteMap::SOURCE_MODULE_CATE,$cateId,$this->param['project_id']);
$customModuleCateModel->edit(['route'=>$route],['id'=>$cateId]);
}
return $this->success();
}
... ...
... ... @@ -82,6 +82,13 @@ class ServersIpLogic extends BaseLogic
if(empty($v)){
continue;
}
$ipInfo = $this->model->read(['ip'=>$v]);
if($ipInfo !== false){
if($ipInfo['status'] == 1){
$this->model->edit(['status'=>0],['id'=>$ipInfo['id']]);
}
continue;
}
$param = [
'ip'=>$v,
'domain'=>ip_to_unique_string($v).'.'.$info['domain'],
... ...
... ... @@ -261,26 +261,23 @@ class DomainInfoLogic extends BaseLogic
$this->fail('获取项目数据失败');
}
$serverIpModel = new ServersIp();
$serversIpInfo = $serverIpModel->read(['id'=>$project_info['serve_id']],['servers_id','ip']);
$serversIpInfo = $serverIpModel->read(['id'=>$project_info['serve_id']],['servers_id','ip','domain']);
if($serversIpInfo === false){
$this->fail('获取服务器数据失败');
}
$serverModel = new Servers();
$serverInfo = $serverModel->read(['id'=>$serversIpInfo['servers_id']],['init_domain']);
$server_info = ['domain'=>$serverInfo['init_domain'],'ip'=>$serversIpInfo['ip']];
if($serversIpInfo['servers_id'] == 7){
if($serversIpInfo['servers_id'] == ServerConfig::SELF_TEST_ID){
$this->fail('请切换服务器,生成站点不能使用测试服务器');
}
if($serversIpInfo['servers_id'] == ServerConfig::SELF_SITE_ID){
$this->model->edit(['amp_status' => $this->param['amp_status'] ?? 0,],['id'=>$this->param['id']]);
$this->model->edit(['amp_status' => $this->param['amp_status'] ?? 0],['id'=>$this->param['id']]);
$this->fail('自建站服务器无法生成站点');
}
//域名是否都已经解析
if(!empty($info['domain']) && !$this->check_cname($info['domain'], $server_info)){
if(!empty($info['domain']) && !$this->check_cname($info['domain'], $serversIpInfo)){
$this->fail('域名' . $info['domain'] . '未解析至目标服务器');
}
foreach ($this->param['other_domain']??[] as $other_domain){
if($other_domain && !$this->check_cname($other_domain, $server_info)){
if($other_domain && !$this->check_cname($other_domain, $serversIpInfo)){
$this->fail('域名' . $other_domain . '未解析至目标服务器');
}
}
... ... @@ -296,7 +293,7 @@ class DomainInfoLogic extends BaseLogic
$host_array[0] = 'm';
}
$amp_domain = implode('.',$host_array);
if(!$this->check_cname($amp_domain, $server_info)){
if(!$this->check_cname($amp_domain, $serversIpInfo)){
$this->fail('AMP站点域名' . $amp_domain . '未解析至目标服务器');
}
}
... ... @@ -385,14 +382,11 @@ class DomainInfoLogic extends BaseLogic
if($this->param['is_create']){
//需要创建站点
$serverIpModel = new ServersIp();
$serversIpInfo = $serverIpModel->read(['id'=>$project_info['serve_id']],['servers_id','ip']);
$serversIpInfo = $serverIpModel->read(['id'=>$project_info['serve_id']],['servers_id','ip','domain']);
if($serversIpInfo === false){
$this->fail('获取服务器数据失败');
}
$serverModel = new Servers();
$serverInfo = $serverModel->read(['id'=>$serversIpInfo['servers_id']],['init_domain']);
$server_info = ['domain'=>$serverInfo['init_domain'],'ip'=>$serversIpInfo['ip']];
if($serversIpInfo['servers_id'] == 7){
if($serversIpInfo['servers_id'] == ServerConfig::SELF_TEST_ID){
$this->fail('请切换服务器,生成站点不能使用测试服务器');
}
if($serversIpInfo['servers_id'] == ServerConfig::SELF_SITE_ID){
... ... @@ -412,7 +406,7 @@ class DomainInfoLogic extends BaseLogic
if($has_info && ($has_info['project_id'] != $project_id || $has_info['language_id'] != $this->param['language_id'])){
$this->fail('自定义域名已被使用');
}
if(!$this->check_cname($this->param['custom_domain'], $server_info)){
if(!$this->check_cname($this->param['custom_domain'], $serversIpInfo)){
$this->fail('域名' . $this->param['custom_domain'] . '未解析至目标服务器');
}
}else{
... ...
<?php
/**
* @remark :
* @name :BProjectComConfigLogic.php
* @author :lyh
* @method :post
* @time :2024/8/1 14:25
*/
namespace App\Http\Logic\Bside\BTemplate;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\CustomModule\CustomModule;
use App\Models\IsCom\ProjectComConfig;
use App\Models\Template\BTemplate;
/**
* @remark :独立头部——底部设置
* @name :BProjectComConfigLogic
* @author :lyh
* @method :post
* @time :2024/8/1 14:43
*/
class BProjectComConfigLogic extends BaseLogic
{
/**
* 初始化数据
*/
public function __construct()
{
parent::__construct();
$this->model = new ProjectComConfig();
$this->param = $this->requestAll;
}
const PUB_STATUS = 0;//公共
const PRO_STATUS = 1;//獨立
const IS_LIST = 1;
const IS_DETAIL = 0;
const IS_NO_CUSTOM = 0;
const IS_CUSTOM = 1;//扩展模块
/**
* @remark :获取初始数据
* @name :getIsComSetting
* @author :lyh
* @method :post
* @time :2024/8/1 15:02
*/
public function getIsComConfig(){
$data = [];
$data = $this->initParamData($data);
$data = $this->initPageParamData($data);
$data = $this->initCustomData($data);
return $this->success($data);
}
/**
* @remark :(独立头底)初始数据
* @name :initializedData
* @author :lyh
* @method :post
* @time :2024/8/1 11:52
*/
public function initParamData(&$data){
//默认模块
$initParam = $this->model->initParam;
foreach ($initParam as $pKey => $pValue){
$is_list = [self::IS_LIST,self::IS_DETAIL];
foreach ($is_list as $isValue){
//查询当前数据是否已保存
$info = $this->model->read(['source'=>$pValue,'is_list'=>$isValue,'is_custom'=>BTemplate::IS_NO_CUSTOM],['name','source','is_list','is_custom','header_status','footer_status']);
if($info !== false){
$data[] = $info;
}else{
$data[] = [
'name'=>$pKey.($isValue == 0 ? '详情' : '列表'),
'source'=>$pValue,
'is_list'=>$isValue,
'is_custom'=>self::IS_NO_CUSTOM,
'header_status'=>self::PUB_STATUS,
'footer_status'=>self::PUB_STATUS,
];
}
}
}
return $this->success($data);
}
/**
* @remark :单页面初始化
* @name :initPageParamData
* @author :lyh
* @method :post
* @time :2024/8/1 14:37
*/
public function initPageParamData(&$data){
$initPageParam = $this->model->initPageParam;
foreach($initPageParam as $key => $value){
$info = $this->model->read(['source'=>$value,'is_list'=>self::IS_DETAIL,'is_custom'=>BTemplate::IS_NO_CUSTOM],['name','source','is_list','is_custom','header_status','footer_status']);
if($info !== false){
$data[] = $info;
}else{
$data[] = [
'name'=>$key,
'source'=>$value,
'is_list'=>self::IS_DETAIL,
'is_custom'=>self::IS_NO_CUSTOM,
'header_status'=>self::PUB_STATUS,
'footer_status'=>self::PUB_STATUS,
];
}
}
return $this->success($data);
}
/**
* @remark :获取扩展模块初始数据
* @name :initCustomData
* @author :lyh
* @method :post
* @time :2024/8/1 14:42
*/
public function initCustomData(&$data){
$customModel = new CustomModule();
$customList = $customModel->list(['status'=>0]);
$is_list = [self::IS_LIST,self::IS_DETAIL];
foreach($customList as $value){
foreach ($is_list as $isValue){
$info = $this->model->read(['source'=>$value['id'],'is_list'=>$isValue,'is_custom'=>BTemplate::IS_CUSTOM],['id','name','source','is_list','is_custom','header_status','footer_status']);
if($info !== false){
$data[] = $info;
}else{
$data[] = [
'name'=>$value['name'].($isValue == self::IS_DETAIL ? '详情' : '列表'),
'source'=>$value['id'],
'is_list'=>$isValue,
'is_custom'=>self::IS_CUSTOM,
'header_status'=>self::PUB_STATUS,
'footer_status'=>self::PUB_STATUS,
];
}
}
}
return $this->success($data);
}
/**
* @remark :保存配置
* @name :saveComConfig
* @author :lyh
* @method :post
* @time :2024/8/1 15:41
*/
public function saveComConfig(){
$data = $this->param['data'];
foreach ($data as $k => $v){
if(isset($v['id']) && !empty($v['id'])){
$id = $v['id'];
unset($v['id']);
$this->model->edit($v,['id'=>$id]);
}else{
//查询当前数据是否存在
$this->model->add($v);
}
}
return $this->success();
}
}
... ...
... ... @@ -6,6 +6,7 @@ use App\Http\Logic\Bside\BaseLogic;
use App\Models\Blog\BlogCategory;
use App\Models\CustomModule\CustomModule;
use App\Models\CustomModule\CustomModuleCategory;
use App\Models\IsCom\ProjectComConfig;
use App\Models\News\NewsCategory;
use App\Models\Product\Category;
use App\Models\Project\PageSetting;
... ... @@ -52,6 +53,19 @@ class BTemplateLogic extends BaseLogic
}
/**
* @remark :获取模版详情
* @name :getPublicTemplateInfo
* @author :lyh
* @method :post
* @time :2024/7/31 14:31
*/
public function getPublicTemplateInfo(){
$templateModel = new Template();
$info = $templateModel->read($this->param);
return $this->success($info);
}
/**
* @remark :获取可视化html
* @name :getTemplateHtml
* @author :lyh
... ... @@ -565,39 +579,38 @@ class BTemplateLogic extends BaseLogic
}
/**
* @remark :(非定制)保存时获取获取设置的类型
* @name :getType
* @remark :获取类型
* @name :getTypes
* @author :lyh
* @method :post
* @time :2023/10/21 17:29
* @time :2024/8/1 16:01
*/
public function getType($source,$is_list,$is_custom = BTemplate::IS_NO_CUSTOM,$CommonType = BTemplate::COMMON_HEAD,$template_id = 0){
public function getType($source,$is_list,$is_custom = BTemplate::IS_NO_CUSTOM,$commonType = BTemplate::COMMON_HEAD,$template_id = 0){
if($template_id == 0){
return $this->success($source);
}
$type = BTemplate::SOURCE_COM;//公共头部底部
$is_head = $this->user['configuration']['is_head'] ?? BTemplate::IS_NO_HEADER;
if($is_custom == BTemplate::IS_CUSTOM || $is_head == BTemplate::IS_NO_HEADER){//拓展模块为公共头+底
if($is_head == BTemplate::IS_NO_HEADER){//拓展模块为公共头+底
return $this->success($type);
}
//查看页面是否设置自定义头部底部
$pageSettingModel = new PageSetting();
$pageInfo = $pageSettingModel->read(['project_id' => $this->user['project_id'],'type'=>$CommonType]);
if ($pageInfo === false) {
$comConfigModel = new ProjectComConfig();
$configInfo = $comConfigModel->read(['source'=>$source,'is_list'=>$is_list,'is_custom'=>$is_custom]);
if($configInfo === false){
return $this->success($type);
}
if($source == BTemplate::SOURCE_HOME){if ($pageInfo['home'] != 0){$type = BTemplate::SOURCE_HOME;}}
if ($source == BTemplate::SOURCE_PRODUCT) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}}
else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::SOURCE_PRODUCT;}}}
if ($source == BTemplate::SOURCE_BLOG) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::SOURCE_BLOG;}}
else {if ($pageInfo['blog_list'] != 0) {$type = BTemplate::SOURCE_BLOG;}}}
if ($source == BTemplate::SOURCE_NEWS) {if ($is_list != BTemplate::IS_LIST) {if ($pageInfo['news_details'] != 0) {$type = BTemplate::SOURCE_NEWS;}}
else {if ($pageInfo['news_list'] != 0) {$type = BTemplate::SOURCE_NEWS;}}}
if ($source == BTemplate::SOURCE_KEYWORD) {if ($pageInfo['polymerization'] != 0) {$type = BTemplate::SOURCE_KEYWORD;}}
//头部
if($commonType == BTemplate::COMMON_HEAD){
return $this->success($configInfo['header_status'] == 0 ? $type : $source);
}
//底部
if($commonType == BTemplate::COMMON_FOOTER){
return $this->success($configInfo['footer_status'] == 0 ? $type : $source);
}
return $this->success($type);
}
/**
* @remark :生成记录
* @name :setTemplateLog
... ...
... ... @@ -3,6 +3,7 @@
namespace App\Http\Logic\Bside\BTemplate;
use App\Http\Logic\Bside\BaseLogic;
use App\Models\IsCom\ProjectComConfig;
use App\Models\Project\PageSetting;
use App\Models\RouteMap\RouteMap;
use App\Models\Service\Service as ServiceSettingModel;
... ... @@ -194,8 +195,11 @@ class CustomTemplateLogic extends BaseLogic
if($bSettingInfo === false){
$this->fail('请先选择模版');
}
$handleInfo = $this->handleResultParam($html);
$this->saveTemplateCom($handleInfo,$bSettingInfo['template_id']);
if(!isset($this->param['template_status'])){//代表直接替换模版 不更新头部底部
$this->saveTemplateCom($handleInfo,$bSettingInfo['template_id']);
}
$this->param['html'] = $handleInfo['main_html'];
$this->param['html_style'] = $handleInfo['main_style'];
}
... ... @@ -308,16 +312,26 @@ class CustomTemplateLogic extends BaseLogic
* @method :post
* @time :2023/10/21 17:29
*/
public function getType($CommonType = BTemplate::COMMON_HEAD){
public function getType($commonType = BTemplate::COMMON_HEAD){
$type = BTemplate::SOURCE_COM;//公共头部底部
$is_head = $this->user['configuration']['is_head'] ?? BTemplate::IS_NO_HEADER;
if($is_head == BTemplate::IS_NO_HEADER){
return $this->success($type);
}
//查看页面是否设置自定义头部底部
$pageSettingModel = new PageSetting();
$pageInfo = $pageSettingModel->read(['project_id' => $this->user['project_id'],'type'=>$CommonType]);
if ($pageInfo !== false) {if ($pageInfo['page_list'] != 0) {$type = 9;}}
$comConfigModel = new ProjectComConfig();
$configInfo = $comConfigModel->read(['source'=>9,'is_list'=>0,'is_custom'=>0]);
if ($configInfo === false) {
return $this->success($type);
}
//头部
if($commonType == BTemplate::COMMON_HEAD){
return $this->success($configInfo['header_status'] == 0 ? $type : 9);
}
//底部
if($commonType == BTemplate::COMMON_FOOTER){
return $this->success($configInfo['footer_status'] == 0 ? $type : 9);
}
return $this->success($type);
}
... ...
... ... @@ -193,8 +193,11 @@ class BlogLogic extends BaseLogic
* @time :2023/10/20 9:02
*/
public function getCategory($category){
if(empty($category)){
return '';
}
$str = implode(',',$category);
return !empty(trim(trim($str,','),',')) ? ','.$str.',' : '';
return !empty(trim(trim($str,','),',')) ? ','.trim(trim($str,','),',').',' : '';
}
/**
... ...
... ... @@ -213,7 +213,7 @@ class NewsLogic extends BaseLogic
*/
public function getCategory($category){
$str = implode(',',$category);
return !empty(trim(trim($str,','),',')) ? ','.$str.',' : '';
return !empty(trim(trim($str,','),',')) ? ','.trim(trim($str,','),',').',' : '';
}
/**
... ...
... ... @@ -156,6 +156,9 @@ class UserLoginLogic
*/
public function autoAssembleParam($info){
$project = $this->getProjectInfo($info['project_id']);
if($project['site_status'] != 0){//关闭站点
$this->fail('当前网站已过期,请联系管理员及时续费。');
}
$info['title'] = $project['title'] ?? '';
$info['company'] = $project['company'] ?? '';
$info['from_order_id'] = $project['from_order_id'] ?? '';
... ... @@ -257,6 +260,9 @@ class UserLoginLogic
$info = $this->model->read(['mobile'=>$mobile,'project_id'=>$project_id],['id','mobile','status','role_id','token','name','wechat','project_id']);
//获取项目详情
$project = $this->getProjectInfo($project_id);
if($project['site_status'] != 0){//关闭站点
$this->fail('当前网站已过期,请联系管理员及时续费。');
}
$info['title'] = $project['title'] ?? '';
$info['company'] = $project['company'] ?? '';
$info['from_order_id'] = $project['from_order_id'] ?? '';
... ...
... ... @@ -53,17 +53,21 @@ class EditAmpDomainBt implements ShouldQueue
if ($project_info === false) {
return $this->output($domain_info['domain'] . ':获取项目数据失败');
}
//获取服务器数据
$serverIpModel = new ServersIp();
$serversIpInfo = $serverIpModel->read(['id'=>$project_info['serve_id']],['servers_id','ip']);
$serversIpInfo = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id']);
if ($serversIpInfo === false) {
return $this->output($domain_info['domain'] . ':获取服务器数据失败');
}
$serverModel = new Servers();
$serverInfo = $serverModel->read(['id'=>$serversIpInfo['servers_id']],['init_domain']);
$server_info = ['domain'=>$serverInfo['init_domain'],'ip'=>$serversIpInfo['ip']];
$serverInfo = $serverModel->read(['id' => $serversIpInfo['servers_id']], ['init_domain']);
if ($serverInfo === false) {
return $this->output($domain_info['domain'] . ':获取服务器数据失败');
}
//编辑amp站
$api_url_amp = 'http://' . $server_info['domain'] . '/api/createSiteAmp';
$api_url_amp = 'http://' . $serverInfo['init_domain'] . '/api/createSiteAmp';
$api_param_amp = [
'domain' => $domain_info['domain'],
'not_allow_country' => $domain_info['not_allow_country'],
... ...
... ... @@ -46,24 +46,26 @@ class EditCustomDomainBt implements ShouldQueue
if ($domain_info === false) {
return $this->output($domain_info['custom_domain'] . ':获取域名数据失败');
}
//获取项目数据
$project_model = new Project();
$project_info = $project_model->read(['id' => $domain_info['project_id']], 'serve_id');
if ($project_info === false) {
return $this->output($domain_info['custom_domain'] . ':获取项目数据失败');
}
//获取服务器数据
$serverIpModel = new ServersIp();
$serversIpInfo = $serverIpModel->read(['id'=>$project_info['serve_id']],['servers_id','ip']);
$serversIpInfo = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id']);
if ($serversIpInfo === false) {
return $this->output($domain_info['custom_domain'] . ':获取服务器数据失败');
}
$serverModel = new Servers();
$serverInfo = $serverModel->read(['id'=>$serversIpInfo['servers_id']],['init_domain']);
$server_info = ['domain'=>$serverInfo['init_domain'],'ip'=>$serversIpInfo['ip']];
$serverInfo = $serverModel->read(['id' => $serversIpInfo['servers_id']], ['init_domain']);
//编辑站点
if ($domain_info['type'] == 2) {
$api_url = 'http://' . $server_info['domain'] . '/api/setSsl';
$api_url = 'http://' . $serverInfo['init_domain'] . '/api/setSsl';
$api_param = [
'domain' => $domain_info['custom_domain'],
'private_key' => $domain_info['private_key'],
... ... @@ -73,7 +75,7 @@ class EditCustomDomainBt implements ShouldQueue
'is_https' => 1
];
} else {
$api_url = 'http://' . $server_info['domain'] . '/api/applySsl';
$api_url = 'http://' . $serverInfo['init_domain'] . '/api/applySsl';
$api_param = [
'domain' => $domain_info['custom_domain'],
'rewrite' => [],
... ...
... ... @@ -56,16 +56,19 @@ class EditDomainBt implements ShouldQueue
//获取服务器数据
$serverIpModel = new ServersIp();
$serversIpInfo = $serverIpModel->read(['id'=>$project_info['serve_id']],['servers_id','ip']);
$serversIpInfo = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id']);
if ($serversIpInfo === false) {
return $this->output($domain_info['domain'] . ':获取服务器数据失败');
}
$serverModel = new Servers();
$serverInfo = $serverModel->read(['id'=>$serversIpInfo['servers_id']],['init_domain']);
$server_info = ['domain'=>$serverInfo['init_domain'],'ip'=>$serversIpInfo['ip']];
$serverInfo = $serverModel->read(['id' => $serversIpInfo['servers_id']], ['init_domain']);
if ($serverInfo === false) {
return $this->output($domain_info['domain'] . ':获取服务器数据失败');
}
//编辑主站
if ($domain_info['type'] == 2) {
$api_url = 'http://' . $server_info['domain'] . '/api/setSsl';
$api_url = 'http://' . $serverInfo['init_domain'] . '/api/setSsl';
$api_param = [
'domain' => $domain_info['domain'],
'private_key' => $domain_info['private_key'],
... ... @@ -78,7 +81,7 @@ class EditDomainBt implements ShouldQueue
'is_redirect' => $domain_info['is_redirect']
];
} else {
$api_url = 'http://' . $server_info['domain'] . '/api/applySsl';
$api_url = 'http://' . $serverInfo['init_domain'] . '/api/applySsl';
$api_param = [
'domain' => $domain_info['domain'],
'rewrite' => $domain_info['extend_config'],
... ...
... ... @@ -35,6 +35,7 @@ class ServerConfig extends Base
const STATUS_ONE = 1;
const SELF_SITE_ID = 6;//自建站服务器ID
const SELF_TEST_ID = 7;//测试服务器ID
/**
* @remark :获取数据用户名解密
... ...
<?php
/**
* @remark :
* @name :ProjectComConfig.php
* @author :lyh
* @method :post
* @time :2024/8/1 11:50
*/
namespace App\Models\IsCom;
use App\Models\Base;
use App\Models\Project\Project;
use App\Models\Template\BTemplate;
use App\Models\Template\Template;
/**
* @remark :是否为独立头部+底部
* @name :ProjectComConfig
* @author :lyh
* @method :post
* @time :2024/8/1 11:51
*/
class ProjectComConfig extends Base
{
protected $table = 'gl_project_com_config';
//连接数据库
protected $connection = 'custom_mysql';
/**
* @name :(包含详情页+列表页)
* @var array
*/
public $initParam = [
'产品'=>BTemplate::SOURCE_PRODUCT,
'博客'=>BTemplate::SOURCE_BLOG,
'新闻'=>BTemplate::SOURCE_NEWS,
];
/**
* @name : 单一界面
* @var array
*/
public $initPageParam = [
'首页'=>BTemplate::SOURCE_HOME,
'单页面'=>BTemplate::SOURCE_PAGE,
];
}
... ...
... ... @@ -23,6 +23,8 @@ class BTemplate extends Base
const SOURCE_NEWS = 4;//新闻详情页
const SOURCE_KEYWORD = 5;//聚合页
const SOURCE_PAGE = 9;//单页面
const SOURCE_CUSTOM = 7;//自定义模块
/**
... ... @@ -34,8 +36,8 @@ class BTemplate extends Base
* 公共头部底部连接部分
*/
const COMMON_HEAD = 1;//公共头部
const COMMON_FOOTER = 2;//公共头部
const COMMON_OTHER = 3;//公共头部
const COMMON_FOOTER = 2;//公共底部
const COMMON_OTHER = 3;//公共other
/**
* 独立头部类型
*/
... ...
... ... @@ -190,7 +190,7 @@ Route::middleware(['aloginauth'])->group(function () {
Route::any('/saveWebTrafficConfig', [Aside\Project\ProjectController::class, 'saveWebTrafficConfig'])->name('admin.project_web_traffic_config_save');//保存引流配置
Route::any('/updateProjectManager', [Aside\Project\ProjectController::class, 'updateProjectManager'])->name('admin.project_updateProjectManager');//更改项目人员配置
Route::any('/setIsParticiple', [Aside\Project\ProjectController::class, 'setIsParticiple'])->name('admin.project_setIsParticiple');//开启/关闭分词
Route::any('/saveSiteStatus', [Aside\Project\ProjectController::class, 'saveSiteStatus'])->name('admin.project_saveSiteStatus');
//获取关键词前缀和后缀
Route::prefix('keyword')->group(function () {
Route::any('/getKeywordPrefix', [Aside\Project\KeywordPrefixController::class, 'getKeywordPrefix'])->name('admin.keyword_getKeywordPrefix');
... ...
... ... @@ -356,6 +356,7 @@ Route::middleware(['bloginauth'])->group(function () {
Route::prefix('template')->group(function () {
//获取所有公共主题模版
Route::any('/publicTemplateLists', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'publicTemplateLists'])->name('template_publicTemplateLists');
Route::any('/publicInfo', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'publicInfo'])->name('template_publicInfo');
//获取选中的主题模版
Route::any('/getPublicTemplate', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'getPublicTemplate'])->name('template_getPublicTemplate');
Route::any('/getTemplate', [\App\Http\Controllers\Bside\Template\BTemplateController::class, 'getTemplate'])->name('template_getTemplate');
... ... @@ -553,6 +554,12 @@ Route::middleware(['bloginauth'])->group(function () {
Route::any('/save', [\App\Http\Controllers\Bside\Template\BTemplateLabelController::class, 'save'])->name('template_label_save');
Route::any('/del', [\App\Http\Controllers\Bside\Template\BTemplateLabelController::class, 'del'])->name('template_label_del');
});
//设置公共头部+底部配置
Route::prefix('com_config')->group(function () {
Route::any('/getIsComConfig', [\App\Http\Controllers\Bside\Template\BProjectComConfigController::class, 'getIsComConfig'])->name('com_config_getIsComConfig');
Route::any('/saveComConfig', [\App\Http\Controllers\Bside\Template\BProjectComConfigController::class, 'saveComConfig'])->name('com_config_getIsComConfig');
});
});
//无需登录验证的路由组
Route::group([], function () {
... ...