|
...
|
...
|
@@ -26,7 +26,7 @@ class CustomController extends BaseController |
|
|
|
'title' => ['required','max:200'],
|
|
|
|
'keywords' => ['required','max:200'],
|
|
|
|
'description' => ['required','max:250'],
|
|
|
|
'html' => ['required'],
|
|
|
|
// 'html' => ['required'],
|
|
|
|
'url' => ['required','max:200'],
|
|
|
|
'status' => ['required','in:0,1'],
|
|
|
|
],
|
|
...
|
...
|
@@ -144,5 +144,33 @@ class CustomController extends BaseController |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param $id
|
|
|
|
* @return \Illuminate\Http\JsonResponse
|
|
|
|
* @author:dc
|
|
|
|
* @time 2023/5/10 14:10
|
|
|
|
*/
|
|
|
|
public function html($id)
|
|
|
|
{
|
|
|
|
$data = BCustom::_find($this->user['project_id'],$id);
|
|
|
|
if(!$data){
|
|
|
|
return $this->response('数据不存在','B_CUSTOM_NOTFOUND');
|
|
|
|
}
|
|
|
|
if($this->isPost()){
|
|
|
|
$html = $this->param['html']??'';
|
|
|
|
|
|
|
|
$data->html = $html;
|
|
|
|
|
|
|
|
$data->save();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $this->response('',Code::SUCCESS,$data['html']);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|