123456789101112131415161718192021222324252627 |
- package microservice
- import (
- qu "qfw/util"
- . "../util"
- "github.com/go-xweb/xweb"
- )
- type Service struct {
- *xweb.Action
- serviceList xweb.Mapper `xweb:"/microservice/list"` //查询所有任务
- }
- func (s *Service) ServiceList() {
- defer qu.Catch()
- if s.Method() == "POST" {
- data, _ := Mgo.Find("task", `{"delete":false}`, nil, nil, false, -1, -1)
- s.ServeJson(map[string]interface{}{
- "data": data,
- })
- } else {
- s.Render("com/microservice_list.html")
- }
- }
|