Explorar o código

Add detail button control

cg33 %!s(int64=6) %!d(string=hai) anos
pai
achega
24c9968bb7
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      main.go

+ 8 - 0
main.go

@@ -6,6 +6,7 @@ import (
 	"github.com/GoAdminGroup/go-admin/template"
 	"github.com/GoAdminGroup/go-admin/template/chartjs"
 	_ "github.com/GoAdminGroup/themes/adminlte"
+	"net/http"
 
 	"github.com/GoAdminGroup/go-admin/engine"
 	"github.com/GoAdminGroup/go-admin/examples/datamodel"
@@ -83,5 +84,12 @@ func main() {
 		})
 	})
 
+	r.POST("/admin/popup", func(ctx *gin.Context) {
+		ctx.JSON(http.StatusOK, gin.H{
+			"code": 0,
+			"data": "<h2>hello world</h2>",
+		})
+	})
+
 	_ = r.Run(":9033")
 }