作者 lyh
@@ -590,13 +590,15 @@ class RelayInquiry extends Command @@ -590,13 +590,15 @@ class RelayInquiry extends Command
590 $lang = $translateSl['texts']['sl'] ?? 'en'; 590 $lang = $translateSl['texts']['sl'] ?? 'en';
591 if ($lang == 'en' || Str::contains($lang, 'zh')) { 591 if ($lang == 'en' || Str::contains($lang, 'zh')) {
592 $language = '英文'; 592 $language = '英文';
  593 + $lang = 'en';
593 }else{ 594 }else{
594 $language = Translate::getTls($lang); 595 $language = Translate::getTls($lang);
595 } 596 }
596 $ai_command = str_replace('{mkeywords}', Arr::random(explode("\r\n", $ai_param['mkeywords'])), $ai_command); 597 $ai_command = str_replace('{mkeywords}', Arr::random(explode("\r\n", $ai_param['mkeywords'])), $ai_command);
597 $ai_command = str_replace('{incontent}', Arr::random(explode("\r\n", $incontent)), $ai_command); 598 $ai_command = str_replace('{incontent}', Arr::random(explode("\r\n", $incontent)), $ai_command);
598 $ai_command = str_replace('{characters}', Arr::random(explode("\r\n", $ai_param['characters'])), $ai_command); 599 $ai_command = str_replace('{characters}', Arr::random(explode("\r\n", $ai_param['characters'])), $ai_command);
599 - $ai_command = str_replace('{language}', Arr::random(explode("\r\n", $language)), $ai_command); 600 +// $ai_command = str_replace('{language}', Arr::random(explode("\r\n", $language)), $ai_command);
  601 + $ai_command = str_replace('{language}', '英语', $ai_command); //输出英文 后面再翻译
600 $ai_command = str_replace('{inkeywords}', Arr::random(explode("\r\n", $ai_param['inkeywords'])), $ai_command); 602 $ai_command = str_replace('{inkeywords}', Arr::random(explode("\r\n", $ai_param['inkeywords'])), $ai_command);
601 $ai_command = str_replace('{suoxie}', Arr::random(explode("\r\n", $ai_param['suoxie'])), $ai_command); 603 $ai_command = str_replace('{suoxie}', Arr::random(explode("\r\n", $ai_param['suoxie'])), $ai_command);
602 //中括号里的根据概率使用 604 //中括号里的根据概率使用
@@ -615,6 +617,7 @@ class RelayInquiry extends Command @@ -615,6 +617,7 @@ class RelayInquiry extends Command
615 } 617 }
616 618
617 $text = Gpt::instance()->openai_chat_qqs($ai_command); 619 $text = Gpt::instance()->openai_chat_qqs($ai_command);
  620 + $text = Translate::tran($text, $lang); //再次翻译 避免AI回复的语种不准
618 $this->logChannel()->info("AI询盘文案", [$ai_command, $text]); 621 $this->logChannel()->info("AI询盘文案", [$ai_command, $text]);
619 $text = Common::deal_keywords($text); 622 $text = Common::deal_keywords($text);
620 return Common::deal_str($text); 623 return Common::deal_str($text);
@@ -231,6 +231,7 @@ class AdsController extends BaseController @@ -231,6 +231,7 @@ class AdsController extends BaseController
231 $task_id = intval($request->input('task_id')); 231 $task_id = intval($request->input('task_id'));
232 $form_id = intval($request->input('form_id')); 232 $form_id = intval($request->input('form_id'));
233 $country = intval($request->input('country')); 233 $country = intval($request->input('country'));
  234 + $page_size = intval($request->input('row', '20'));
234 $result = ReInquiryDetail::with('detailLog') 235 $result = ReInquiryDetail::with('detailLog')
235 ->when($status, function ($query, $status) { 236 ->when($status, function ($query, $status) {
236 return $query->where('status', $status); 237 return $query->where('status', $status);
@@ -245,7 +246,7 @@ class AdsController extends BaseController @@ -245,7 +246,7 @@ class AdsController extends BaseController
245 return $query->where('country', 'like', '%'.$country.'%'); 246 return $query->where('country', 'like', '%'.$country.'%');
246 }) 247 })
247 ->orderBy('id', 'desc') 248 ->orderBy('id', 'desc')
248 - ->paginate(); 249 + ->paginate($page_size);
249 return $this->response('success', Code::SUCCESS, $result); 250 return $this->response('success', Code::SUCCESS, $result);
250 } 251 }
251 252