feat:完善信息

This commit is contained in:
henry
2021-10-13 14:41:46 +08:00
parent 8866b83cfb
commit 52dc8cb57d
8 changed files with 29 additions and 29 deletions

View File

@ -33,7 +33,7 @@ func (a *Account) Login(c *gin.Context) {
api.APIFailure(err.(error))(c)
return
}
data, err := account.NewLogin()(api.GetLocal()(c).(uint64)).Launch(account.LoginMode(form.Mode), &account.LoginParams{
data, err := account.NewLogin()(api.GetLocal()(c).(string)).Launch(account.LoginMode(form.Mode), &account.LoginParams{
Captcha: struct {
Mobile string
Captcha string
@ -53,7 +53,7 @@ func (a *Account) Register(c *gin.Context) {
api.APIFailure(err.(error))(c)
return
}
data, err := account.NewRegister()(api.GetLocal()(c).(uint64)).Launch(&account.RegisterParams{
data, err := account.NewRegister()(api.GetLocal()(c).(string)).Launch(&account.RegisterParams{
Name: form.Name, Mobile: form.Mobile, Captcha: form.Captcha,
Password: form.Password, RepeatPass: form.RepeatPass, Identity: form.Identity,
})

View File

@ -31,7 +31,7 @@ func (a *Technology) Paper(c *gin.Context) {
api.APIFailure(err.(error))(c)
return
}
data, err := technology.NewPaper()(api.GetSession()(c).(*service.SessionEnterprise), api.GetLocal()(c).(uint64)).
data, err := technology.NewPaper()(api.GetSession()(c).(*service.SessionEnterprise), api.GetLocal()(c).(string)).
List(form.Title, form.Page, form.PageSize)
api.APIResponse(err, data)(c)
}
@ -43,7 +43,7 @@ func (a *Technology) PaperAdd(c *gin.Context) {
api.APIFailure(err.(error))(c)
return
}
err := technology.NewPaper()(api.GetSession()(c).(*service.SessionEnterprise), api.GetLocal()(c).(uint64)).
err := technology.NewPaper()(api.GetSession()(c).(*service.SessionEnterprise), api.GetLocal()(c).(string)).
Form(&technology.PaperParams{
Title: form.Title, Ext: form.Ext, Author: form.Author, PublishAt: form.PublishAt,
Keyword: form.Keyword, Tags: form.Tags, Remark: form.Remark,
@ -60,7 +60,7 @@ func (a *Technology) PaperEdit(c *gin.Context) {
api.APIFailure(err.(error))(c)
return
}
err := technology.NewPaper()(api.GetSession()(c).(*service.SessionEnterprise), api.GetLocal()(c).(uint64)).
err := technology.NewPaper()(api.GetSession()(c).(*service.SessionEnterprise), api.GetLocal()(c).(string)).
Form(&technology.PaperParams{
ID: form.Convert(), Title: form.Title, Ext: form.Ext, Author: form.Author, PublishAt: form.PublishAt,
Keyword: form.Keyword, Tags: form.Tags, Remark: form.Remark,
@ -75,7 +75,7 @@ func (a *Technology) PaperDelete(c *gin.Context) {
api.APIFailure(err.(error))(c)
return
}
err := technology.NewPaper()(api.GetSession()(c).(*service.SessionEnterprise), api.GetLocal()(c).(uint64)).
err := technology.NewPaper()(api.GetSession()(c).(*service.SessionEnterprise), api.GetLocal()(c).(string)).
Delete(form.Convert())
api.APIResponse(err)(c)
}