|
|
@ -2,12 +2,29 @@ package controller
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"encoding/json"
|
|
|
|
|
|
|
|
"github.com/gin-gonic/gin"
|
|
|
|
"github.com/gorilla/websocket"
|
|
|
|
"github.com/gorilla/websocket"
|
|
|
|
|
|
|
|
"github.com/taoshihan1991/imaptool/models"
|
|
|
|
"github.com/taoshihan1991/imaptool/tools"
|
|
|
|
"github.com/taoshihan1991/imaptool/tools"
|
|
|
|
"log"
|
|
|
|
"log"
|
|
|
|
"net/http"
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
func GetNotice(c *gin.Context) {
|
|
|
|
|
|
|
|
kefuId:=c.Query("kefu_id")
|
|
|
|
|
|
|
|
user:=models.FindUser(kefuId)
|
|
|
|
|
|
|
|
info:=make(map[string]interface{})
|
|
|
|
|
|
|
|
info["nickname"]=user.Nickname
|
|
|
|
|
|
|
|
info["avator"]=user.Avator
|
|
|
|
|
|
|
|
info["name"]=user.Name
|
|
|
|
|
|
|
|
info["content"]="欢迎您!有什么我能帮助您的?"
|
|
|
|
|
|
|
|
info["time"]=time.Now().String()
|
|
|
|
|
|
|
|
c.JSON(200, gin.H{
|
|
|
|
|
|
|
|
"code": 200,
|
|
|
|
|
|
|
|
"msg": "ok",
|
|
|
|
|
|
|
|
"result":info,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
var upgrader = websocket.Upgrader{}
|
|
|
|
var upgrader = websocket.Upgrader{}
|
|
|
|
var oldFolders map[string]int
|
|
|
|
var oldFolders map[string]int
|
|
|
|
|
|
|
|
|
|
|
|