rdluck 4 éve
szülő
commit
f065d9fdd2
1 módosított fájl, 4 hozzáadás és 8 törlés
  1. 4 8
      controllers/article.go

+ 4 - 8
controllers/article.go

@@ -54,7 +54,7 @@ func (this *ArticleController) Detail() {
 		return
 	}
 
-	//`description:"1:有该行业权限,正常展示,2:无该行业权限,不存在权益客户下,3:无该品类权限,已提交过申请,4:无该行业权限,未提交过申请,5:潜在客户,未提交过申请,6:潜在客户,已提交过申请"`
+	//`description:"1:有该行业权限,正常展示,2:无该行业权限,不存在权益客户下,3:无该品类权限,4:潜在客户,未提交过申请,5:潜在客户,已提交过申请"`
 	if user.CompanyId > 1 {
 		companyPermission, err := models.GetCompanyPermission(user.CompanyId)
 		if err != nil {
@@ -92,11 +92,7 @@ func (this *ArticleController) Detail() {
 				record.CompanyName = user.CompanyName
 				go models.AddCygxArticleViewRecord(record)
 			} else { //无该行业权限
-				if applyCount > 0 {
-					hasPermission = 3
-				} else {
-					hasPermission = 4
-				}
+				hasPermission = 3
 			}
 		}
 		detail, err = models.GetArticleDetailById(articleId)
@@ -140,9 +136,9 @@ func (this *ArticleController) Detail() {
 		}
 	} else { //潜在客户
 		if applyCount > 0 {
-			hasPermission = 6
-		} else {
 			hasPermission = 5
+		} else {
+			hasPermission = 4
 		}
 	}
 Loop: