增加记录来源

pull/30/head
taoshihan1991 4 years ago
parent 113f46efae
commit cd7cde2b4b

@ -26,7 +26,7 @@ func JwtApiMiddleware(c *gin.Context){
return
}
createTime:=int64(userinfo["create_time"].(float64))
var expire int64=2*60*60
var expire int64=24*60*60
nowTime:=time.Now().Unix();
if (nowTime-createTime) >=expire{
c.JSON(200, gin.H{

@ -9,7 +9,7 @@ $("#launchButton").click(function() {
area: ['520px', '530px'],
offset: 'rb', //右下角弹出
anim: 2,
content: [GOFLY_URL+'/chat_page', 'no'], //iframe的urlno代表不显示滚动条
content: [GOFLY_URL+'/chat_page?refer='+window.location.host, 'no'], //iframe的urlno代表不显示滚动条
end: function(){
launchButtonFlag=false;
$(".launchButton").show();

@ -17,6 +17,9 @@ func PageChat(c *gin.Context) {
lang,_ := c.Get("lang")
language:=config.CreateLanguage(lang.(string))
refer:=c.Request.Referer()
if refer==""{
refer = c.Query("refer")
}
c.HTML(http.StatusOK, "chat_page.html", gin.H{
"KEFU_ID":kefuId,
"SendBtn":language.Send,

Loading…
Cancel
Save