|
@@ -36,6 +36,7 @@ func init() {
|
|
|
go weixin.InitDgWork()
|
|
|
go kf()
|
|
|
go weixin.GetKfMsgJob()
|
|
|
+ go weixin.GetOnlineKfJob()
|
|
|
}
|
|
|
|
|
|
func main() {
|
|
@@ -55,19 +56,19 @@ func main() {
|
|
|
|
|
|
func kf() {
|
|
|
defer util.Catch()
|
|
|
- http.HandleFunc("/getkflist", func(w http.ResponseWriter, r *http.Request) {
|
|
|
+ http.HandleFunc("/wxkf/getkflist", func(w http.ResponseWriter, r *http.Request) {
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
//内存
|
|
|
b, _ := json.Marshal(weixin.GetKfList(10))
|
|
|
w.Write(b)
|
|
|
})
|
|
|
- http.HandleFunc("/getkflist0", func(w http.ResponseWriter, r *http.Request) {
|
|
|
+ http.HandleFunc("/wxkf/getkflist0", func(w http.ResponseWriter, r *http.Request) {
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
//url
|
|
|
b, _ := json.Marshal(weixin.GetKfList(0))
|
|
|
w.Write(b)
|
|
|
})
|
|
|
- http.HandleFunc("/getkflist1", func(w http.ResponseWriter, r *http.Request) {
|
|
|
+ http.HandleFunc("/wxkf/getkflist1", func(w http.ResponseWriter, r *http.Request) {
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
//url+客服信息
|
|
|
b, _ := json.Marshal(weixin.GetKfList(1))
|