|
|
@ -7,6 +7,7 @@ import (
|
|
|
|
"github.com/gorilla/websocket"
|
|
|
|
"github.com/gorilla/websocket"
|
|
|
|
"github.com/taoshihan1991/imaptool/models"
|
|
|
|
"github.com/taoshihan1991/imaptool/models"
|
|
|
|
"github.com/taoshihan1991/imaptool/tools"
|
|
|
|
"github.com/taoshihan1991/imaptool/tools"
|
|
|
|
|
|
|
|
"github.com/taoshihan1991/imaptool/ws"
|
|
|
|
"log"
|
|
|
|
"log"
|
|
|
|
"net/http"
|
|
|
|
"net/http"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
@ -27,6 +28,12 @@ func GetNotice(c *gin.Context) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
result = append(result, h)
|
|
|
|
result = append(result, h)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
status := "online"
|
|
|
|
|
|
|
|
if kefus, ok := ws.KefuList[kefuId]; !ok {
|
|
|
|
|
|
|
|
if len(kefus) <= 0 {
|
|
|
|
|
|
|
|
status = "offline"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
c.JSON(200, gin.H{
|
|
|
|
c.JSON(200, gin.H{
|
|
|
|
"code": 200,
|
|
|
|
"code": 200,
|
|
|
|
"msg": "ok",
|
|
|
|
"msg": "ok",
|
|
|
@ -34,6 +41,7 @@ func GetNotice(c *gin.Context) {
|
|
|
|
"welcome": result,
|
|
|
|
"welcome": result,
|
|
|
|
"username": user.Nickname,
|
|
|
|
"username": user.Nickname,
|
|
|
|
"avatar": user.Avator,
|
|
|
|
"avatar": user.Avator,
|
|
|
|
|
|
|
|
"status": status,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|