浏览代码

用户默认头像

xingzai 3 年之前
父节点
当前提交
8300782251
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      controllers/user.go

+ 3 - 0
controllers/user.go

@@ -298,6 +298,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 = "获取成功"