Quellcode durchsuchen

wip:查询修改

wangkaiyue vor 1 Jahr
Ursprung
Commit
542e087450
2 geänderte Dateien mit 7 neuen und 9 gelöschten Zeilen
  1. 6 8
      src/jfw/front/supsearch.go
  2. 1 1
      src/jfw/front/swordfish.go

+ 6 - 8
src/jfw/front/supsearch.go

@@ -554,15 +554,13 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 	if strings.Index(p.Refer(), "/page_workDesktop/work-bench") > -1 {
 		//超级搜索页面 移动定制搜索标签(仅工作台内展示)
 		mobileTag = p.GetSlice("mobileTag[]")
-		if len(mobileTag) > 0 { //当无该权限,把此字段置空
-			if !jy.HasBidFieldPower(config.Middleground, p.Session(), MobileTagSearchFunctionCode) {
-				mobileTag = []string{}
-			} else if mobileTag[0] == "all" {
-				mobileTag = mobileTagItemsValOptionsAll
-			}
-		} else { //默认查询标签
+		//if len(mobileTag) > 0 { //当无该权限,把此字段置空
+		if !jy.HasBidFieldPower(config.Middleground, p.Session(), MobileTagSearchFunctionCode) {
+			mobileTag = []string{}
+		} else if (len(mobileTag) > 0 && mobileTag[0] == "all") || len(mobileTag) == 0 {
 			mobileTag = mobileTagItemsValOptionsAll
 		}
+		//}
 	}
 
 	//医疗领域化信息 用户前提是大会员 超级订阅,才有领域化功能的权限
@@ -585,7 +583,7 @@ func (p *Pcsearch) PcSearchIndex(module string) error {
 		//关键词  行业 附加词
 		//放开用户不输入关键词可搜索 --P297需求
 		// p329 反爬白名单用户放开  非反爬白名单用户不放开未输入关键词
-		if len(s_word) > 0 || (len(s_word) == 0 && onList) || len(industry) > 0 || strings.TrimSpace(so.AdditionalWords) != "" {
+		if len(s_word) > 0 || (len(s_word) == 0 && onList) || len(industry) > 0 || strings.TrimSpace(so.AdditionalWords) != "" || len(so.MobileTag) > 0 {
 			if searchLimit {
 				isLimit = public.Lst.IsLimited(p.Request, p.ResponseWriter, p.Session(), isPayedUser)
 				if isLimit == 1 { //没有被限制

+ 1 - 1
src/jfw/front/swordfish.go

@@ -226,7 +226,7 @@ func (m *Front) PcAjaxReq() {
 	//放开用户不输入关键词可搜索 --P297需求
 	// p329 反爬白名单用户放开  非反爬白名单用户不放开  未输入关键词
 	//P492招标采购搜索匹配采购单位等优化--采购单位 || 中标企业 || 招标代理机构 有任何一个都可以进行搜索
-	if len(s_word) > 0 || (len(s_word) >= 0 && onList) || len(industry) > 0 || strings.TrimSpace(additionalWords) != "" || bwa {
+	if len(s_word) > 0 || (len(s_word) >= 0 && onList) || len(industry) > 0 || strings.TrimSpace(additionalWords) != "" || bwa || len(mobileTag) > 0 {
 		searchLimit := public.IsSearchLimit(queryItems)
 		//未登录用户标题、正文都限制,已登录用户只限制正文
 		if userId == "" {