chore(addon/aikefu): 调整config的配置内容

This commit is contained in:
2025-12-06 12:52:30 +08:00
parent fc5615a9c7
commit 0ff979917c
3 changed files with 18 additions and 9 deletions

View File

@@ -33,7 +33,7 @@ class Kefu extends BaseShop
return $result;
} else {
// 获取配置
$config_info = $kefu_config_model->getConfig($this->site_id);
$config_info = $kefu_config_model->getConfig($this->site_id, $this->app_module)['data']['value'] ?? [];
$this->assign('config_info', $config_info);
return $this->fetch('kefu/config');
}
@@ -143,8 +143,8 @@ class Kefu extends BaseShop
$kefu_conversation_model = new KefuConversationModel();
$kefu_message_model = new KefuMessageModel();
// 开启事务
$this->model->startTrans();
// 开启事务
\think\facade\Db::startTrans();
try {
// 删除会话关联的消息
@@ -167,12 +167,12 @@ class Kefu extends BaseShop
]);
// 提交事务
$this->model->commit();
\think\facade\Db::commit();
return $this->success($result);
} catch (\Exception $e) {
// 回滚事务
$this->model->rollback();
\think\facade\Db::rollback();
return $this->error($e->getMessage());
}
}