|
@@ -7,6 +7,7 @@ use app\model\Content;
|
|
use support\exception\BusinessException;
|
|
use support\exception\BusinessException;
|
|
use support\Request;
|
|
use support\Request;
|
|
use support\Response;
|
|
use support\Response;
|
|
|
|
+use Tinywan\Jwt\JwtToken;
|
|
|
|
|
|
class SpecialController extends Curd
|
|
class SpecialController extends Curd
|
|
{
|
|
{
|
|
@@ -84,12 +85,13 @@ class SpecialController extends Curd
|
|
protected function insertInput(Request $request): array
|
|
protected function insertInput(Request $request): array
|
|
{
|
|
{
|
|
$data = $this->inputFilter($request->post());
|
|
$data = $this->inputFilter($request->post());
|
|
- $data['content_config_json'] = [];
|
|
|
|
if (!empty($request->post('cover'))) {
|
|
if (!empty($request->post('cover'))) {
|
|
- $configJson = !empty($model->content_config_json) ? json_decode($model->content_config_json, true) : [];
|
|
|
|
$configJson['cover'] = str_replace(getenv("STORAGE_DOMAIN"), '', $request->post('cover'));
|
|
$configJson['cover'] = str_replace(getenv("STORAGE_DOMAIN"), '', $request->post('cover'));
|
|
$data['content_config_json'] = json_encode($configJson);
|
|
$data['content_config_json'] = json_encode($configJson);
|
|
}
|
|
}
|
|
|
|
+ $data['content_updatetimes'] = time();
|
|
|
|
+ $data['creator_user_id'] = JwtToken::getCurrentId();
|
|
|
|
+ dump($data);
|
|
|
|
|
|
return $data;
|
|
return $data;
|
|
}
|
|
}
|