This commit is contained in:
suyl
2021-06-29 17:54:32 +08:00
parent 725d842374
commit 36ec8f5036
2 changed files with 3 additions and 3 deletions

View File

@@ -74,8 +74,8 @@ func (ue *KnowUploadController) SnsUploadImg() {
fmt.Fprintf(ue.Ctx.ResponseWriter, "json encode failed $v", err) fmt.Fprintf(ue.Ctx.ResponseWriter, "json encode failed $v", err)
return return
} }
ue.Data["jsonp"] = string(tt) ue.Data["json"] = string(tt)
ue.ServeJSONP() ue.ServeJSON()
//fmt.Fprint(ue.Ctx.ResponseWriter, string(tt)) //fmt.Fprint(ue.Ctx.ResponseWriter, string(tt))
// 上传图片的功能 // 上传图片的功能
case "uploadimage": case "uploadimage":

View File

@@ -3730,7 +3730,7 @@ func init() {
web.ControllerComments{ web.ControllerComments{
Method: "SNSUploadImg", Method: "SNSUploadImg",
Router: `/SNSUploadImg`, Router: `/SNSUploadImg`,
AllowHTTPMethods: []string{"post"}, AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(), MethodParams: param.Make(),
Filters: nil, Filters: nil,
Params: nil}) Params: nil})