一些框架优化
This commit is contained in:
@@ -33,6 +33,7 @@ type UserApi struct {
|
||||
func init() {
|
||||
moduleName := "UserApi"
|
||||
methodName := "Register"
|
||||
skipVerifyTokenPage := true
|
||||
methodDesc := "注册用户"
|
||||
methodAuthor := "tangping"
|
||||
methodMendor := ""
|
||||
@@ -47,7 +48,7 @@ func init() {
|
||||
"id '类型:int'": "用户id",
|
||||
}
|
||||
}`
|
||||
remark.RegisterMethodRemark(moduleName, methodName, methodDesc, methodAuthor, methodMendor, methodDate, methodInParam, methodOutParam)
|
||||
remark.RegisterMethodRemark(moduleName, methodName, methodDesc, methodAuthor, methodMendor, methodDate, methodInParam, methodOutParam, skipVerifyTokenPage)
|
||||
}
|
||||
func (a *UserApi) Register(account string, name string, password string, sex int32, birthday string, phone int64, email string, wechatGroup string, describe string) (responseObj *webServer.ResponseObject) {
|
||||
responseObj = webServer.GetInitResponseObj()
|
||||
@@ -86,6 +87,7 @@ func (a *UserApi) Register(account string, name string, password string, sex int
|
||||
func init() {
|
||||
moduleName := "UserApi"
|
||||
methodName := "Login"
|
||||
skipVerifyTokenPage := true
|
||||
methodDesc := "用户登录"
|
||||
methodAuthor := "tangping"
|
||||
methodMendor := ""
|
||||
@@ -101,7 +103,7 @@ func init() {
|
||||
}
|
||||
}`
|
||||
|
||||
remark.RegisterMethodRemark(moduleName, methodName, methodDesc, methodAuthor, methodMendor, methodDate, methodInParam, methodOutParam)
|
||||
remark.RegisterMethodRemark(moduleName, methodName, methodDesc, methodAuthor, methodMendor, methodDate, methodInParam, methodOutParam, skipVerifyTokenPage)
|
||||
}
|
||||
|
||||
func (a *UserApi) Login(account string, password string) (responseObj *webServer.ResponseObject) {
|
||||
@@ -128,7 +130,7 @@ func (a *UserApi) Login(account string, password string) (responseObj *webServer
|
||||
}
|
||||
|
||||
//添加登录用户
|
||||
webServer.AddLoginUserToken(token, &webServer.TokenInfo{Id: userData.ID, Account: account})
|
||||
webServer.AddLoginUserToken(token, &webServer.TokenInfo{Id: userData.ID, Account: account, UserInfo: userData})
|
||||
|
||||
//UserData映射成map
|
||||
resultMap := make(map[string]any)
|
||||
|
||||
Reference in New Issue
Block a user