作者 yangfu

fix

... ... @@ -235,6 +235,10 @@ func Templates(header *protocol.RequestHeader, request *protocol.TemplatesReques
if len(item.Example) > 0 || len(item.Videos) > 2 {
template.Link = fmt.Sprintf("%v/#/ability/opportunity?id=%v", beego.AppConfig.String("h5_host"), item.Id)
}
if template.Questions, err = agg.GetCheckQuestionsByTemplateId(item.Id); err != nil {
log.Error(err)
return
}
for j := range forms {
form := forms[j]
template.FormList[j] = &protocol.Form{
... ... @@ -289,7 +293,7 @@ func Template(header *protocol.RequestHeader, request *protocol.TemplateRequest)
Doc: item.Doc,
FormList: make([]*protocol.Form, len(forms)),
}
if len(item.Example) > 0 {
if len(item.Example) > 0 || len(item.Videos) > 2 {
template.Link = fmt.Sprintf("%v/#/ability/opportunity?id=%v", beego.AppConfig.String("h5_host"), item.Id)
}
if template.Questions, err = agg.GetCheckQuestionsByTemplateId(templates.Id); err != nil {
... ...