1 2 weeks ago
parent
commit
4dbf9d74f9
2 changed files with 27 additions and 15 deletions
  1. 10 0
      common/rod_utils.go
  2. 17 15
      common/variable/sb.go

+ 10 - 0
common/rod_utils.go

@@ -640,3 +640,13 @@ func InputElementX(p *rod.Page, xPath, inputVal string) {
 func GetText(page *rod.Page, selector string) string {
 	return page.Timeout(ClickTimeOut).MustSearch(selector).MustText()
 }
+
+func WaitHasX15(page *rod.Page, xpath string) (x bool) {
+	for i := 0; i < 15; i++ {
+		x, _, _ = HasX(page, xpath)
+		if !x {
+			utils.Sleep(1)
+		}
+	}
+	return x
+}

+ 17 - 15
common/variable/sb.go

@@ -83,21 +83,23 @@ const (
 	GsRegInfo SbKey = "gsRegInfo"
 
 	// 汇算清缴
-	A000000    SbKey = "a000000"
-	A000000Gd  SbKey = "a000000Gd"
-	A100000    SbKey = "a100000"
-	A100000Fb1 SbKey = "a100000_fb1"
-	A100000Fb2 SbKey = "a100000_fb2"
-	A101010    SbKey = "a101010"
-	A102010    SbKey = "a102010"
-	A104000    SbKey = "a104000"
-	A105000    SbKey = "a105000"
-	A105050    SbKey = "a105050"
-	A105060    SbKey = "a105060"
-	A105080    SbKey = "a105080"
-	A106000    SbKey = "a106000"
-	A107010    SbKey = "a107010"
-	A107040    SbKey = "a107040"
+	A000000     SbKey = "a000000"
+	A000000Gd   SbKey = "a000000Gd"
+	A100000     SbKey = "a100000"
+	A100000Fb1  SbKey = "a100000_fb1"
+	A100000Fb2  SbKey = "a100000_fb2"
+	A101010     SbKey = "a101010"
+	A102010     SbKey = "a102010"
+	A104000     SbKey = "a104000"
+	A105000     SbKey = "a105000"
+	A105050     SbKey = "a105050"
+	A105060     SbKey = "a105060"
+	A105080     SbKey = "a105080"
+	A105080Fb28 SbKey = "a105080_fb28"
+	A105080Fb29 SbKey = "a105080_fb29"
+	A106000     SbKey = "a106000"
+	A107010     SbKey = "a107010"
+	A107040     SbKey = "a107040"
 	//财报年报
 	YearLrb   SbKey = "lrb"
 	YearXjllb SbKey = "xjllb"