Browse Source

SaveCookiesNoPhone

1 2 weeks ago
parent
commit
87dcf3ff5d
1 changed files with 12 additions and 2 deletions
  1. 12 2
      common/utils.go

+ 12 - 2
common/utils.go

@@ -32,8 +32,8 @@ type LvName string
 const (
 	CheckSuccess  LvName = "申报成功" // 检查成功 ------ 检查完全通过
 	CheckFail     LvName = "检查失败" // 检查任务失败 ----- 网页打开失败等
-	CheckOmit     LvName = "有遗漏"  // 检查有遗漏 ----- 未申报问题
-	CheckAbnormal LvName = "有异常"  //检查有异常 ----- 税款问题
+	CheckOmit     LvName = "有遗漏"   // 检查有遗漏 ----- 未申报问题
+	CheckAbnormal LvName = "有异常"   //检查有异常 ----- 税款问题
 )
 
 func GeneratePath(suffix string) string {
@@ -423,3 +423,13 @@ func CheckInput(p *rod.Page, xPath, inputVal string, name string) (errMsg string
 	}
 	return
 }
+
+func SaveCookiesNoPhone(key string) error {
+	var a interface{}
+	_ = lxhttp.PostJson(variable.SessionKeepURL+"/api/v1/session/save", map[string]interface{}{
+		"sessionKey":  key,
+		"tsessionKey": key,
+	}, &a)
+	logger.Info("SaveSessionKey:", key)
+	return nil
+}