|
...
|
...
|
@@ -709,7 +709,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$moduleModel = new CustomModule();
|
|
|
|
$moduleList = $moduleModel->list(['status'=>0]);
|
|
|
|
foreach ($moduleList as $v){
|
|
|
|
$moduleCategory = $this->getCategoryList((new CustomModuleCategory()),0,['id','name','pid']);
|
|
|
|
$moduleCategory = $this->getCategoryModuleList((new CustomModuleCategory()),$v['id'],0,['id','name','pid']);
|
|
|
|
$categoryList = [["id"=>"all", "name"=>"全部"], ["id"=>"new", "name"=>"最新"]];
|
|
|
|
foreach ($moduleCategory as $values){
|
|
|
|
$categoryList[] = $values;
|
|
...
|
...
|
@@ -782,6 +782,26 @@ class BTemplateLogic extends BaseLogic |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取1级+2级
|
|
|
|
* @name :getCategoryList
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/12/20 10:26
|
|
|
|
*/
|
|
|
|
public function getCategoryModuleList($categoryModel,$module_id,$status = 0,$filed = ['*']){
|
|
|
|
$data = array();
|
|
|
|
$list = $categoryModel->list(['pid'=>0, 'module_id'=>$module_id , 'status'=>$status],['sort','id'],$filed);
|
|
|
|
foreach ($list as $v){
|
|
|
|
$data[] = $v;
|
|
|
|
$son_list = $categoryModel->list(['pid'=>$v['id'],'module_id'=>$module_id,'status'=>$status],['sort','id'],$filed);
|
|
|
|
foreach ($son_list as $v1){
|
|
|
|
$data[] = $v1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :保存html
|
|
|
|
* @name :savePublicTemplateHtml
|
|
|
|
* @author :lyh
|
...
|
...
|
|