合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !1934
正在显示
6 个修改的文件
包含
25 行增加
和
5 行删除
| @@ -39,14 +39,12 @@ class AiVideoTask extends Command | @@ -39,14 +39,12 @@ class AiVideoTask extends Command | ||
| 39 | 39 | ||
| 40 | public $updateProject = [];//需更新的列表 | 40 | public $updateProject = [];//需更新的列表 |
| 41 | public $routes = [];//需要更新的路由 | 41 | public $routes = [];//需要更新的路由 |
| 42 | - | ||
| 43 | /** | 42 | /** |
| 44 | * The console command description. | 43 | * The console command description. |
| 45 | * | 44 | * |
| 46 | * @var string | 45 | * @var string |
| 47 | */ | 46 | */ |
| 48 | protected $description = '查询ai_video是否已经生成'; | 47 | protected $description = '查询ai_video是否已经生成'; |
| 49 | - | ||
| 50 | /** | 48 | /** |
| 51 | * @return bool | 49 | * @return bool |
| 52 | * @throws \Exception | 50 | * @throws \Exception |
| @@ -48,6 +48,7 @@ class AiBlogController extends BaseController | @@ -48,6 +48,7 @@ class AiBlogController extends BaseController | ||
| 48 | 'id.required' => '主键不能为空', | 48 | 'id.required' => '主键不能为空', |
| 49 | ]); | 49 | ]); |
| 50 | $info = $aiBlog->read(['id'=>$this->param['id']]); | 50 | $info = $aiBlog->read(['id'=>$this->param['id']]); |
| 51 | + $info['anchor'] = json_decode($info['anchor'] ?? [],true); | ||
| 51 | $info['image'] = getImageUrl($info['image']); | 52 | $info['image'] = getImageUrl($info['image']); |
| 52 | $this->response('success',Code::SUCCESS,$info); | 53 | $this->response('success',Code::SUCCESS,$info); |
| 53 | } | 54 | } |
| @@ -52,6 +52,8 @@ class AiVideoController extends BaseController | @@ -52,6 +52,8 @@ class AiVideoController extends BaseController | ||
| 52 | 'id.required' => '主键不能为空', | 52 | 'id.required' => '主键不能为空', |
| 53 | ]); | 53 | ]); |
| 54 | $info = $aiVideo->read(['id'=>$this->param['id']]); | 54 | $info = $aiVideo->read(['id'=>$this->param['id']]); |
| 55 | + $info['anchor'] = json_decode($info['anchor'] ?? [],true); | ||
| 56 | + $info['images'] = json_decode($info['images'] ?? [],true); | ||
| 55 | $this->response('success',Code::SUCCESS,$info); | 57 | $this->response('success',Code::SUCCESS,$info); |
| 56 | } | 58 | } |
| 57 | 59 | ||
| @@ -119,7 +121,7 @@ class AiVideoController extends BaseController | @@ -119,7 +121,7 @@ class AiVideoController extends BaseController | ||
| 119 | * @method :post | 121 | * @method :post |
| 120 | * @time :2025/2/21 16:22 | 122 | * @time :2025/2/21 16:22 |
| 121 | */ | 123 | */ |
| 122 | - public function getAiBlogList(AiVideoList $aiVideoList){ | 124 | + public function getAiVideoList(AiVideoList $aiVideoList){ |
| 123 | $lists = $aiVideoList->lists($this->map,$this->page,$this->row,'id',['id','route','created_at','updated_at']); | 125 | $lists = $aiVideoList->lists($this->map,$this->page,$this->row,'id',['id','route','created_at','updated_at']); |
| 124 | if(!empty($lists) && !empty($lists['list'])){ | 126 | if(!empty($lists) && !empty($lists['list'])){ |
| 125 | foreach ($lists['list'] as $k => $v){ | 127 | foreach ($lists['list'] as $k => $v){ |
| @@ -129,4 +131,21 @@ class AiVideoController extends BaseController | @@ -129,4 +131,21 @@ class AiVideoController extends BaseController | ||
| 129 | } | 131 | } |
| 130 | $this->response('success',Code::SUCCESS,$lists); | 132 | $this->response('success',Code::SUCCESS,$lists); |
| 131 | } | 133 | } |
| 134 | + | ||
| 135 | + /** | ||
| 136 | + * @remark :获取列表页数据详情 | ||
| 137 | + * @name :getAiBlogListInfo | ||
| 138 | + * @author :lyh | ||
| 139 | + * @method :post | ||
| 140 | + * @time :2025/2/21 16:26 | ||
| 141 | + */ | ||
| 142 | + public function getAiBlogListInfo(AiVideoList $aiVideoList){ | ||
| 143 | + $this->request->validate([ | ||
| 144 | + 'id'=>['required'], | ||
| 145 | + ],[ | ||
| 146 | + 'id.required' => '主键不能为空', | ||
| 147 | + ]); | ||
| 148 | + $info = $aiVideoList->read($this->map); | ||
| 149 | + $this->response('success',Code::SUCCESS,$info); | ||
| 150 | + } | ||
| 132 | } | 151 | } |
| @@ -58,7 +58,7 @@ class AiBlogLogic extends BaseLogic | @@ -58,7 +58,7 @@ class AiBlogLogic extends BaseLogic | ||
| 58 | } | 58 | } |
| 59 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_BLOG, $this->param['id'], $this->user['project_id']); | 59 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_BLOG, $this->param['id'], $this->user['project_id']); |
| 60 | $anchor = $this->param['anchor'] ?? []; | 60 | $anchor = $this->param['anchor'] ?? []; |
| 61 | - $this->param['anchor'] = json_encode($this->param['anchor'],true); | 61 | + $this->param['anchor'] = json_encode($anchor,true); |
| 62 | $this->model->edit($this->param,['id'=>$this->param['id']]); | 62 | $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 63 | $aiSettingInfo = $this->getProjectAiSetting(); | 63 | $aiSettingInfo = $this->getProjectAiSetting(); |
| 64 | $aiBlogService = new AiBlogService(); | 64 | $aiBlogService = new AiBlogService(); |
| @@ -41,7 +41,7 @@ class AiVideoLogic extends BaseLogic | @@ -41,7 +41,7 @@ class AiVideoLogic extends BaseLogic | ||
| 41 | try { | 41 | try { |
| 42 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_VIDEO, $this->param['id'], $this->user['project_id']); | 42 | $this->param['route'] = RouteMap::setRoute($this->param['route'], RouteMap::SOURCE_AI_VIDEO, $this->param['id'], $this->user['project_id']); |
| 43 | $anchor = $this->param['anchor'] ?? []; | 43 | $anchor = $this->param['anchor'] ?? []; |
| 44 | - $this->param['anchor'] = json_encode($this->param['anchor'],true); | 44 | + $this->param['anchor'] = json_encode($anchor,true); |
| 45 | $this->param['images'] = json_encode($this->param['images'],true); | 45 | $this->param['images'] = json_encode($this->param['images'],true); |
| 46 | $this->model->edit($this->param,['id'=>$this->param['id']]); | 46 | $this->model->edit($this->param,['id'=>$this->param['id']]); |
| 47 | $aiVideoService = new AiVideoService($this->user['project_id']); | 47 | $aiVideoService = new AiVideoService($this->user['project_id']); |
| @@ -159,6 +159,8 @@ Route::middleware(['bloginauth'])->group(function () { | @@ -159,6 +159,8 @@ Route::middleware(['bloginauth'])->group(function () { | ||
| 159 | Route::any('/sendTask', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'sendTask'])->name('ai_video_sendTask'); | 159 | Route::any('/sendTask', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'sendTask'])->name('ai_video_sendTask'); |
| 160 | Route::any('/save', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'save'])->name('ai_video_save'); | 160 | Route::any('/save', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'save'])->name('ai_video_save'); |
| 161 | Route::any('/del', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'delete'])->name('ai_video_delete'); | 161 | Route::any('/del', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'delete'])->name('ai_video_delete'); |
| 162 | + Route::any('/getAiVideoList', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'getAiVideoList'])->name('ai_video_getAiVideoList'); | ||
| 163 | + Route::any('/getAiBlogListInfo', [\App\Http\Controllers\Bside\Ai\AiVideoController::class, 'getAiBlogListInfo'])->name('ai_video_getAiBlogListInfo'); | ||
| 162 | }); | 164 | }); |
| 163 | //ai | 165 | //ai |
| 164 | Route::any('/news/', [\App\Http\Controllers\Bside\Ai\AiNewsController::class, 'save'])->name('ai_news_save'); | 166 | Route::any('/news/', [\App\Http\Controllers\Bside\Ai\AiNewsController::class, 'save'])->name('ai_news_save'); |
-
请 注册 或 登录 后发表评论