get('model_id'); $scene = $request->get('scene'); $action = $request->get('action', 'yidevs'); if ($action == 'yidevs') { $PluginModel = PluginModel::where(['id' => $model_id, 'scene' => $scene, 'state' => State::YES['value']])->find(); if (!$PluginModel) { return $this->fail('模型不存在'); } try { $result = Yidevs::AudioVoiceList($PluginModel->channels_uid, ['model' => $PluginModel->model_id]); return $this->resData($result); } catch (\Throwable $th) { return $this->exception($th); } } else { $model_id = $request->get('model_id'); $where = []; $where[] = ['channels_uid', '=', $request->channels_uid]; $where[] = ['uid', '=', $request->uid]; if ($model_id) { $where[] = ['model_id', '=', $model_id]; } $where[] = ['status', '=', ModelVoiceStatus::SUCCESS['value']]; $voice = PluginModelVoice::where($where)->order('id desc')->select()->each(function ($item) { $item->gender_enum = ActorGender::get($item->gender); $item->age_enum = ActorAge::get($item->age); }); return $this->resData($voice); } } }