fix(addon/aikefu): 获得当前配置有问题

This commit is contained in:
2025-12-06 14:16:13 +08:00
parent 17c1ce2cc6
commit 8ae10dd2c3

View File

@@ -47,7 +47,7 @@ class Kefu extends BaseApi
try { try {
// 获取智能客服配置 // 获取智能客服配置
$kefu_config_model = new KefuConfigModel(); $kefu_config_model = new KefuConfigModel();
$config_info = $kefu_config_model->getConfig($this->site_id); $config_info = $kefu_config_model->getConfig($this->site_id, $this->app_module)['data']['value'] ?? [];
if (empty($config_info) || $config_info['status'] != 1) { if (empty($config_info) || $config_info['status'] != 1) {
return $this->response($this->error('智能客服暂未启用')); return $this->response($this->error('智能客服暂未启用'));
@@ -198,7 +198,7 @@ class Kefu extends BaseApi
try { try {
// 获取智能客服配置 // 获取智能客服配置
$kefu_config_model = new KefuConfigModel(); $kefu_config_model = new KefuConfigModel();
$config_info = $kefu_config_model->getConfig($this->site_id); $config_info = $kefu_config_model->getConfig($this->site_id, $this->app_module)['data']['value'] ?? [];
if (empty($config_info) || $config_info['status'] != 1) { if (empty($config_info) || $config_info['status'] != 1) {
return $this->response($this->error('智能客服暂未启用')); return $this->response($this->error('智能客服暂未启用'));