|
...
|
...
|
@@ -29,6 +29,7 @@ class TemplateController extends BaseController |
|
|
|
$limit = intval($this->param['limit']??20);
|
|
|
|
|
|
|
|
|
|
|
|
// 读取列表
|
|
|
|
$data = ATemplate::_bAll($limit)->toArray();
|
|
|
|
|
|
|
|
|
|
...
|
...
|
@@ -48,6 +49,7 @@ class TemplateController extends BaseController |
|
|
|
// 保存更新
|
|
|
|
if($this->isPost()){
|
|
|
|
$template_id = intval($this->param['template_id']??0);
|
|
|
|
// 是否存在模板
|
|
|
|
if($template_id && ATemplate::_bFind($template_id)){
|
|
|
|
BSetting::_save($this->user['project_id'],$template_id);
|
|
|
|
}else{
|
|
...
|
...
|
@@ -55,9 +57,9 @@ class TemplateController extends BaseController |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 读取我的模板
|
|
|
|
$conf = BSetting::_get($this->user['project_id']);
|
|
|
|
|
|
|
|
// 读取模板信息
|
|
|
|
$data = ATemplate::_bFind($conf['template_id']);
|
|
|
|
|
|
|
|
return $this->success([
|
...
|
...
|
|