Kaynağa Gözat

八福农业图片查看

baishaojie 4 ay önce
ebeveyn
işleme
f66277b410

BIN
__debug_bin.exe


+ 1 - 1
conf/app.ini

@@ -75,7 +75,7 @@ Host = 192.168.1.93:3326
 #Name = tmrgo
 #Password = kepaiteng!QAZ
 #Host = 222.73.129.15:31306
-Name = tmrwatch2
+Name = tmrwatch5
 TablePrefix =
 
 ShowXormlog = false

+ 4 - 0
http/handle/api/upload.go

@@ -889,3 +889,7 @@ func UploadFile1(c *gin.Context) {
 
 // 	c.File(filepath)
 // }
+
+func GetImage(context *gin.Context) {
+	http.ServeFile(context.Writer, context.Request, "uploads/image/bfny.jpg")
+}

+ 1 - 0
http/routers/app_api.go

@@ -48,6 +48,7 @@ func AppAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
 
 		s.POST("/userwxopenid/binding", api.UserWXOpenIDBinding)
 
+		s.GET("/yq/image", api.GetImage)
 		apiV1 := s.Group("/authdata")
 		apiV1.Use(jwt.JWT()) // token 验证
 		{

BIN
uploads/image/bfny.jpg