|
@@ -50,7 +50,8 @@ var (
|
|
}
|
|
}
|
|
)
|
|
)
|
|
|
|
|
|
-//
|
|
|
|
|
|
+// MedicalFunctionCode 医疗行业权益代码
|
|
|
|
+var MedicalFunctionCode = "lyh_yl_ylbxss"
|
|
|
|
|
|
func init() {
|
|
func init() {
|
|
xweb.AddAction(&Pcsearch{})
|
|
xweb.AddAction(&Pcsearch{})
|
|
@@ -233,6 +234,18 @@ func (p *Pcsearch) GetNewBids() error {
|
|
if domainPageType, ok := DomainPageType[bidField]; ok {
|
|
if domainPageType, ok := DomainPageType[bidField]; ok {
|
|
pageType = domainPageType
|
|
pageType = domainPageType
|
|
}
|
|
}
|
|
|
|
+ userId, _ := p.GetSession("userId").(string)
|
|
|
|
+
|
|
|
|
+ // 如果没有权限
|
|
|
|
+ if !jy.HasBidFieldPower(config.ResourceApi.HasPowers, userId, MedicalFunctionCode) {
|
|
|
|
+ p.T["list"] = []map[string]interface{}{}
|
|
|
|
+ p.ServeJson(map[string]interface{}{
|
|
|
|
+ "list": []map[string]interface{}{},
|
|
|
|
+ "count": 0,
|
|
|
|
+ "totalPage": 0,
|
|
|
|
+ })
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
}
|
|
}
|
|
p.T["list"] = PCS_list(pageType) //Newbids("")[0]
|
|
p.T["list"] = PCS_list(pageType) //Newbids("")[0]
|
|
rs := Newbids(pageType)
|
|
rs := Newbids(pageType)
|
|
@@ -296,7 +309,20 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
|
|
fileExists := p.GetString("fileExists") //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
|
|
fileExists := p.GetString("fileExists") //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
|
|
|
|
|
|
userId, _ := p.GetSession("userId").(string)
|
|
userId, _ := p.GetSession("userId").(string)
|
|
|
|
+ if bidField != "" { // 如果是领域化数据 判断是否是付费用户 是否有权限
|
|
|
|
+ vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
|
+ isPayedUser := vipStatus.IsPayedUser()
|
|
|
|
+ if !isPayedUser {
|
|
|
|
+ p.T["list"] = []map[string]interface{}{}
|
|
|
|
+ return p.Render("/pc/supsearch.html", &p.T)
|
|
|
|
+ }
|
|
|
|
+ // 是否开通过领域化权益
|
|
|
|
+ if !jy.HasBidFieldPower(config.ResourceApi.HasPowers, userId, MedicalFunctionCode) {
|
|
|
|
+ p.T["list"] = []map[string]interface{}{}
|
|
|
|
+ return p.Render("/pc/supsearch.html", &p.T)
|
|
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
//高级筛选 仅vip用户可查询
|
|
//高级筛选 仅vip用户可查询
|
|
var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
|
|
var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
|
|
var buyerclass string = "" //采购单位类别
|
|
var buyerclass string = "" //采购单位类别
|
|
@@ -431,6 +457,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
|
|
//企业画像 权限
|
|
//企业画像 权限
|
|
p.T["portraitpower"] = jylabutil.IsAuthorized(userId, "i_portraitpower")
|
|
p.T["portraitpower"] = jylabutil.IsAuthorized(userId, "i_portraitpower")
|
|
}
|
|
}
|
|
|
|
+
|
|
return p.Render("/pc/supsearch.html", &p.T)
|
|
return p.Render("/pc/supsearch.html", &p.T)
|
|
}
|
|
}
|
|
|
|
|