소스 검색

用户默认头像

xingzai 3 년 전
부모
커밋
652a0a30ac
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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 = "获取成功"