瀏覽代碼

后端:去掉打印用户信息

baichengfei 5 年之前
父節點
當前提交
b9d5721a5a
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/dashoo.cn/backend/api/controllers/base.go

+ 3 - 2
src/dashoo.cn/backend/api/controllers/base.go

@@ -351,6 +351,7 @@ func (this *BaseController) Prepare() {
 		"/api/bankapi/get-icbc-gfgl2019-token",
 		"/api/iam/iamlogin",
 	}
+	fmt.Println("请求API-URL", this.Ctx.Input.URL())
 	for _, v := range urls {
 		//fmt.Println("**this.Ctx.Input.URL()**", this.Ctx.Input.URL())
 		if this.Ctx.Input.URL() == v {
@@ -423,7 +424,7 @@ func (this *BaseController) Prepare() {
 		this.User.Unit = usermodel.Unit
 		//		this.User.Superior = usermodel.Superior
 		this.User.Roles = utils.ToStr(usermodel.Roleid)
-		beego.Debug("User:", this.User)
+		//beego.Debug("User:", this.User)
 	}
 
 	if this.User == nil {
@@ -435,7 +436,7 @@ func (this *BaseController) Prepare() {
 // ParseToken parse JWT token in http header.
 func (this *BaseController) ParseToken() (*models.UserInfo, error) {
 	authString := this.Ctx.Input.Header("Authorization")
-	beego.Debug("AuthString:", authString)
+	//beego.Debug("AuthString:", authString)
 
 	kv := strings.Split(authString, " ")
 	if len(kv) != 2 || kv[0] != "Bearer" {