|
@@ -107,13 +107,21 @@ func (this *MyReportController) Collect() {
|
|
|
if err != nil {
|
|
|
br.Msg = "收藏失败"
|
|
|
br.ErrMsg = "获取研报详情失败,Err:" + err.Error()
|
|
|
-
|
|
|
+ return
|
|
|
}
|
|
|
if reportResp.Ret != 200 {
|
|
|
br.Msg = "收藏失败"
|
|
|
br.ErrMsg = "获取研报详情失败,Err:" + reportResp.ErrMsg
|
|
|
return
|
|
|
}
|
|
|
+ if reportResp.Data.Report == nil {
|
|
|
+ br.Msg = "该研报已删除或不存在,请刷新页面"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if reportResp.Data.Status != utils.ReportPermissionStatusHas {
|
|
|
+ br.Msg = "用户权限不足,不能收藏"
|
|
|
+ return
|
|
|
+ }
|
|
|
report := reportResp.Data.Report
|
|
|
publishTime, err := time.Parse(utils.FormatDateTime, report.PublishTime)
|
|
|
if err != nil {
|