作者 唐旭辉

bug fix

@@ -28,6 +28,7 @@ var errmessge ErrorMap = map[string]string{ @@ -28,6 +28,7 @@ var errmessge ErrorMap = map[string]string{
28 "10037": "用户的部门必填", 28 "10037": "用户的部门必填",
29 "10038": "用户的角色必填", 29 "10038": "用户的角色必填",
30 "10039": "用户已存在", 30 "10039": "用户已存在",
  31 + "10039": "注册用户失败",
31 //部门相关 32 //部门相关
32 "10041": "无效的主管设置", 33 "10041": "无效的主管设置",
33 "10042": "无效的上级部门", 34 "10042": "无效的上级部门",
@@ -35,7 +35,7 @@ func RequestUCenterLogin(account, password string) (*ResponseLogin, error) { @@ -35,7 +35,7 @@ func RequestUCenterLogin(account, password string) (*ResponseLogin, error) {
35 func RequestUCenterAddUser(phone string, nickname string, avatar string) (*ResponseAddUser, error) { 35 func RequestUCenterAddUser(phone string, nickname string, avatar string) (*ResponseAddUser, error) {
36 36
37 if len(avatar) <= 0 { 37 if len(avatar) <= 0 {
38 - avatar = config.MConfig.FileHost + config.MConfig.FileHostPath + "/avatar_default.go" 38 + avatar = config.MConfig.FileHost + config.MConfig.FileHostPath + "/avatar_default.png"
39 } 39 }
40 var ucenterReturn *ResponseAddUser 40 var ucenterReturn *ResponseAddUser
41 param := RequestAddUser{ 41 param := RequestAddUser{
@@ -58,7 +58,7 @@ func RequestUCenterAddUser(phone string, nickname string, avatar string) (*Respo @@ -58,7 +58,7 @@ func RequestUCenterAddUser(phone string, nickname string, avatar string) (*Respo
58 } 58 }
59 if !(ucenterReturn.Code == ResponseCode0 && 59 if !(ucenterReturn.Code == ResponseCode0 &&
60 ucenterReturn.Msg == ResponseMsgOk) { 60 ucenterReturn.Msg == ResponseMsgOk) {
61 - return nil, protocol.NewErrWithMessage("10021") 61 + return nil, protocol.NewErrWithMessage("10039")
62 } 62 }
63 return ucenterReturn, nil 63 return ucenterReturn, nil
64 } 64 }