增加配置客服id

pull/30/head
taoshihan1991 5 years ago
parent 43be49162b
commit 849caa8514

@ -119,12 +119,13 @@
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script src="https://cdn.bootcss.com/reconnecting-websocket/1.0.0/reconnecting-websocket.min.js"></script>
<script>
var KEFU_ID="{{.KEFU_ID}}";
var guest={};
guest.id = "";
guest.name = typeof(returnCitySN)!="undefined" ?returnCitySN["cip"]+"-"+returnCitySN["cname"]:"小米";
guest.avator = "/static/images/"+Math.floor(Math.random()*(14-0+1)+0)+".jpg";
guest.group = "1";
guest.to_id="kefu2";
guest.to_id=KEFU_ID!=""? KEFU_ID:"kefu2";
new Vue({
el: '#app',

@ -38,7 +38,7 @@ loadJs("https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js",function(){
shade: false,
maxmin: true, //开启最大化最小化按钮
area: ['660px', '600px'],
content: ['http://gofly.sopans.com/chat_page','no'],
content: ['http://gofly.sopans.com/chat_page?kefu_id='+KEFU_ID,'no'],
end: function(){
$("#goflyKefu").show();
}

@ -2,8 +2,6 @@ package tmpl
import (
"github.com/gin-gonic/gin"
"github.com/taoshihan1991/imaptool/tools"
"html/template"
"net/http"
)
@ -14,10 +12,9 @@ func PageLogin(c *gin.Context) {
//咨询界面
func PageChat(c *gin.Context) {
c.HTML(http.StatusOK, "chat_page.html", nil)
}
func RenderLogin(w http.ResponseWriter, render interface{}) {
html := tools.FileGetContent("html/login.html")
t, _ := template.New("login").Parse(html)
t.Execute(w, render)
kefuId := c.Query("kefu_id")
c.HTML(http.StatusOK, "chat_page.html", gin.H{
"KEFU_ID":kefuId,
})
}

Loading…
Cancel
Save