feat:完善信息
This commit is contained in:
@ -60,7 +60,7 @@ func (a *Account) Register(c *gin.Context) {
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (a *Account) BindMobile() {
|
||||
func (a *Account) BindMobile(c *gin.Context) {
|
||||
//account.NewOther()().BindMobile()
|
||||
}
|
||||
|
||||
@ -72,6 +72,6 @@ func (a *Account) Logout(c *gin.Context) {
|
||||
if handle != nil {
|
||||
session = handle.(*service.SessionEnterprise)
|
||||
}
|
||||
err := account2.NewLogout()(session, api.GetLocal()(c).(uint64)).Launch()
|
||||
err := account2.NewLogout()(session).Launch()
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
25
app/api/enterprise/api/identity.go
Normal file
25
app/api/enterprise/api/identity.go
Normal file
@ -0,0 +1,25 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"SciencesServer/app/api/enterprise/controller/identity"
|
||||
"SciencesServer/app/basic/api"
|
||||
"SciencesServer/app/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Identity struct{}
|
||||
|
||||
func (*Identity) Expert(c *gin.Context) {
|
||||
form := &struct {
|
||||
Name string `json:"name" form:"name"`
|
||||
Mobile string `json:"mobile" form:"mobile"`
|
||||
api.PageForm
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := identity.NewInstance()(api.GetSession()(c).(*service.SessionEnterprise), api.GetLocal()(c).(string)).
|
||||
Expert(form.Name, form.Mobile, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
package api
|
||||
|
||||
type Tenant struct{}
|
@ -42,7 +42,7 @@ func (a *User) Detail(c *gin.Context) {
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (a *Tenant) SettledCompany(c *gin.Context) {
|
||||
func (a *User) SettledCompany(c *gin.Context) {
|
||||
form := &struct {
|
||||
userSettledForm
|
||||
}{}
|
||||
@ -57,7 +57,7 @@ func (a *Tenant) SettledCompany(c *gin.Context) {
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (a *Tenant) SettledExpert(c *gin.Context) {
|
||||
func (a *User) SettledExpert(c *gin.Context) {
|
||||
form := &struct {
|
||||
userSettledForm
|
||||
config.IdentityForExpert
|
||||
@ -67,12 +67,13 @@ func (a *Tenant) SettledExpert(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
err := user2.NewSettled()(api.GetSession()(c).(*service.SessionEnterprise)).Expert(&user2.SettledParams{
|
||||
ID: form.Convert(), Area: form.Area, Introduce: form.Introduce, Industry: form.Industry, Keywords: form.Keywords,
|
||||
ID: form.Convert(), Area: form.Area, Introduce: form.Introduce, Industry: form.Industry,
|
||||
Keywords: form.Keywords,
|
||||
}, &form.IdentityForExpert)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (a *Tenant) SettledResearch(c *gin.Context) {
|
||||
func (a *User) SettledResearch(c *gin.Context) {
|
||||
form := &struct {
|
||||
userSettledForm
|
||||
config.IdentityForResearch
|
||||
@ -88,7 +89,7 @@ func (a *Tenant) SettledResearch(c *gin.Context) {
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (a *Tenant) SettledLaboratory(c *gin.Context) {
|
||||
func (a *User) SettledLaboratory(c *gin.Context) {
|
||||
form := &struct {
|
||||
userSettledForm
|
||||
config.IdentityForLaboratory
|
||||
@ -117,7 +118,7 @@ func (a *User) SwitchIdentity(c *gin.Context) {
|
||||
}
|
||||
|
||||
func (a *User) Back(c *gin.Context) {
|
||||
data, err := user2.NewBack()(api.GetSession()(c).(*service.SessionEnterprise)).List()
|
||||
data, err := user2.NewBank()(api.GetSession()(c).(*service.SessionEnterprise)).List()
|
||||
api.APIResponse(err, data)
|
||||
}
|
||||
|
||||
@ -128,11 +129,11 @@ func (a *User) BackBind(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := user2.NewBack()(api.GetSession()(c).(*service.SessionEnterprise)).Bind(&user2.BackParams{
|
||||
err := user2.NewBank()(api.GetSession()(c).(*service.SessionEnterprise)).Bind(&user2.BankParams{
|
||||
Name: form.Name,
|
||||
IDCard: form.IDCard,
|
||||
BackCard: form.BackCard,
|
||||
BackName: form.BackName,
|
||||
BankCard: form.BackCard,
|
||||
BankName: form.BackName,
|
||||
}, form.Captcha)
|
||||
api.APIResponse(err)
|
||||
}
|
||||
@ -144,6 +145,6 @@ func (a *User) BackUnbind(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := user2.NewBack()(api.GetSession()(c).(*service.SessionEnterprise)).Unbind(form.Convert())
|
||||
err := user2.NewBank()(api.GetSession()(c).(*service.SessionEnterprise)).Unbind(form.Convert())
|
||||
api.APIResponse(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user