From d084f7fdf91d4851e0e22e5687c206be156f1942 Mon Sep 17 00:00:00 2001 From: Mmx233 Date: Wed, 30 Mar 2022 13:47:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20UserType=E4=B8=BA=E7=A9=BA=E6=97=B6?= =?UTF-8?q?=E5=8E=BB=E9=99=A4@=20fixed=20#6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/config.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util/config.go b/util/config.go index ebe89cd..5648605 100644 --- a/util/config.go +++ b/util/config.go @@ -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, }, }