wangshan 1 년 전
부모
커밋
5570b1a722
1개의 변경된 파일11개의 추가작업 그리고 9개의 파일을 삭제
  1. 11 9
      src/jfw/modules/publicapply/src/detail/util/util.go

+ 11 - 9
src/jfw/modules/publicapply/src/detail/util/util.go

@@ -167,17 +167,19 @@ func BiddingIdHandle(href string) (id, pageType string) {
 			href = strings.Split(hrefPage, "link=")[1]
 		}
 	}
-	if !strings.Contains(href, "=") {
-		_href, err := url.QueryUnescape(href)
-		if err == nil {
-			href = _href
-		}
-	}
 	if matches := regArt.FindStringSubmatch(href); len(matches) > 3 {
 		pageType = matches[2]
-		ids := encrypt.CommonDecodeArticle(pageType, matches[3])
-		if len(ids) > 0 {
-			id = ids[0]
+		if encryptionId := matches[3]; encryptionId != "" {
+			if !strings.Contains(encryptionId, "=") {
+				_encryptionId, err := url.QueryUnescape(encryptionId)
+				if err == nil {
+					encryptionId = _encryptionId
+				}
+			}
+			ids := encrypt.CommonDecodeArticle(pageType, encryptionId)
+			if len(ids) > 0 {
+				id = ids[0]
+			}
 		}
 	}
 	return