feat:完善入驻信息管理
This commit is contained in:
@ -10,12 +10,12 @@ type Config struct{}
|
||||
|
||||
func (a *Config) Identity(c *gin.Context) {
|
||||
data := config.NewConfig().Identity()
|
||||
api.APISuccess(data)
|
||||
api.APISuccess(data)(c)
|
||||
}
|
||||
|
||||
func (a *Config) Transaction(c *gin.Context) {
|
||||
data := config.NewConfig().Transaction()
|
||||
api.APISuccess(data)
|
||||
api.APISuccess(data)(c)
|
||||
}
|
||||
|
||||
func (a *Config) Industry(c *gin.Context) {
|
||||
|
@ -32,7 +32,8 @@ func (c *settledForm) bind() *settled.BasicParams {
|
||||
|
||||
// Index 入驻信息
|
||||
func (*Settled) Index(c *gin.Context) {
|
||||
settled.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).Index()
|
||||
data, err := settled.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).Index()
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
// Company 公司入驻信息
|
||||
@ -106,6 +107,17 @@ func (*Settled) Agent(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
credentialImages := make([]string, 0)
|
||||
|
||||
for _, image := range form.CredentialImages {
|
||||
credentialImages = append(credentialImages, (&api.ImageForm{Image: image}).FilterImageURL())
|
||||
}
|
||||
|
||||
form.CredentialImages = credentialImages
|
||||
form.IDImage.Front = (&api.ImageForm{Image: form.IDImage.Front}).FilterImageURL()
|
||||
form.IDImage.Behind = (&api.ImageForm{Image: form.IDImage.Behind}).FilterImageURL()
|
||||
form.IDImage.Hold = (&api.ImageForm{Image: form.IDImage.Hold}).FilterImageURL()
|
||||
|
||||
err := settled.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
Launch(form.settledForm.bind(), &form.IdentityForAgent)
|
||||
api.APIResponse(err)(c)
|
||||
|
Reference in New Issue
Block a user