UpFile.go 571 B

12345678910111213141516171819202122232425
  1. package controllers
  2. import (
  3. "Yunlot/lib"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. type UpFileController struct {
  7. beego.Controller
  8. }
  9. // 列表 -
  10. func (c *UpFileController) ConfigUpFileToken() {
  11. // 验证登录 User_r, User_x
  12. //b_, User_r, _ := lib.Verification(c.Ctx.GetCookie("User_tokey"), c.GetString("User_tokey"))
  13. //if !b_ {
  14. // c.Data["json"] = lib.JSONS{Code: 302, Msg: "请重新登录!"}
  15. // c.ServeJSON()
  16. // return
  17. //}
  18. c.Data["json"] = lib.JSONR{Code: 200, Msg: "ok!", Data: lib.UploadToken(c.GetString("T_suffix"))}
  19. c.ServeJSON()
  20. return
  21. }