|
@@ -396,7 +396,7 @@ func (this *SmartReportController) Detail() {
|
|
|
br.ErrMsg = "获取资源库版尾失败, Err: " + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- if headResource.ResourceId > 0 {
|
|
|
+ if headResource != nil && headResource.ResourceId > 0 {
|
|
|
resp.HeadImg = headResource.ImgUrl
|
|
|
resp.HeadStyle = headResource.Style
|
|
|
}
|
|
@@ -409,7 +409,7 @@ func (this *SmartReportController) Detail() {
|
|
|
br.ErrMsg = "获取资源库版头失败, Err: " + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- if endResource.ResourceId > 0 {
|
|
|
+ if endResource != nil && endResource.ResourceId > 0 {
|
|
|
resp.EndImg = endResource.ImgUrl
|
|
|
resp.EndStyle = endResource.Style
|
|
|
}
|