作者 lyh

gx

... ... @@ -182,7 +182,10 @@ class OptimizeController extends BaseController
});
}
if(isset($this->map['domain']) && !empty($this->map['domain'])){
$query = $query->where('gl_project_deploy_optimize.domain','like','%'.$this->map['domain'].'%');
$parsedUrl = parse_url($this->map['domain']);
$this->map['domain'] = $parsedUrl['host'] ?? $this->map['domain'];
$ids = DomainInfo::where('domain', 'like', '%'.$this->map['domain'].'%')->pluck('id')->toArray();
$query = $query->whereIn('gl_project_deploy_optimize.domain', $ids);
}
if(isset($this->map['test_domain']) && !empty($this->map['test_domain'])){
$query = $query->where('gl_project_deploy_build.test_domain','like','%'.$this->map['test_domain'].'%');
... ...
... ... @@ -179,6 +179,8 @@ class ProjectController extends BaseController
$query->where(function ($subQuery) {
// 搜索域名
if ($this->map['search_type'] == 'domain') {
$parsedUrl = parse_url($this->map['search']);
$this->map['search'] = $parsedUrl['host'] ?? $this->map['search'];
$ids = DomainInfo::where('domain', 'like', '%'.$this->map['search'].'%')->pluck('id')->toArray();
$subQuery->whereIn('gl_project_deploy_optimize.domain', $ids);
} else if($this->map['search_type'] == 'test_domain'){
... ... @@ -333,8 +335,8 @@ class ProjectController extends BaseController
* @method :post
* @time :2023/8/17 16:42
*/
public function info(Request $request, ProjectLogic $logic){
$request->validate([
public function info(ProjectLogic $logic){
$this->request->validate([
'id'=>'required'
],[
'id.required' => 'ID不能为空'
... ... @@ -352,17 +354,17 @@ class ProjectController extends BaseController
*/
public function save(ProjectLogic $logic)
{
$this->request->validate([
'type'=>'required'
],[
'type.required' => '类型不能为空'
]);
$logic->projectSave();
$this->response('success');
}
/**
* 询盘通知设置
* @param ProjectRequest $request
* @param ProjectLogic $logic
* @return \Illuminate\Http\JsonResponse
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
* @author zbj
* @date 2023/5/17
*/
... ... @@ -400,10 +402,6 @@ class ProjectController extends BaseController
/**
* 省市数据源
* @param ProjectLogic $logic
* @return \Illuminate\Http\JsonResponse
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
* @author zbj
* @date 2023/6/27
*/
... ... @@ -414,10 +412,6 @@ class ProjectController extends BaseController
/**
* 渠道数据源
* @param ProjectLogic $logic
* @return \Illuminate\Http\JsonResponse
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
* @author zbj
* @date 2023/6/27
*/
... ... @@ -750,6 +744,13 @@ class ProjectController extends BaseController
$this->response('success',Code::SUCCESS,$list);
}
/**
* @remark :处理tdk
* @name :handleTdk
* @author :lyh
* @method :post
* @time :2023/12/29 11:16
*/
public function handleTdk($item){
$data = [
'gl_product'=>'产品',
... ...
... ... @@ -12,6 +12,9 @@ use App\Models\Base;
*/
class BTemplate extends Base
{
/**
* 模块类型
*/
const SOURCE_HOME = 1;//首页
const SOURCE_PRODUCT = 2;//产品
... ... @@ -20,9 +23,16 @@ class BTemplate extends Base
const SOURCE_NEWS = 4;//新闻详情页
const SOURCE_KEYWORD = 5;//聚合页
const SOURCE_CUSTOM = 7;//自定义模块
/**
* 拼接数据还是返回整个html
*/
const ALL_HTML = 1;//无需拼接数据,获取整个html
const PAGE_HTML = 0;//默认保存方式为0,
const STATUS = 0;
/**
* 独立头部类型
*/
const TYPE_HOME = 1;//首页类型
const TYPE_PRODUCT_DETAIL = 2;//产品详情
const TYPE_PRODUCT_LIST = 3;//产品列表
... ... @@ -31,13 +41,20 @@ class BTemplate extends Base
const TYPE_NEWS_DETAIL = 6;//新闻详情
const TYPE_NEWS_LIST = 7;//新闻列表
const TYPE_CUSTOM_PAGE = 8;//自定义页面
/**
* 其他相关定义
*/
const IS_LIST = 1;//列表页
const IS_HEADER = 1;//独立头部底部
const IS_NO_HEADER = 0;//非独立头部底部
const IS_CUSTOM = 1;//为扩展模块
const IS_NO_CUSTOM = 0;//为默认模块
const IS_VISUALIZATION = 1;//定制项目
const STATUS = 0;
/**
* @var string
*/
protected $table = 'gl_web_template';
//连接数据库
protected $connection = 'custom_mysql';
... ...