feat:完善产品详情

This commit is contained in:
henry
2021-12-09 16:17:23 +08:00
parent adc698840c
commit 626f30a2bd
13 changed files with 361 additions and 359 deletions

View File

@ -49,86 +49,6 @@ func (*User) BindMobile(c *gin.Context) {
api.APIResponse(err)(c)
}
//func (*User) SettledCompany(c *gin.Context) {
// form := &struct {
// InviteCode string `json:"invite_code" form:"invite_code"`
// userSettledForm
// }{}
// if err := api.Bind(form)(c); err != nil {
// api.APIFailure(err.(error))(c)
// return
// }
// err := user.NewSettled()(api.GetSession()(c).(*session.Enterprise)).Company(&user.SettledParams{
// Image: form.FilterImageURL(), Name: form.Name, Code: form.Code,
// Area: form.Area, Introduce: form.Introduce, Industrys: form.Industrys, Keywords: form.Keywords,
// }, (&api.IDStringForm{ID: form.InviteCode}).Convert(), nil)
// api.APIResponse(err)(c)
//}
//
//func (*User) SettledExpert(c *gin.Context) {
// form := &struct {
// userSettledForm
// config.IdentityForExpert
// }{}
// if err := api.Bind(form)(c); err != nil {
// api.APIFailure(err.(error))(c)
// return
// }
// err := user.NewSettled()(api.GetSession()(c).(*session.Enterprise)).Expert(&user.SettledParams{
// Area: form.Area, Introduce: form.Introduce, Industrys: form.Industrys,
// Keywords: form.Keywords,
// }, &form.IdentityForExpert)
// api.APIResponse(err)(c)
//}
//
//func (*User) SettledResearch(c *gin.Context) {
// form := &struct {
// userSettledForm
// config.IdentityForResearch
// }{}
// if err := api.Bind(form)(c); err != nil {
// api.APIFailure(err.(error))(c)
// return
// }
// err := user.NewSettled()(api.GetSession()(c).(*session.Enterprise)).Research(&user.SettledParams{
// Image: form.FilterImageURL(), Name: form.Name, Code: form.Code,
// Area: form.Area, Introduce: form.Introduce, Industrys: form.Industrys, Keywords: form.Keywords,
// }, &form.IdentityForResearch)
// api.APIResponse(err)(c)
//}
//
//func (*User) SettledLaboratory(c *gin.Context) {
// form := &struct {
// userSettledForm
// config.IdentityForLaboratory
// }{}
// if err := api.Bind(form)(c); err != nil {
// api.APIFailure(err.(error))(c)
// return
// }
// err := user.NewSettled()(api.GetSession()(c).(*session.Enterprise)).Laboratory(&user.SettledParams{
// Image: form.FilterImageURL(), Name: form.Name, Code: form.Code,
// Area: form.Area, Introduce: form.Introduce, Industrys: form.Industrys, Keywords: form.Keywords,
// }, &form.IdentityForLaboratory)
// api.APIResponse(err)(c)
//}
//
//func (*User) SettledAgent(c *gin.Context) {
// form := &struct {
// api.IDStringForm
// userSettledForm
// }{}
// if err := api.Bind(form)(c); err != nil {
// api.APIFailure(err.(error))(c)
// return
// }
// err := user.NewSettled()(api.GetSession()(c).(*session.Enterprise)).Agent(&user.SettledParams{
// ID: form.Convert(), Image: form.FilterImageURL(), Name: form.Name, Code: form.Code,
// Area: form.Area, Introduce: form.Introduce, Industrys: form.Industrys, Keywords: form.Keywords,
// })
// api.APIResponse(err)(c)
//}
func (*User) IdentityBasic(c *gin.Context) {
data, err := user.NewIdentity()(api.GetSession()(c).(*session.Enterprise)).Basic()
api.APIResponse(err, data)(c)