fix config model

master
taoshihan 2 months ago
parent 72b55a05cf
commit 3cd76538ba

@ -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,

@ -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

@ -89,11 +89,10 @@
</div>
</body>
<script>
var KEFU_ID='{{.KEFU_ID}}';
var KEFU_ID=getQuery("user_id");
var REFER='{{.Refer}}';
</script>
<script>
KEFU_ID=KEFU_ID!=""? KEFU_ID:"kefu2";
new Vue({
el: '#app',
delimiters:["<{","}>"],

@ -191,7 +191,7 @@
}
if(data.code==200 && data.result!=null){
_this.kefuInfo=data.result;
_this.chatEndpoint=window.location.origin + '/livechat?kefu_id='+_this.kefuInfo.username;
_this.chatEndpoint=window.location.origin + '/livechat?user_id='+_this.kefuInfo.username;
}
}

Loading…
Cancel
Save