|
...
|
...
|
@@ -33,13 +33,22 @@ class BTemplateModuleProjectLogic extends BaseLogic |
|
|
|
public function ModuleList($map,$order = 'created_at',$filed = ['id','name','status','image','html','project_id']){
|
|
|
|
$map['deleted_status'] = 0;
|
|
|
|
$map['project_id'] = $this->user['project_id'];
|
|
|
|
$lists = $this->model->list($map,$order,$filed);
|
|
|
|
$list = $this->model->list($map,$order,$filed);
|
|
|
|
$templateLabel = new TemplateLabel();
|
|
|
|
foreach ($lists as $k => $v){
|
|
|
|
$v['label'] = $templateLabel->list(['template_id'=>$v['id'],'type'=>2],'id',['id','name'],'desc');
|
|
|
|
$lists[$k] = $v;
|
|
|
|
$label = [];
|
|
|
|
foreach ($list as $v){
|
|
|
|
$label[] = $v['id'];
|
|
|
|
}
|
|
|
|
return $this->success($lists);
|
|
|
|
$label_arr = $templateLabel->list(['template_id'=>['in',$label],'type'=>2],'id',['id','template_id','name'],'desc');
|
|
|
|
foreach ($list as $k1 => $v1){
|
|
|
|
foreach ($label_arr as $v2){
|
|
|
|
if($v2['template_id'] == $v1['id']){
|
|
|
|
$v1['label'] = $v2;
|
|
|
|
$list[$k1] = $v1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success($list);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
...
|
...
|
|