From 3cd76538bab0282e1507fd1f95435889ae622481 Mon Sep 17 00:00:00 2001 From: taoshihan Date: Sat, 2 Aug 2025 11:14:11 +0800 Subject: [PATCH] fix config model --- models/configs.go | 2 +- readme.md | 2 +- static/templates/chat_page.html | 3 +-- static/templates/setting_bottom.html | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/models/configs.go b/models/configs.go index e1f32c1..67bca43 100644 --- a/models/configs.go +++ b/models/configs.go @@ -14,7 +14,7 @@ func UpdateConfig(userid interface{}, key string, value string) { config := FindConfigByUserId(userid, key) if config.ID != 0 { config.ConfValue = value - DB.Where("user_id = ? and conf_key = ?", userid, key).Update(config) + DB.Model(&Config{}).Where("user_id = ? and conf_key = ?", userid, key).Update(config) } else { newConfig := &Config{ ID: 0, diff --git a/readme.md b/readme.md index 69032b0..5006e1c 100644 --- a/readme.md +++ b/readme.md @@ -83,7 +83,7 @@ For domain access, configure a reverse proxy to port 8081 to hide the port numbe ### Customer Service Integration Chat Link -http://127.0.0.1:8081/livechat?kefu_id=agent +http://127.0.0.1:8081/livechat?user_id=agent Popup Integration diff --git a/static/templates/chat_page.html b/static/templates/chat_page.html index bd96f5e..c6cdbf7 100644 --- a/static/templates/chat_page.html +++ b/static/templates/chat_page.html @@ -89,11 +89,10 @@