diff --git a/readme.md b/readme.md index 6d5c4c9..5755c9f 100644 --- a/readme.md +++ b/readme.md @@ -185,6 +185,7 @@ location / #PROXY-END/ ``` +### 如果在登录到后台后,出现了需要认证的弹窗,请前往官网注册账户并绑定手机。填入绑定的手机+自己的密码可以通过认证。如果没有中国手机号,请在官网联系我获取测试手机号和密码 ### 版权声明 diff --git a/readme_en.md b/readme_en.md index 2f9ab63..a008cda 100644 --- a/readme_en.md +++ b/readme_en.md @@ -128,7 +128,7 @@ server{ } ``` -#### GOFLY is a live chat system for customer support service that is implemented using the Golang programming language and MySQL database. It is designed to allow businesses to communicate with their customers in real-time through a web-based platform. GOFLY provides a range of features and tools to help businesses manage customer inquiries and interactions, including support for multiple channels (e.g. chat, email, phone), customizable templates for responses, and the ability to track and analyze customer conversations. +#### If you encounter a pop-up window requiring authentication after logging into the backend, please go to the official website to register an account and bind your phone. Entering your bound phone number + your own password will allow you to pass the authentication. If you do not have a Chinese phone number, please contact me on the official website to obtain a test phone number and password. ### Copyright diff --git a/static/css/common.css b/static/css/common.css index 34cdba4..a7a6096 100644 --- a/static/css/common.css +++ b/static/css/common.css @@ -198,7 +198,7 @@ white-space: nowrap; color: #999; text-align: left; - margin-top: -15px; + margin: -5px 0px 3px 0px; } .chatMainPage{ margin-top: 1px; @@ -220,6 +220,9 @@ border-radius: 0px 8px 8px 8px; padding: 10px 15px; } +.chatBoxMe{ + margin-top: 10px; +} .chatBoxMe .chatContent2 { border-radius: 8px 0px 8px 8px; background-color: rgb(0, 145, 255); diff --git a/static/js/chat-page.js b/static/js/chat-page.js index 85c7711..d7932f6 100644 --- a/static/js/chat-page.js +++ b/static/js/chat-page.js @@ -175,21 +175,6 @@ new Vue({ }); }, - //正在输入 - inputNextText:function(){ - if(this.socketClosed||!this.socket){ - return; - } - //console.log(this.messageContent); - var message = {} - message.type = "inputing"; - message.data = { - from : this.visitor.visitor_id, - to : this.visitor.to_id, - content:this.messageContent - }; - this.socket.send(JSON.stringify(message)); - }, OnClose:function() { console.log("ws:onclose"); this.focusSendConn=true; @@ -547,24 +532,10 @@ new Vue({ }, //提示音 alertSound:function(){ - var b = document.getElementById("chatMessageAudio"); - if (b.canPlayType('audio/ogg; codecs="vorbis"')) { - b.type= 'audio/mpeg'; - b.src= '/static/images/alert2.ogg'; - var p = b.play(); - p && p.then(function () { - }).catch(function (e) { - }); - } + alertSound("chatMessageAudio",'/static/images/alert2.ogg'); }, sendSound:function(){ - var b = document.getElementById("chatMessageSendAudio"); - if (b.canPlayType('audio/ogg; codecs="vorbis"')) { - b.type= 'audio/mpeg'; - b.src= '/static/images/sent.ogg'; - var p = b.play(); - p && p.then(function(){}).catch(function(e){}); - } + alertSound("chatMessageSendAudio",'/static/images/sent.ogg'); }, sendAjax:function(url,method,params,callback){ let _this=this; diff --git a/static/js/functions.js b/static/js/functions.js index 3fcb003..ea4ae87 100644 --- a/static/js/functions.js +++ b/static/js/functions.js @@ -154,4 +154,13 @@ function utf8ToB64(str) { function b64ToUtf8(str) { return decodeURIComponent(escape(window.atob(str))); } +//播放声音 +function alertSound(id,src){ + var b = document.getElementById(id); + if(src!=""){ + b.src=src; + } + var p = b.play(); + p && p.then(function(){}).catch(function(e){}); +} ; diff --git a/static/templates/chat_page.html b/static/templates/chat_page.html index 0d22a78..dd4aba2 100644 --- a/static/templates/chat_page.html +++ b/static/templates/chat_page.html @@ -73,7 +73,7 @@
- + <{flyLang.sent}> @@ -87,10 +87,8 @@