|
@@ -52,7 +52,7 @@ func (this *ArticleController) Detail() {
|
|
|
detail := new(models.ArticleDetail)
|
|
|
hasPermission := 0
|
|
|
hasFree := 0
|
|
|
-
|
|
|
+ var haveResearch bool
|
|
|
//判断是否已经申请过
|
|
|
applyCount, err := models.GetApplyRecordCount(uid)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
@@ -207,17 +207,6 @@ func (this *ArticleController) Detail() {
|
|
|
return
|
|
|
}
|
|
|
if detail.ArticleId >= utils.SummaryArticleId {
|
|
|
- //var hrefRegexp = regexp.MustCompile("[0-9]\\d*")
|
|
|
- //match := hrefRegexp.FindAllString(detail.SellerAndMobile, -1)
|
|
|
- //if match != nil {
|
|
|
- // for _, v := range match {
|
|
|
- // sellerAndMobile := &models.SellerRep{
|
|
|
- // SellerMobile: v,
|
|
|
- // SellerName: strings.Replace(detail.SellerAndMobile, v, "", -1),
|
|
|
- // }
|
|
|
- // sellerList = append(sellerList, sellerAndMobile)
|
|
|
- // }
|
|
|
- //}
|
|
|
strnum := strings.Index(detail.SellerAndMobile, "-")
|
|
|
detail.SellerAndMobile = detail.SellerAndMobile[0:strnum]
|
|
|
if strnum > 0 {
|
|
@@ -259,10 +248,11 @@ Loop:
|
|
|
if detail.IsReport == 1 {
|
|
|
detail.IsBelongReport = true
|
|
|
}
|
|
|
- detail.HaveResearch = true
|
|
|
+ haveResearch = true
|
|
|
}
|
|
|
resp := new(models.ArticleDetailResp)
|
|
|
resp.HasPermission = hasPermission
|
|
|
+ resp.HaveResearch = haveResearch
|
|
|
resp.HasFree = hasFree
|
|
|
resp.Detail = detail
|
|
|
br.Ret = 200
|