|
@@ -160,7 +160,7 @@ class WorkOrder extends Api{
|
|
|
|
|
|
|
|
// 正常的视频生成请求处理
|
|
// 正常的视频生成请求处理
|
|
|
$apiUrl = 'https://chatapi.onechats.ai/v1/videos';
|
|
$apiUrl = 'https://chatapi.onechats.ai/v1/videos';
|
|
|
- $apiKey = 'sk-ABO93U8p7u6Sin4yxnAHI8Z8K9hX8YjRO9rfTC0y3Ftv4mNm';
|
|
|
|
|
|
|
+ $apiKey = 'sk-sWW1GFlnjbrDRb1DkMEzePIxgdvLK6cZt0Qg93yDMVP2z1yN';
|
|
|
|
|
|
|
|
$postData = [
|
|
$postData = [
|
|
|
'prompt' => $params['prompt'],
|
|
'prompt' => $params['prompt'],
|
|
@@ -326,7 +326,7 @@ class WorkOrder extends Api{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$apiUrl = 'https://chatapi.onechats.ai/v1/videos/' . $videoId;
|
|
$apiUrl = 'https://chatapi.onechats.ai/v1/videos/' . $videoId;
|
|
|
- $apiKey = 'sk-ABO93U8p7u6Sin4yxnAHI8Z8K9hX8YjRO9rfTC0y3Ftv4mNm';
|
|
|
|
|
|
|
+ $apiKey = 'sk-sWW1GFlnjbrDRb1DkMEzePIxgdvLK6cZt0Qg93yDMVP2z1yN';
|
|
|
|
|
|
|
|
// 先检查本地是否已经有该视频
|
|
// 先检查本地是否已经有该视频
|
|
|
$localVideoPath = ROOT_PATH . 'public' . DS . 'uploads' . DS . 'videos' . DS . date('Ymd') . DS . $videoId . '.mp4';
|
|
$localVideoPath = ROOT_PATH . 'public' . DS . 'uploads' . DS . 'videos' . DS . date('Ymd') . DS . $videoId . '.mp4';
|
|
@@ -1253,8 +1253,16 @@ class WorkOrder extends Api{
|
|
|
*/
|
|
*/
|
|
|
public function product_template()
|
|
public function product_template()
|
|
|
{
|
|
{
|
|
|
|
|
+ $params = $this->request->param();
|
|
|
|
|
+
|
|
|
|
|
+ // 构建查询条件
|
|
|
|
|
+ $where = [];
|
|
|
|
|
+ if (!empty($params['search'])) {
|
|
|
|
|
+ $where['chinese_description'] = ['like', '%' . $params['search'] . '%'];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 查询模版表
|
|
// 查询模版表
|
|
|
- $products = Db::name('product_template')->order('id desc')->select();
|
|
|
|
|
|
|
+ $products = Db::name('product_template')->order('id desc')->where($where)->select();
|
|
|
|
|
|
|
|
$http_url = Db::name('http_url')->field('baseUrl,port')->find();
|
|
$http_url = Db::name('http_url')->field('baseUrl,port')->find();
|
|
|
if ($products && $http_url) {
|
|
if ($products && $http_url) {
|