|
@@ -235,9 +235,20 @@ func (p *Pcsearch) GetNewBids() error {
|
|
|
pageType = domainPageType
|
|
|
}
|
|
|
userId, _ := p.GetSession("userId").(string)
|
|
|
-
|
|
|
+ baseUserId := p.GetSession("base_user_id")
|
|
|
+ vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
+ isPayedUser := vipStatus.IsPayedUser()
|
|
|
+ if !isPayedUser {
|
|
|
+ p.T["list"] = []map[string]interface{}{}
|
|
|
+ p.ServeJson(map[string]interface{}{
|
|
|
+ "list": []map[string]interface{}{},
|
|
|
+ "count": 0,
|
|
|
+ "totalPage": 0,
|
|
|
+ })
|
|
|
+ return nil
|
|
|
+ }
|
|
|
// 如果没有权限
|
|
|
- if !jy.HasBidFieldPower(config.ResourceApi.HasPowers, userId, MedicalFunctionCode) {
|
|
|
+ if !jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprintf("%v", baseUserId), MedicalFunctionCode) {
|
|
|
p.T["list"] = []map[string]interface{}{}
|
|
|
p.ServeJson(map[string]interface{}{
|
|
|
"list": []map[string]interface{}{},
|
|
@@ -309,6 +320,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
|
|
|
fileExists := p.GetString("fileExists") //是否有附件--所有用户都可用此功能 0:全部;1:有附件;-1:无附件
|
|
|
|
|
|
userId, _ := p.GetSession("userId").(string)
|
|
|
+ baseUserId := p.GetSession("base_user_id")
|
|
|
if bidField != "" { // 如果是领域化数据 判断是否是付费用户 是否有权限
|
|
|
vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
isPayedUser := vipStatus.IsPayedUser()
|
|
@@ -317,7 +329,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
|
|
|
return p.Render("/pc/supsearch.html", &p.T)
|
|
|
}
|
|
|
// 是否开通过领域化权益
|
|
|
- if !jy.HasBidFieldPower(config.ResourceApi.HasPowers, userId, MedicalFunctionCode) {
|
|
|
+ if !jy.HasBidFieldPower(config.ResourceApi.HasPowers, fmt.Sprintf("%v", baseUserId), MedicalFunctionCode) {
|
|
|
p.T["list"] = []map[string]interface{}{}
|
|
|
return p.Render("/pc/supsearch.html", &p.T)
|
|
|
|