|
...
|
...
|
@@ -14,6 +14,7 @@ use App\Models\Service\Service as ServiceSettingModel; |
|
|
|
use App\Models\Template\BTemplate;
|
|
|
|
use App\Models\Template\BTemplateCommon;
|
|
|
|
use App\Models\Template\BTemplateLog;
|
|
|
|
use App\Models\Template\Setting;
|
|
|
|
|
|
|
|
class BTemplateLogLogic extends BaseLogic
|
|
|
|
{
|
|
...
|
...
|
@@ -42,6 +43,15 @@ class BTemplateLogLogic extends BaseLogic |
|
|
|
if(($this->user['project_id'] == 1) && (!in_array($this->user['mobile'],$bTemplateModel->mobile)) && ($info['source'] == 1)){
|
|
|
|
$this->fail('演示项目仅支持演示功能,无法更改首页');
|
|
|
|
}
|
|
|
|
//获取当前项目的模版
|
|
|
|
$bSettingModel = new Setting();
|
|
|
|
$settingInfo = $bSettingModel->read(['project_id'=>$this->user['project_id']]);
|
|
|
|
if($settingInfo === false){
|
|
|
|
$this->fail('请先选择模版');
|
|
|
|
}
|
|
|
|
if($info['template_id'] != $settingInfo['template_id']){
|
|
|
|
$bSettingModel->edit(['template_id'=>$info['template_id']],['id'=>$settingInfo['id']]);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
$data = $this->setParam($info);
|
|
|
|
$BTemplateModel = new BTemplate();
|
...
|
...
|
|