package admin

import (
	c "ciyon/zciyon"
	"net/http"
)

func Welcome_init(w http.ResponseWriter, r *http.Request) bool {
	post := c.NewCiyPost(w, r)
	_, userid := Verifyfast(r, c.CiyDB, post)
	if userid == 0 {
		return false
	}
	ret := map[string]any{}
	works := []map[string]any{}
	// csql := c.NewCiySQL("zc_urole")
	// csql.Where("auditstatus", 20)
	// cnt := c.Toint(c.CiyDB.Get1(csql))
	// if cnt > 0 {
	// 	works = append(works, map[string]any{
	// 		"title": fmt.Sprintf("权限待审批%d条", cnt),
	// 		"url":   "rigger/urole.html?liid=20",
	// 		"tab":   "权限审批",
	// 	})
	// }
	ret["works"] = works
	return c.SuccJSON(w, r, ret)
}
