|
...
|
...
|
@@ -12,9 +12,12 @@ namespace App\Http\Controllers\Bside\CustomModule; |
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Http\Controllers\Bside\BaseController;
|
|
|
|
use App\Http\Logic\Bside\CustomModule\CustomModuleContentLogic;
|
|
|
|
use App\Models\CustomModule\CustomModule;
|
|
|
|
use App\Models\CustomModule\CustomModuleCategory;
|
|
|
|
use App\Models\CustomModule\CustomModuleContent;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Models\Template\BTemplate;
|
|
|
|
use App\Models\Template\Setting;
|
|
|
|
use App\Models\User\User;
|
|
|
|
|
|
|
|
class CustomModuleContentController extends BaseController
|
|
...
|
...
|
@@ -35,12 +38,14 @@ class CustomModuleContentController extends BaseController |
|
|
|
$this->map['project_id'] = $this->user['project_id'];
|
|
|
|
$lists = $customModuleContent->lists($this->map,$this->page,$this->row,$this->order = ['sort','id']);
|
|
|
|
if(!empty($lists)){
|
|
|
|
$template_id = $this->getModuleTemplateId($this->param['module_id']);
|
|
|
|
$data = $this->getAllCategoryName();
|
|
|
|
foreach ($lists['list'] as $k=>$v){
|
|
|
|
$v['url'] = $this->getUrl($v);
|
|
|
|
$v = $this->getHandleImageFile($v);
|
|
|
|
$v['category_name'] = $this->categoryName($v['category_id'],$data);
|
|
|
|
$v['operator_name'] = (new User())->getName($v['operator_id']);
|
|
|
|
$v['is_renovation'] = $this->getIsRenovation($v['module_id'],BTemplate::IS_DETAIL,$template_id,$v['id'],BTemplate::IS_CUSTOM);
|
|
|
|
$lists['list'][$k] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -48,6 +53,25 @@ class CustomModuleContentController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :扩展模块获取模版id
|
|
|
|
* @name :getTemplateId
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/1/31 16:47
|
|
|
|
*/
|
|
|
|
public function getModuleTemplateId($module_id){
|
|
|
|
$template_id = 0;
|
|
|
|
$moduleModel = new CustomModule();
|
|
|
|
$info = $moduleModel->read(['id'=>$module_id]);
|
|
|
|
if($info['detail_customized'] != 1){
|
|
|
|
$bSettingModel = new Setting();
|
|
|
|
$info = $bSettingModel->read(['project_id'=>$this->user['project_id']]);
|
|
|
|
$template_id = $info['template_id'];
|
|
|
|
}
|
|
|
|
return $this->success($template_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取时处理视频,图片,文件
|
|
|
|
* @name :getHandleImageFile
|
|
|
|
* @author :lyh
|
...
|
...
|
|