|
@@ -709,7 +709,7 @@ class BTemplateLogic extends BaseLogic |
|
@@ -709,7 +709,7 @@ class BTemplateLogic extends BaseLogic |
|
709
|
$moduleModel = new CustomModule();
|
709
|
$moduleModel = new CustomModule();
|
|
710
|
$moduleList = $moduleModel->list(['status'=>0]);
|
710
|
$moduleList = $moduleModel->list(['status'=>0]);
|
|
711
|
foreach ($moduleList as $v){
|
711
|
foreach ($moduleList as $v){
|
|
712
|
- $moduleCategory = $this->getCategoryList((new CustomModuleCategory()),0,['id','name','pid']);
|
712
|
+ $moduleCategory = $this->getCategoryModuleList((new CustomModuleCategory()),$v['id'],0,['id','name','pid']);
|
|
713
|
$categoryList = [["id"=>"all", "name"=>"全部"], ["id"=>"new", "name"=>"最新"]];
|
713
|
$categoryList = [["id"=>"all", "name"=>"全部"], ["id"=>"new", "name"=>"最新"]];
|
|
714
|
foreach ($moduleCategory as $values){
|
714
|
foreach ($moduleCategory as $values){
|
|
715
|
$categoryList[] = $values;
|
715
|
$categoryList[] = $values;
|
|
@@ -782,6 +782,26 @@ class BTemplateLogic extends BaseLogic |
|
@@ -782,6 +782,26 @@ class BTemplateLogic extends BaseLogic |
|
782
|
}
|
782
|
}
|
|
783
|
|
783
|
|
|
784
|
/**
|
784
|
/**
|
|
|
|
785
|
+ * @remark :获取1级+2级
|
|
|
|
786
|
+ * @name :getCategoryList
|
|
|
|
787
|
+ * @author :lyh
|
|
|
|
788
|
+ * @method :post
|
|
|
|
789
|
+ * @time :2023/12/20 10:26
|
|
|
|
790
|
+ */
|
|
|
|
791
|
+ public function getCategoryModuleList($categoryModel,$module_id,$status = 0,$filed = ['*']){
|
|
|
|
792
|
+ $data = array();
|
|
|
|
793
|
+ $list = $categoryModel->list(['pid'=>0, 'module_id'=>$module_id , 'status'=>$status],['sort','id'],$filed);
|
|
|
|
794
|
+ foreach ($list as $v){
|
|
|
|
795
|
+ $data[] = $v;
|
|
|
|
796
|
+ $son_list = $categoryModel->list(['pid'=>$v['id'],'module_id'=>$module_id,'status'=>$status],['sort','id'],$filed);
|
|
|
|
797
|
+ foreach ($son_list as $v1){
|
|
|
|
798
|
+ $data[] = $v1;
|
|
|
|
799
|
+ }
|
|
|
|
800
|
+ }
|
|
|
|
801
|
+ return $this->success($data);
|
|
|
|
802
|
+ }
|
|
|
|
803
|
+
|
|
|
|
804
|
+ /**
|
|
785
|
* @remark :保存html
|
805
|
* @remark :保存html
|
|
786
|
* @name :savePublicTemplateHtml
|
806
|
* @name :savePublicTemplateHtml
|
|
787
|
* @author :lyh
|
807
|
* @author :lyh
|