Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into master-server
正在显示
4 个修改的文件
包含
13 行增加
和
5 行删除
| @@ -223,7 +223,7 @@ class RelayInquiry extends Command | @@ -223,7 +223,7 @@ class RelayInquiry extends Command | ||
| 223 | $val->status = $res ? ReInquiryForm::STATUS_SUCCESS : ReInquiryForm::STATUS_FORGO; | 223 | $val->status = $res ? ReInquiryForm::STATUS_SUCCESS : ReInquiryForm::STATUS_FORGO; |
| 224 | $val->save(); | 224 | $val->save(); |
| 225 | } catch (\Exception $e) { | 225 | } catch (\Exception $e) { |
| 226 | - $this->logChannel()->info('执行询盘错误:' . $e->getMessage()); | 226 | + $this->logChannel()->info('执行询盘错误:',[$e->getMessage(), $e->getFile(), $e->getLine()]); |
| 227 | $this->output('执行询盘错误:' . $e->getMessage()); | 227 | $this->output('执行询盘错误:' . $e->getMessage()); |
| 228 | } | 228 | } |
| 229 | } | 229 | } |
| @@ -617,9 +617,10 @@ class RelayInquiry extends Command | @@ -617,9 +617,10 @@ class RelayInquiry extends Command | ||
| 617 | } | 617 | } |
| 618 | 618 | ||
| 619 | $text = Gpt::instance()->openai_chat_qqs($ai_command); | 619 | $text = Gpt::instance()->openai_chat_qqs($ai_command); |
| 620 | - $text = Translate::tran($text, $lang); //再次翻译 避免AI回复的语种不准 | 620 | + if ($lang != 'en' && !Str::contains($lang, 'zh')) { |
| 621 | + $text = Translate::tran($text, $lang); | ||
| 622 | + } | ||
| 621 | $this->logChannel()->info("AI询盘文案", [$ai_command, $text]); | 623 | $this->logChannel()->info("AI询盘文案", [$ai_command, $text]); |
| 622 | - $text = Common::deal_keywords($text); | ||
| 623 | return Common::deal_str($text); | 624 | return Common::deal_str($text); |
| 624 | } | 625 | } |
| 625 | 626 |
| @@ -23,6 +23,9 @@ define('HTTP_OPENAI_URL', 'http://openai.waimaoq.com/'); | @@ -23,6 +23,9 @@ define('HTTP_OPENAI_URL', 'http://openai.waimaoq.com/'); | ||
| 23 | if (!function_exists('generateRoute')) { | 23 | if (!function_exists('generateRoute')) { |
| 24 | function generateRoute($string) | 24 | function generateRoute($string) |
| 25 | { | 25 | { |
| 26 | + if(is_array($string)){ | ||
| 27 | + $string = $string[0]; | ||
| 28 | + } | ||
| 26 | return str_replace(".", "", trim(strtolower(preg_replace('/[^\w.]+/', '-', trim($string))), '-')); | 29 | return str_replace(".", "", trim(strtolower(preg_replace('/[^\w.]+/', '-', trim($string))), '-')); |
| 27 | } | 30 | } |
| 28 | } | 31 | } |
| @@ -273,8 +273,9 @@ class AdsController extends BaseController | @@ -273,8 +273,9 @@ class AdsController extends BaseController | ||
| 273 | ->orderBy('num', 'desc') | 273 | ->orderBy('num', 'desc') |
| 274 | ->paginate($row); | 274 | ->paginate($row); |
| 275 | 275 | ||
| 276 | - foreach ($result as $item){ | 276 | + foreach ($result as &$item){ |
| 277 | $item->tasks = $item->tasks; //调用访问器 | 277 | $item->tasks = $item->tasks; //调用访问器 |
| 278 | + $item['project_id'] = DomainInfo::where('domain', $item['domain'])->value('project_id') ?: 0; | ||
| 278 | } | 279 | } |
| 279 | 280 | ||
| 280 | return $this->response('success', Code::SUCCESS, $result); | 281 | return $this->response('success', Code::SUCCESS, $result); |
| @@ -152,7 +152,10 @@ class LoginController extends BaseController | @@ -152,7 +152,10 @@ class LoginController extends BaseController | ||
| 152 | ],[ | 152 | ],[ |
| 153 | 'str.required' => '翻译字符串不能为空', | 153 | 'str.required' => '翻译字符串不能为空', |
| 154 | ]); | 154 | ]); |
| 155 | - $str = Translate::tran($this->param['str'], 'en'); | 155 | + $str = Translate::tran($this->param['str'], 'en') ?? ''; |
| 156 | + if(is_array($str)){ | ||
| 157 | + $str = $str[0]; | ||
| 158 | + } | ||
| 156 | $this->response('success',Code::SUCCESS,strtolower($str)); | 159 | $this->response('success',Code::SUCCESS,strtolower($str)); |
| 157 | } | 160 | } |
| 158 | 161 |
-
请 注册 或 登录 后发表评论