fix: UserType为空时去除@

fixed #6
This commit is contained in:
Mmx233
2022-03-30 13:47:05 +08:00
parent 9fa9a04f63
commit d084f7fdf9

View File

@@ -9,7 +9,13 @@ func GenerateLoginInfo(Form *srunTransfer.LoginForm, Meta *srunTransfer.LoginMet
return &srunModels.LoginInfo{
Meta: Meta,
Form: &srunTransfer.LoginForm{
UserName: Form.UserName + "@" + Form.UserType,
UserName: func() string {
if Form.UserType == "" {
return Form.UserName
} else {
return Form.UserName + "@" + Form.UserType
}
}(),
PassWord: Form.PassWord,
},
}