{"id":37143218,"url":"https://github.com/iotames/glayui","last_synced_at":"2026-01-14T16:48:38.193Z","repository":{"id":203216056,"uuid":"708740678","full_name":"iotames/glayui","owner":"iotames","description":"LayUI的Go语言封装，作为组件库和简易的Web框架，开箱即用。","archived":false,"fork":false,"pushed_at":"2024-03-08T09:26:54.000Z","size":908,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-21T20:08:04.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iotames.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-23T09:45:15.000Z","updated_at":"2023-10-23T09:46:58.000Z","dependencies_parsed_at":"2023-11-11T16:28:25.542Z","dependency_job_id":"ccc34c41-8002-4fce-a5b9-6f464349445c","html_url":"https://github.com/iotames/glayui","commit_stats":null,"previous_names":["iotames/glayui"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/iotames/glayui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fglayui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fglayui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fglayui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fglayui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iotames","download_url":"https://codeload.github.com/iotames/glayui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotames%2Fglayui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28426493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T16:48:37.381Z","updated_at":"2026-01-14T16:48:38.181Z","avatar_url":"https://github.com/iotames.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 快速开始\n\n```\n# 新建项目文件夹并进入\nmkdir myproject\ncd myproject/\n\n# 下载glayui资源包，路径为 ./glayui/resource\ngit clone https://github.com/iotames/glayui.git\n\n# 启用 workspace(\u003e= go1.18) 模式，添加glayui目录\ngo work init glayui\n\n# \n```\n\n编辑入口文件 `main.go`:\n\n```\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/iotames/glayui/component\"\n\t\"github.com/iotames/glayui/gtpl\"\n\t\"github.com/iotames/glayui/web\"\n)\n\nfunc main() {\n\ttpl := gtpl.GetTpl()\n\ttpl.SetResourceDirPath(\"glayui/resource\")\n\ts := web.NewEasyServer(\":1598\")\n\ts.AddHandler(\"POST\", \"/login\", func(ctx web.Context) {\n\t\tpostdata, _ := io.ReadAll(ctx.Request.Body)\n\t\tfmt.Printf(\"---postdata(%s)---\\n\", string(postdata))\n\t\tctx.Writer.Header().Set(\"Content-Type\", \"application/json\")\n\t\tctx.Writer.Write([]byte(`{\"msg\":\"登录成功\",\"status\":200}`))\n\t})\n\ts.AddHandler(\"POST\", \"/sendsms\", func(ctx web.Context) {\n\t\tpostdata, _ := io.ReadAll(ctx.Request.Body)\n\t\tfmt.Printf(\"---postdata(%s)---\\n\", string(postdata))\n\t\tctx.Writer.Header().Set(\"Content-Type\", \"application/json\")\n\t\tctx.Writer.Write([]byte(`{\"msg\":\"发送成功\",\"status\":200}`))\n\t})\n\ts.AddHandler(\"GET\", \"/login\", func(ctx web.Context) {\n\t\tfm := ctx.NewForm().SetTitle(\"用户登录\").SetSubmitButton(component.Button{Text: \"登录\"})\n\t\tfm.SetSubmitUrl(\"/login\")\n\t\tfm.AddFormItem(component.NewMobileInputItemForSendMsg(\"cellphone\", \"手机号\", \"/sendsms\"))\n\t\tfm.AddFormItem(component.NewTextInputItem(\"smscode\", \"验证码\"))\n\t\tfm.Exec(ctx.Writer)\n\t})\n\t// 访问 http://127.0.0.1:1598/login\n\ts.ListenAndServe()\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotames%2Fglayui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiotames%2Fglayui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotames%2Fglayui/lists"}