فهرست منبع

数据导出筛选预览数据

123456 6 ماه پیش
والد
کامیت
4322bccca3
2فایلهای تغییر یافته به همراه39 افزوده شده و 0 حذف شده
  1. 14 0
      cases/pc/登录功能/数据/sievedata.py
  2. 25 0
      lib/webapi.py

+ 14 - 0
cases/pc/登录功能/数据/sievedata.py

@@ -0,0 +1,14 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = "数据导出筛选预览数据"
+    def teststeps(self):
+        INFO("测试步骤")
+        STEP(1,"第一步调用函数")
+        res = apimgr.preview_sievedata()
+        r = res.json()#用json格式返回
+        actural = r['data']['total']
+        STEP(2,"设置检查点")
+        CHECK_POINT("输入接口调用成功", actural >=1 )
+

+ 25 - 0
lib/webapi.py

@@ -1174,6 +1174,29 @@ class APIMgr():
         response = self.s.post(f"{cfg.target_host}/front/dataExport/checkMailVerify", headers = headers ,data = data)
         return  response
 
+    #数据导出筛选预览数据
+    def preview_sievedata(self):
+        headers = GSTORE["headers"]
+        data = {
+            "publishtime": "1566214955 _1660909355",
+            "area": "北京",
+            "city": "成都市",
+            "region": "成都市,北京",
+            "industry": "建筑工程_勘察设计, 建筑工程_工程施工, 建筑工程_监理咨询, 建筑工程_材料设备, 建筑工程_机电安装",
+            "buyerclass": "党委办, 财政",
+            "keyword": [{
+                "keyword": "软件",
+                "appended": [],
+                "exclude": []
+            }],
+            "selectType": "filetext, title, detail, title",
+            "minprice": "0.1",
+            "maxprice": "1000000",
+            "subtype": "中标, 成交, 废标, 流标"
+        }
+        response =self.s.post(f"{cfg.target_host}/front/dataExport/sieveData",headers = headers ,data =data)
+        return response
+
     # 修改采购单位类型设置
     def entnichenew_buyesclass_update(self):
         headers = GSTORE['headers']
@@ -1215,6 +1238,8 @@ class APIMgr():
         response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/infotype/update", headers=headers,json=json)
         return response
 
+
+
 apimgr = APIMgr()