diff --git a/example/config/admin.json b/example/config/admin.json index aa51ce2..2102fc7 100644 --- a/example/config/admin.json +++ b/example/config/admin.json @@ -1,5 +1,5 @@ { - "id": "f4067d842b0f724d7e322e544ad7506b", + "id": "6e69f3da6cbb90c7361be89f0933362a", "label": "HoTime管理平台", "menus": [ { @@ -215,6 +215,22 @@ "label": "权限", "name": "auth", "type": "text" + }, + { + "label": "QQ号", + "name": "qq", + "type": "text" + }, + { + "label": "邮箱", + "list": false, + "name": "email", + "type": "text" + }, + { + "label": "微信号", + "name": "wechat", + "type": "text" } ], "label": "人员管理", diff --git a/example/main.go b/example/main.go index 3f197b8..08b9fe3 100644 --- a/example/main.go +++ b/example/main.go @@ -85,9 +85,11 @@ func main() { //查询详情插入 if that.HandlerStr == "/app/task_admin/time" && that.Req.Method == "GET" { adminId := that.Session("admin_id").ToCeilInt() - todayTime, _ := time.Parse("2006-01-02 15:04:05", time.Now().Format("2006-01-02")+" 00:00:05") - taskAdmin := that.Db.Get("task_admin", "*", Map{"AND": Map{"admin_id": adminId, "create_time[>]": todayTime, "type": Slice{13, 15, 2}}, "ORDER": "create_time DESC"}) + loc, _ := time.LoadLocation("Asia/Shanghai") + todayTime, _ := time.ParseInLocation("2006-01-02 15:04:05", time.Now().Format("2006-01-02")+" 00:00:00", loc) + taskAdmin := that.Db.Get("task_admin", "*", Map{"AND": Map{"admin_id": adminId, "create_time[>]": todayTime.Unix(), "type": Slice{13, 15, 2}}, "ORDER": "create_time DESC"}) + fmt.Println(todayTime.Format("2006-01-02 15:04:05")) //如果当天还未签到 that.Display(0, taskAdmin) @@ -96,7 +98,10 @@ func main() { } //查询列表插入 if that.HandlerStr == "/app/task_admin" && that.Req.Method == "GET" { - that.Req.Form.Set("admin_id", that.Session("admin_id").ToStr()) + if that.Req.FormValue("admin_id") == "" { + + that.Req.Form.Set("admin_id", that.Session("admin_id").ToStr()) + } that.RespFunc = func() { if that.RespData["status"] != nil && that.RespData.GetCeilInt64("status") == 0 { taskAdmin := that.RespData.GetMap("result").GetSlice("data") diff --git a/example/rfcb.exe b/example/rfcb.exe index 2c8e809..da2f906 100644 Binary files a/example/rfcb.exe and b/example/rfcb.exe differ