作者 lyh

gx

... ... @@ -64,14 +64,17 @@ class CustomTemplateLogic extends BaseLogic
$this->param['html'] = characterTruncation($html,'/<main>(.*?)<\/main>/s');
$this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s');
}
$id = $this->param['id'];
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
}else{
$this->param['project_id'] = $this->user['project_id'];
$rs = $this->model->add($this->param);
$id = $this->model->addReturnId($this->param);
}
if($rs === false){
$this->fail('error');
}
//路由映射
RouteMap::setRoute($this->param['url'], RouteMap::SOURCE_PAGE, $id, $this->user['project_id']);
//TODO::通知网站更新
$data = [
'project_id'=>$this->user['project_id'],
... ...
... ... @@ -112,16 +112,6 @@ class CategoryLogic extends BaseLogic
return true;
}
/**
* @remark :添加时处理分类
* @name :handleAddParam
* @author :lyh
* @method :post
* @time :2023/8/21 18:34
*/
public function handleAddParam(){
}
/**
* @remark :删除
... ...
... ... @@ -25,6 +25,7 @@ class RouteMap extends Base
const SOURCE_PRODUCT_CATE = 'product_category';
const SOURCE_PRODUCT_KEYWORD = 'product_keyword';
const SOURCE_PAGE = 'page'; //单页面
const SOURCE_INDEX = 'index'; //单页面
const SOURCE_BLOG = 'blog';
const SOURCE_BLOG_CATE = 'blog_category';
const SOURCE_NEWS = 'news';
... ...