Browse Source

用户默认头像

xingzai 3 years ago
parent
commit
652a0a30ac
1 changed files with 3 additions and 0 deletions
  1. 3 0
      controllers/user.go

+ 3 - 0
controllers/user.go

@@ -290,6 +290,9 @@ func (this *UserController) Detail() {
 		hasPermission = 2
 		detail.HasPermission = hasPermission
 	}
+	if detail.Headimgurl == "" {
+		detail.Headimgurl = "https://hongze.oss-cn-shanghai.aliyuncs.com/static/images/202204/20220425/uYF0So2tSwAudlscqQhEzREGTwak.png"
+	}
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"