|
@@ -88,6 +88,11 @@ func (this *ArticleController) Detail() {
|
|
|
br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ //是否属于专项调研报告
|
|
|
+ if detail.SubCategoryName == "专项调研" {
|
|
|
+ detail.IsSpecialArticle = true
|
|
|
+ }
|
|
|
+ detail.PublishDate = utils.TimeRemoveHms(detail.PublishDate)
|
|
|
detail.Body = html.UnescapeString(detail.Body)
|
|
|
detail.Body = strings.Replace(detail.Body, "<p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"https://www.froala.com/wysiwyg-editor?pb=1\" title=\"Froala Editor\">Froala Editor</a></p>", "", -1)
|
|
|
detail.Body = strings.Replace(detail.Body, "pre", "div", -1)
|
|
@@ -140,16 +145,13 @@ func (this *ArticleController) Detail() {
|
|
|
if userType == 1 && strings.Contains(detail.CategoryName, "研选") {
|
|
|
hasPersion = false
|
|
|
}
|
|
|
-
|
|
|
if detail.IsReport == 1 {
|
|
|
- fmt.Println("报告权限")
|
|
|
detailCategory, err := models.GetdetailByCategoryIdSando(detail.CategoryId)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取信息失败,Err:" + err.Error() + "categoryID 不存在:" + strconv.Itoa(detail.CategoryId)
|
|
|
return
|
|
|
}
|
|
|
- fmt.Println(detailCategory)
|
|
|
permissionStr, err := models.GetCompanyPermissionByUser(user.CompanyId)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|