cg33 6 лет назад
Родитель
Сommit
24c9968bb7
1 измененных файлов с 8 добавлено и 0 удалено
  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")
 }