From ec65fae3143cb3260e7135554367652ced3d0ffd Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Thu, 7 Dec 2023 15:42:29 +0800 Subject: [PATCH] feat: --- apps/smartdoc/conf.py | 3 +++ apps/smartdoc/settings/base.py | 2 +- ui/src/views/log/component/ChatRecordDrawer.vue | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/smartdoc/conf.py b/apps/smartdoc/conf.py index 386bfb915..271e100b5 100644 --- a/apps/smartdoc/conf.py +++ b/apps/smartdoc/conf.py @@ -98,6 +98,9 @@ class Config(dict): } + def get_debug(self) -> bool: + return self.get('DEBUG') if 'DEBUG' in self else True + def get_db_setting(self) -> dict: return { "NAME": self.get('DB_NAME'), diff --git a/apps/smartdoc/settings/base.py b/apps/smartdoc/settings/base.py index 643b28504..8b4c06802 100644 --- a/apps/smartdoc/settings/base.py +++ b/apps/smartdoc/settings/base.py @@ -17,7 +17,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-g1u*$)1ddn20_3orw^f+g4(i(2dacj^awe*2vh-$icgqwfnbq(' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = CONFIG.get_debug() ALLOWED_HOSTS = ['*'] diff --git a/ui/src/views/log/component/ChatRecordDrawer.vue b/ui/src/views/log/component/ChatRecordDrawer.vue index 92070ad7b..b214adb60 100644 --- a/ui/src/views/log/component/ChatRecordDrawer.vue +++ b/ui/src/views/log/component/ChatRecordDrawer.vue @@ -39,14 +39,14 @@ const paginationConfig = reactive({ function closeHandel() {} -function getChatRecord(chatId) { +function getChatRecord(chatId:string) { logApi.getChatRecordLog(id as string, chatId, paginationConfig, loading).then((res) => { // tableData.value = res.data.records paginationConfig.total = res.data.total }) } -const open = (id) => { +const open = (id:string) => { getChatRecord(id) visible.value = true }