|
@@ -66,6 +66,7 @@ func (this *ArticleController) Detail() {
|
|
|
return
|
|
|
}
|
|
|
detail := new(models.ArticleDetail)
|
|
|
+ //detailInit := new(models.ArticleDetail) // 初始化的文章信息,用来处理body 内容回显
|
|
|
hasPermission := 0
|
|
|
var haveResearch bool
|
|
|
//判断是否已经申请过
|
|
@@ -82,6 +83,7 @@ func (this *ArticleController) Detail() {
|
|
|
br.ErrMsg = "获取信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
lyjhTypeMap, _ := services.GetLyjhTypeMap()
|
|
|
if _, ok := lyjhTypeMap[detail.CategoryId]; ok {
|
|
|
detail.IsRoadShow = true
|
|
@@ -117,6 +119,7 @@ func (this *ArticleController) Detail() {
|
|
|
}
|
|
|
articleCollectMap, _ := services.GetCygxArticleCollectMap(user.UserId)
|
|
|
detail.IsCollect = articleCollectMap[detail.ArticleId]
|
|
|
+ //detailInit = detail
|
|
|
if isSendWx == 1 {
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
@@ -201,6 +204,7 @@ func (this *ArticleController) Detail() {
|
|
|
detail.Body = strings.Replace(detail.Body, "pre", "div", -1)
|
|
|
//detail.Abstract = html.UnescapeString(detail.Abstract)
|
|
|
detail.Abstract, _ = services.GetReportContentTextSubNew(detail.Abstract)
|
|
|
+
|
|
|
if companyPermission == "" {
|
|
|
if applyCount > 0 {
|
|
|
hasPermission = 5
|
|
@@ -350,7 +354,7 @@ func (this *ArticleController) Detail() {
|
|
|
}
|
|
|
}
|
|
|
Loop:
|
|
|
- if hasPermission != 1 {
|
|
|
+ if hasPermission != 1 && user.UserId > 0 {
|
|
|
detail.Body = ""
|
|
|
detail.BodyText = ""
|
|
|
} else {
|
|
@@ -433,6 +437,19 @@ Loop:
|
|
|
}
|
|
|
resp.HasPermission = hasPermission
|
|
|
resp.HaveResearch = haveResearch
|
|
|
+ if user.UserId == 0 {
|
|
|
+ if detail.UpdateFrequency == "daily" {
|
|
|
+ detail.Frequency = "日度"
|
|
|
+ } else if detail.UpdateFrequency == "weekly" {
|
|
|
+ detail.Frequency = "周度"
|
|
|
+ } else if detail.UpdateFrequency == "monthly" {
|
|
|
+ detail.Frequency = "月度"
|
|
|
+ } else if detail.UpdateFrequency == "quarterly" {
|
|
|
+ detail.Frequency = "季度"
|
|
|
+ } else if detail.UpdateFrequency == "yearly" {
|
|
|
+ detail.Frequency = "年度"
|
|
|
+ }
|
|
|
+ }
|
|
|
resp.Detail = detail
|
|
|
if user.Mobile != "" {
|
|
|
resp.Mobile = user.Mobile
|