作者 唐旭辉

bug fix

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