|
...
|
...
|
@@ -2,12 +2,10 @@ |
|
|
|
|
|
|
|
namespace App\Http\Controllers\Bside;
|
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Exceptions\BsideGlobalException;
|
|
|
|
|
|
|
|
use App\Models\Template\ATemplate;
|
|
|
|
use App\Models\Template\BSetting;
|
|
|
|
use App\Models\Template\BTemplate;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 模板
|
|
...
|
...
|
@@ -46,11 +44,23 @@ class TemplateController extends BaseController |
|
|
|
* @time 2023/5/9 15:19
|
|
|
|
*/
|
|
|
|
public function info(){
|
|
|
|
|
|
|
|
// 保存更新
|
|
|
|
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{
|
|
|
|
return $this->response('无法使用不存在的模板','B_TEMPLATE_NOTFOUND');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$conf = BSetting::_get($this->user['project_id']);
|
|
|
|
|
|
|
|
$data = ATemplate::_bFind($conf['template_id']);
|
|
|
|
|
|
|
|
$this->success([
|
|
|
|
return $this->success([
|
|
|
|
'template_id' => $data['id']??0,
|
|
|
|
'name' => $data['name']??'',
|
|
|
|
'thumb' => $data['thumb']??'',
|
...
|
...
|
|