package logic

import (
	qu "qfw/util"

	. "../util"

	"github.com/go-xweb/xweb"
)

type Logic struct {
	*xweb.Action
	logicList xweb.Mapper `xweb:"/logic/list"` //查询所有任务

}

func (l *Logic) LogicList() {
	defer qu.Catch()
	if l.Method() == "POST" {
		data, _ := Mgo.Find("task", `{"delete":false}`, nil, nil, false, -1, -1)
		l.ServeJson(map[string]interface{}{
			"data": data,
		})
	} else {
		l.Render("com/logic_list.html")
	}
}
