作者 yangfu

机会/补充机会详情修改

... ... @@ -2079,7 +2079,7 @@ func ChanceDetail(header *protocol.RequestHeader, request *protocol.ChanceDetail
}
jsonUnmarshal(chance.SourceContent, &item.FormList)
item.FormList = clearEmptyForm(item.FormList)
if len(chanceData.Videos) > 0 {
if chanceData != nil && len(chanceData.Videos) > 0 {
chanceData.Videos = strings.ReplaceAll(chanceData.Videos, "https", "http")
}
if chanceData, err = models.GetChanceDataByChanceId(chance.Id); err == nil {
... ... @@ -2308,7 +2308,7 @@ func ChanceReviseDetail(header *protocol.RequestHeader, request *protocol.Chance
log.Error(err)
return
}
if len(detail.Data) > 0 {
if detail != nil && len(detail.Data) > 0 {
detail.Data = strings.ReplaceAll(detail.Data, "https", "http")
}
json.Unmarshal([]byte(detail.Data), &rsp.ChanceReviseData)
... ...