diff --git a/README.md b/README.md index 3aa2f3b..2cd8fb9 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ 1. 支持 [gorm](https://gorm.io/gorm) 数据库组件 1. 支持 [go-redis](https://github.com/go-redis/redis/v7) 组件 1. 支持 RESTful API 返回值规范 -1. 支持 gormgen、handlergen 代码生成工具 +1. 支持 生成数据表 CURD、控制器方法 等代码生成器 1. 支持 web 界面,使用的 [Light Year Admin 模板](https://gitee.com/yinqi/Light-Year-Admin-Using-Iframe) diff --git a/assets/bootstrap/images/qr-code.png b/assets/bootstrap/images/qr-code.png new file mode 100644 index 0000000..34dd9aa Binary files /dev/null and b/assets/bootstrap/images/qr-code.png differ diff --git a/assets/bootstrap/js/httpclient/httpclient.js b/assets/bootstrap/js/httpclient/httpclient.js index 88fbdf9..5bb0812 100644 --- a/assets/bootstrap/js/httpclient/httpclient.js +++ b/assets/bootstrap/js/httpclient/httpclient.js @@ -3,7 +3,7 @@ document.write(''); document.write(''); document.write(''); - +document.write('
'); function GenerateAuthorization(path, method, params) { let key = "admin"; diff --git a/assets/templates/admin/admin_list.html b/assets/templates/admin/admin_list.html index e2735a8..61cad85 100644 --- a/assets/templates/admin/admin_list.html +++ b/assets/templates/admin/admin_list.html @@ -131,6 +131,9 @@ ' 重置密码\n' + + ' 菜单授权\n' + ' 删除\n' + @@ -272,6 +275,11 @@ }); }); + // 菜单授权 + $(document).on('click', '.btn-menu', function () { + location.href = "/admin/action/" + $(this).attr('data-id'); + }); + // 删除 $(document).on('click', '.btn-confirm', function () { const id = $(this).attr('data-id'); diff --git a/assets/templates/admin/admin_login.html b/assets/templates/admin/admin_login.html index 1757e8c..b0a4cea 100644 --- a/assets/templates/admin/admin_login.html +++ b/assets/templates/admin/admin_login.html @@ -115,7 +115,7 @@ AjaxForm( "POST", - "/login/web", + "/api/login", postData, function () { }, diff --git a/assets/templates/admin/admin_menu.html b/assets/templates/admin/admin_menu.html new file mode 100644 index 0000000..870b7d1 --- /dev/null +++ b/assets/templates/admin/admin_menu.html @@ -0,0 +1,213 @@ + + + + + + + + + + + + + +
+
+
+
+
+
配置菜单 + +
+
+
+ +
+
+ + + + + + + + + + +
+
+ + +
+
+
+ + + +
+
+
+
+
+
+ + + + + + + + + diff --git a/assets/templates/authorized/authorized_api.html b/assets/templates/authorized/authorized_api.html index 4c9cd52..0780adc 100644 --- a/assets/templates/authorized/authorized_api.html +++ b/assets/templates/authorized/authorized_api.html @@ -58,7 +58,7 @@
-
已授权接口
+
已授权接口
@@ -96,6 +96,7 @@ }, function (data) { + $("#businessKey").html("(授权方:" + data.business_key + ")"); if (data.list.length > 0) { var badgeMethodClass = ""; diff --git a/assets/templates/authorized/authorized_demo.html b/assets/templates/authorized/authorized_demo.html index 2b75cae..57e22be 100644 --- a/assets/templates/authorized/authorized_demo.html +++ b/assets/templates/authorized/authorized_demo.html @@ -210,5 +210,6 @@ console.log({authorization: key + " " + digest, date: datetime}); + diff --git a/assets/templates/configinfo/config_code.html b/assets/templates/configinfo/config_code.html index bd9293f..6c326d1 100644 --- a/assets/templates/configinfo/config_code.html +++ b/assets/templates/configinfo/config_code.html @@ -42,6 +42,8 @@
- +
+ +
diff --git a/assets/templates/configinfo/config_email.html b/assets/templates/configinfo/config_email.html index 149248c..5b75742 100644 --- a/assets/templates/configinfo/config_email.html +++ b/assets/templates/configinfo/config_email.html @@ -14,7 +14,7 @@
-
邮箱告警配置
+
邮箱告警配置
@@ -119,7 +119,7 @@ return false; } - const postData = { + const patchData = { host: host, port: port, user: user, @@ -131,7 +131,7 @@ AjaxForm( "PATCH", "/api/config/email", - postData, + patchData, function () { $(this).hide(); $("#btnLoading").show(); diff --git a/assets/templates/dashboard/dashboard.html b/assets/templates/dashboard/dashboard.html index a64aed4..f76ebc3 100644 --- a/assets/templates/dashboard/dashboard.html +++ b/assets/templates/dashboard/dashboard.html @@ -3,8 +3,8 @@ - - + + @@ -12,6 +12,19 @@
+
+
+
+
项目信息
+
+
+

操作系统:{{ .GoOS }} {{ .GoArch }} {{ .GoVersion }}

+

项目地址:{{ .ProjectPath }}

+

项目域名:{{ .Host }} {{ .Env }}

+
+
+
+
@@ -66,21 +79,30 @@
-
项目信息
+
开源信息
-

操作系统:{{ .GoOS }} {{ .GoArch }}

-

项目地址:{{ .ProjectPath }}

-

项目域名:{{ .Host }} {{ .Env }}

-

GOPATH:{{ .GoPath }}

-

Version:{{ .GoVersion }}

-

Goroutine:{{ .Goroutine }}

- - +

GitHub 地址:xinliangnote/go-gin-api

+

GitHub Stars:GitHub stars

+

GitHub Forks:GitHub forks

+
+
+
+
欢迎交流
+
+
+

+ +

+
+
+
+ +
diff --git a/assets/templates/gencode/gencode_gorm.html b/assets/templates/generator/generator_gorm.html similarity index 69% rename from assets/templates/gencode/gencode_gorm.html rename to assets/templates/generator/generator_gorm.html index a3e6a35..6c2eafa 100644 --- a/assets/templates/gencode/gencode_gorm.html +++ b/assets/templates/generator/generator_gorm.html @@ -3,9 +3,9 @@ - - - + + + @@ -13,7 +13,7 @@
-
gormgen 代码生成工具
+
生成数据表 CURD
@@ -48,9 +48,9 @@
- - - + + + +
+ +
diff --git a/assets/templates/gencode/gencode_handler.html b/assets/templates/generator/generator_handler.html similarity index 66% rename from assets/templates/gencode/gencode_handler.html rename to assets/templates/generator/generator_handler.html index bdce92f..f075f09 100644 --- a/assets/templates/gencode/gencode_handler.html +++ b/assets/templates/generator/generator_handler.html @@ -3,9 +3,9 @@ - - - + + + @@ -13,7 +13,7 @@
-
handlergen 代码生成工具
+
生成控制器方法
@@ -44,9 +44,9 @@
- - - + + + +
+ +
diff --git a/assets/templates/index/index.html b/assets/templates/index/index.html index c481d7a..d224bbb 100644 --- a/assets/templates/index/index.html +++ b/assets/templates/index/index.html @@ -45,8 +45,8 @@ @@ -77,6 +77,7 @@