This commit is contained in:
suyl
2021-06-29 17:00:23 +08:00
parent 4cedb56314
commit 3d082a954a

View File

@@ -3,6 +3,7 @@ package controllers
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.rosy.net.cn/jx-callback/business/model"
"github.com/astaxie/beego/server/web" "github.com/astaxie/beego/server/web"
"io/ioutil" "io/ioutil"
"os" "os"
@@ -85,6 +86,11 @@ func (ue *KnowUploadController) SnsUploadImg() {
} }
fmt.Println("打印所有的请求 : ", ue.Ctx.Request.PostForm) fmt.Println("打印所有的请求 : ", ue.Ctx.Request.PostForm)
fmt.Println("打印 upfile :", ue.Ctx.Request.PostForm.Get("upfile")) fmt.Println("打印 upfile :", ue.Ctx.Request.PostForm.Get("upfile"))
ue.Data["json"] = &CallResult{
Data: "success",
Code: model.ErrCodeSuccess,
}
ue.ServeJSON()
default: default:
fmt.Fprint(ue.Ctx.ResponseWriter, `{"msg":"请求地址错误"}`) fmt.Fprint(ue.Ctx.ResponseWriter, `{"msg":"请求地址错误"}`)
} }