瀏覽代碼

八福农业图片查看

baishaojie 4 月之前
父節點
當前提交
f66277b410
共有 5 個文件被更改,包括 6 次插入1 次删除
  1. 二進制
      __debug_bin.exe
  2. 1 1
      conf/app.ini
  3. 4 0
      http/handle/api/upload.go
  4. 1 0
      http/routers/app_api.go
  5. 二進制
      uploads/image/bfny.jpg

二進制
__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 验证
 		{

二進制
uploads/image/bfny.jpg