Browse Source

Merge remote-tracking branch 'origin/feature/v1.0.0' into dev/v1.0.1

# Conflicts:
#	lib/webapi.py
lizhikun 6 months ago
parent
commit
009f4a55c5
61 changed files with 1041 additions and 113 deletions
  1. 1 1
      cases/app/登录/留资/app_new_uer_sales.py
  2. 1 1
      cases/app/登录/留资/new_uer_sales.py
  3. 16 0
      cases/app/登录/订阅/distribution_details.py
  4. 20 0
      cases/fragmentation/login_wxapi.py
  5. 16 0
      cases/fragmentation/未登录/小程序信息获取/debrisproduct_buyer_getList.py
  6. 16 0
      cases/fragmentation/未登录/小程序信息获取/debrisproduct_buyer_getSearchList.py
  7. 16 0
      cases/fragmentation/未登录/小程序信息获取/debrisproduct_getAdList.py
  8. 16 0
      cases/fragmentation/未登录/小程序信息获取/debrisproduct_getAllBusiness.py
  9. 16 0
      cases/fragmentation/未登录/小程序信息获取/debrisproduct_getAssName.py
  10. 16 0
      cases/fragmentation/未登录/小程序信息获取/debrisproduct_getPriceList.py
  11. 16 0
      cases/fragmentation/未登录/小程序信息获取/debrisproduct_getconfig.py
  12. 16 0
      cases/fragmentation/未登录/小程序信息获取/debrisproduct_location.py
  13. 8 0
      cases/fragmentation/登录/__st__.py
  14. 16 0
      cases/fragmentation/登录/情报/information_buzzword.py
  15. 16 0
      cases/fragmentation/登录/情报/information_details.py
  16. 16 0
      cases/fragmentation/登录/情报/information_search.py
  17. 16 0
      cases/fragmentation/登录/情报/information_subscription.py
  18. 28 0
      cases/fragmentation/登录/我的/debrisproduct_orderDetail.py
  19. 28 0
      cases/fragmentation/登录/我的/debrisproduct_orderList.py
  20. 16 0
      cases/fragmentation/登录/我的/myuser_information.py
  21. 16 0
      cases/fragmentation/登录/搜索/bidding_project_search.py
  22. 16 0
      cases/fragmentation/登录/搜索/purchase_intention_search.py
  23. 16 0
      cases/fragmentation/登录/监控/monitor_list.py
  24. 16 0
      cases/fragmentation/登录/监控/monitor_operate.py
  25. 16 0
      cases/fragmentation/登录/订阅/purchase_intention_subscription.py
  26. 16 0
      cases/fragmentation/登录/订阅/subscription_query.py
  27. 16 0
      cases/fragmentation/登录/订阅/subscription_region_modification.py
  28. 16 0
      cases/fragmentation/登录/订阅/subscription_service_type_changes.py
  29. 16 0
      cases/fragmentation/登录/订阅/tender_subscription.py
  30. 16 0
      cases/fragmentation/登录/详情/detail_page_information.py
  31. 16 0
      cases/fragmentation/登录/详情/detailed_information.py
  32. 16 0
      cases/fragmentation/登录/详情/purchasing_analysis.py
  33. 1 1
      cases/pc/未登录功能/三级页/nologin_proposed_construction_content.py
  34. 1 1
      cases/pc/登录功能/定制化分析报告/behavior_acquisition.py
  35. 1 1
      cases/pc/登录功能/定制化分析报告/reports_advanced_projects.py
  36. 1 1
      cases/pc/登录功能/密码校验/password_check.py
  37. 1 1
      cases/pc/登录功能/投标决策分析/bidding_decision_analysis_content.py
  38. 1 1
      cases/pc/登录功能/投标决策分析/buyer_name_lenovo.py
  39. 1 1
      cases/pc/登录功能/投标决策分析/project_name_lenovo.py
  40. 1 1
      cases/pc/登录功能/搜索功能/bidsearch.py
  41. 1 1
      cases/pc/登录功能/搜索功能/buyersearch.py
  42. 1 1
      cases/pc/登录功能/搜索功能/enterpriseSearch.py
  43. 1 1
      cases/pc/登录功能/搜索功能/rc_search.py
  44. 1 1
      cases/pc/登录功能/搜索功能/supplySearch.py
  45. 16 0
      cases/pc/登录功能/机构中心/add_personnel.py
  46. 17 0
      cases/pc/登录功能/机构中心/enterprise_information.py
  47. 16 0
      cases/pc/登录功能/机构中心/subdepartment.py
  48. 1 1
      cases/pc/登录功能/消息中心/messagelist.py
  49. 1 1
      cases/pc/登录功能/用户中台/actionMode_commonlyList.py
  50. 1 1
      cases/pc/登录功能/用户信息获取/authorised_info.py
  51. 1 1
      cases/pc/登录功能/留资/sample_report_information.py
  52. 1 1
      cases/pc/登录功能/监控/new_project_attention.py
  53. 1 1
      cases/pc/登录功能/监控/project_screenarea.py
  54. 17 0
      cases/pc/登录功能/订阅/distribution_list.py
  55. 17 0
      cases/pc/登录功能/订阅/distribution_update.py
  56. 1 1
      cases/pc/登录功能/身份信息获取/Identity_list.py
  57. 1 1
      cases/pc/登录功能/身份信息获取/Identity_switch.py
  58. 1 0
      cfg/cfg.py
  59. 33 90
      doc/zbsousuo.py
  60. 115 1
      lib/webapi.py
  61. 287 0
      lib/wxapi.py

+ 1 - 1
cases/app/登录/留资/app_new_uer_sales.py

@@ -15,4 +15,4 @@ class c1:
         # # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户中台接口是否正常',  code==200)
+        CHECK_POINT('检查app新用户报表提交接口是否正常',  code==200)

+ 1 - 1
cases/app/登录/留资/new_uer_sales.py

@@ -13,4 +13,4 @@ class c1:
         # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户中台接口是否正常',  actural == 0)
+        CHECK_POINT('检查获取新用户留资报表接口是否正常',  actural == 0)

+ 16 - 0
cases/app/登录/订阅/distribution_details.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='商机管理分发规则详情'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.distribution_details()
+        res = r.json()
+        actural  = res['error_code']
+        actural1 = res['data']['persons'][0]['id']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查商机管理分发规则详情接口是否正常',actural ==0 and actural1 ==96208)

+ 20 - 0
cases/fragmentation/login_wxapi.py

@@ -0,0 +1,20 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='小程序登录接口验证'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'打印接口返回值')    #会出现在测试报告中
+        r = apimgr.mgr_login_wxapi()
+        res = r.json()
+        INFO(res)
+        actural = res['data']['status']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查小程序登录接口是否正常',actural == 1)
+    #清除方法
+    def teardown(self):
+        INFO('用户退出app')
+        apimgr.mgr_logout_wxapi()

+ 16 - 0
cases/fragmentation/未登录/小程序信息获取/debrisproduct_buyer_getList.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '业主单位列表'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.debrisproduct_getAssName()
+        r = res.json()
+        INFO(r)
+
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查业主单位列表接口是否正常',actural1 == 0)

+ 16 - 0
cases/fragmentation/未登录/小程序信息获取/debrisproduct_buyer_getSearchList.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '业主搜索历史'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.debrisproduct_buyer_getSearchList()
+        r = res.json()
+        INFO(r)
+
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查业主搜索历史接口是否正常',actural1 == 0)

+ 16 - 0
cases/fragmentation/未登录/小程序信息获取/debrisproduct_getAdList.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '获取小程序广告位'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.debrisproduct_getAdList()
+        r = res.json()
+        INFO(r)
+
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查广告位是否正常',actural1 == 0)

+ 16 - 0
cases/fragmentation/未登录/小程序信息获取/debrisproduct_getAllBusiness.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '所有商机获取'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.debrisproduct_getAllBusiness()
+        r = res.json()
+        INFO(r)
+
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查获取商机接口是否正常',actural1 == 0)

+ 16 - 0
cases/fragmentation/未登录/小程序信息获取/debrisproduct_getAssName.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '业主单位名称联想'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.debrisproduct_getAssName()
+        r = res.json()
+        INFO(r)
+
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查业主单位名称联想接口是否正常',actural1 == 0)

+ 16 - 0
cases/fragmentation/未登录/小程序信息获取/debrisproduct_getPriceList.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '获取产品价格'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.debrisproduct_getPriceList()
+        r = res.json()
+        INFO(r)
+
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查获取产品价格接口是否正常',actural1 == 0)

+ 16 - 0
cases/fragmentation/未登录/小程序信息获取/debrisproduct_getconfig.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '获取小程序配置'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.debrisproduct_getLocation()
+        r = res.json()
+        INFO(r)
+
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查获取小程序配置接口是否正常',actural1 == 0)

+ 16 - 0
cases/fragmentation/未登录/小程序信息获取/debrisproduct_location.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '获取地理位置'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.debrisproduct_getLocation()
+        r = res.json()
+        INFO(r)
+
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查获取位置接口是否正常',actural1 == 0)

+ 8 - 0
cases/fragmentation/登录/__st__.py

@@ -0,0 +1,8 @@
+from hytest import *
+from lib.wxapi import apimgr
+def suite_setup():
+    INFO('用户登录')
+    apimgr.mgr_login_wxapi()
+def suite_teardown():
+    INFO('用户退出')
+    apimgr.mgr_logout_wxapi()

+ 16 - 0
cases/fragmentation/登录/情报/information_buzzword.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='情报热词'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.information_buzzword()
+        r = res.json()
+        INFO(r)
+        actural = r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查情报热词接口是否正常', actural == 0)

+ 16 - 0
cases/fragmentation/登录/情报/information_details.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='情报详情'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.information_details()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['id']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查情报详情接口是否正常', actural == "61cbb70345a326c6c34a5e0e")

+ 16 - 0
cases/fragmentation/登录/情报/information_search.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='情报列表/搜索-搜索'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.information_search()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查情报列表/搜索接口是否正常', actural >= 0)

+ 16 - 0
cases/fragmentation/登录/情报/information_subscription.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='情报列表/搜索-订阅'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.information_subscription()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查情报列表/搜索-订阅接口是否正常', actural >= 0)

+ 28 - 0
cases/fragmentation/登录/我的/debrisproduct_orderDetail.py

@@ -0,0 +1,28 @@
+from hytest import *
+from lib.wxapi import apimgr
+
+class c1:
+    name = '获取订单详情'
+
+    def teststeps(self):
+        INFO('测试步骤')
+
+        # STEP 1: 调用获取订单详情接口
+        STEP(1, '调用获取订单详情接口')
+        try:
+            # 确保传递正确的 orderCode 参数
+            orderCode = '262059625763'  # 你可以替换为实际的订单号
+            res = apimgr.debrisproduct_orderDetail(orderCode=orderCode)  # 调用接口并传递参数
+            r = res.json()  # 解析返回的 JSON
+            INFO(f"返回数据: {r}")  # 打印返回数据,帮助调试
+
+        except Exception as e:
+            INFO(f'获取订单详情失败: {e}')  # 打印异常信息
+            raise
+
+        # STEP 2: 设置检查点
+        STEP(2, '设置检查点')
+        # 获取 error_code,默认值为 -1,防止没有该字段时报错
+        actual_error_code = r.get('error_code', -1)
+        CHECK_POINT('检查获取订单详情接口是否正常', actual_error_code == 0)
+

+ 28 - 0
cases/fragmentation/登录/我的/debrisproduct_orderList.py

@@ -0,0 +1,28 @@
+from hytest import *
+from lib.wxapi import apimgr
+
+class c1:
+    name = '获取订单列表'
+
+    def teststeps(self):
+        INFO('测试步骤')
+
+        # STEP 1: 调用获取订单详情接口
+        STEP(1, '调用获取订单列表接口')
+        try:
+            # 确保传递正确的 orderCode 参数
+            orderCode = '262059625763'  # 你可以替换为实际的订单号
+            res = apimgr.debrisproduct_orderDetail(orderCode=orderCode)  # 调用接口并传递参数
+            r = res.json()  # 解析返回的 JSON
+            INFO(f"返回数据: {r}")  # 打印返回数据,帮助调试
+
+        except Exception as e:
+            INFO(f'获取订单详情失败: {e}')  # 打印异常信息
+            raise
+
+        # STEP 2: 设置检查点
+        STEP(2, '设置检查点')
+        # 获取 error_code,默认值为 -1,防止没有该字段时报错
+        actual_error_code = r.get('error_code', -1)
+        CHECK_POINT('检查获取订单列表接口是否正常', actual_error_code == 0)
+

+ 16 - 0
cases/fragmentation/登录/我的/myuser_information.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='我的用户信息'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'打印接口返回值')    #会出现在测试报告中
+        r = apimgr.myuser_information()
+        res = r.json()
+        INFO(res)
+        actural = res['error_code']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查我的用户信息接口是否正常',actural == 0)

+ 16 - 0
cases/fragmentation/登录/搜索/bidding_project_search.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='招标项目搜索-搜索入口'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.bidding_project_search()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查招标项目搜索-搜索入口接口是否正常', actural >= 0)

+ 16 - 0
cases/fragmentation/登录/搜索/purchase_intention_search.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='采购意向搜索-搜索入口'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.purchase_intention_search()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查采购意向搜索-搜索入口接口是否正常', actural >= 0)

+ 16 - 0
cases/fragmentation/登录/监控/monitor_list.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='监控列表'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.monitor_list()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['count']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查监控列表接口是否正常', actural >= 0)

+ 16 - 0
cases/fragmentation/登录/监控/monitor_operate.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='监控操作'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.monitor_operate()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['status']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查监控操作接口是否正常', actural >= 0)

+ 16 - 0
cases/fragmentation/登录/订阅/purchase_intention_subscription.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='采购意向搜索-订阅入口'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.purchase_intention_subscription()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查采购意向搜索-订阅入口接口是否正常', actural >= 0)

+ 16 - 0
cases/fragmentation/登录/订阅/subscription_query.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='订阅查询'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.subscription_query()
+        r = res.json()
+        INFO(r)
+        actural = r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查订阅查询接口是否正常', actural == 0)

+ 16 - 0
cases/fragmentation/登录/订阅/subscription_region_modification.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='订阅区域修改'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.subscription_region_modification()
+        r = res.json()
+        INFO(r)
+        actural = r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查订阅区域修改接口是否正常', actural == 0)

+ 16 - 0
cases/fragmentation/登录/订阅/subscription_service_type_changes.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='订阅业务类型修改'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.subscription_service_type_changes()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['status']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查订阅业务类型修改接口是否正常', actural == 1)

+ 16 - 0
cases/fragmentation/登录/订阅/tender_subscription.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='招标项目搜索-订阅入口'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.tender_subscription()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查招标项目搜索-订阅入口接口是否正常', actural >= 0)

+ 16 - 0
cases/fragmentation/登录/详情/detail_page_information.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='详情页信息'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.detail_page_information()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['ErrorCode']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查详情页信息接口是否正常', actural == 0)

+ 16 - 0
cases/fragmentation/登录/详情/detailed_information.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='详情页信息-投标'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.detailed_information()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['ErrorCode']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查详情页信息-投标接口是否正常', actural == 0)

+ 16 - 0
cases/fragmentation/登录/详情/purchasing_analysis.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+
+class c1:
+    name = '采购单位分析'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.purchasing_analysis()
+        r = res.json()
+        INFO(r)
+        actural=r['error_code']
+        # INFO(length)
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查采购单位分析接口是否正常',  actural == 0)

+ 1 - 1
cases/pc/未登录功能/三级页/nologin_proposed_construction_content.py

@@ -14,4 +14,4 @@ class c1:
         actural = r['data']
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查数据导出接口是否正常', len(actural) >1)
+        CHECK_POINT('检查未登录拟在建详情页接口是否正常', len(actural) >1)

+ 1 - 1
cases/pc/登录功能/定制化分析报告/behavior_acquisition.py

@@ -13,4 +13,4 @@ class c1:
         # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户中台接口是否正常',  actural == 0 )
+        CHECK_POINT('检查行为采集接口是否正常',  actural == 0 )

+ 1 - 1
cases/pc/登录功能/定制化分析报告/reports_advanced_projects.py

@@ -13,4 +13,4 @@ class c1:
         # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户中台接口是否正常',  actural == 0)
+        CHECK_POINT('检查定制化分析报告_超前项目接口是否正常',  actural == 0)

+ 1 - 1
cases/pc/登录功能/密码校验/password_check.py

@@ -13,4 +13,4 @@ class c1:
         actural1=r['error_code']
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户信息',actural1 == 0)
+        CHECK_POINT('检查密码检查接口是否正常',actural1 == 0)

+ 1 - 1
cases/pc/登录功能/投标决策分析/bidding_decision_analysis_content.py

@@ -13,4 +13,4 @@ class c1:
         # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户中台接口是否正常',  actural == 1004 )
+        CHECK_POINT('检查投标决策分析内容接口是否正常',  actural == 1004 )

+ 1 - 1
cases/pc/登录功能/投标决策分析/buyer_name_lenovo.py

@@ -13,4 +13,4 @@ class c1:
         # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户中台接口是否正常',  actural == 0 )
+        CHECK_POINT('检查采购单位名称联想接口是否正常',  actural == 0 )

+ 1 - 1
cases/pc/登录功能/投标决策分析/project_name_lenovo.py

@@ -13,4 +13,4 @@ class c1:
         # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户中台接口是否正常',  actural == 0 )
+        CHECK_POINT('检查项目名称联想接口是否正常',  actural == 0 )

+ 1 - 1
cases/pc/登录功能/搜索功能/bidsearch.py

@@ -12,4 +12,4 @@ class c2:
         INFO(res)
         STEP(2,'第二步设置检查点')
         #设置检查点
-        CHECK_POINT('检查搜索接口是否正常',code == 200)
+        CHECK_POINT('检查招标搜索接口是否正常',code == 200)

+ 1 - 1
cases/pc/登录功能/搜索功能/buyersearch.py

@@ -13,4 +13,4 @@ class c5:
         error_code = response_data["error_code"]
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查搜索接口是否正常', error_code == 0)
+        CHECK_POINT('检查采购单位搜索接口是否正常', error_code == 0)

+ 1 - 1
cases/pc/登录功能/搜索功能/enterpriseSearch.py

@@ -20,4 +20,4 @@ class c3:
 
         STEP(2,'第二步设置检查点')
         #设置检查点
-        CHECK_POINT('检查登录接口是否正常',textactual_legal_person == '田小亮')
+        CHECK_POINT('检查企业搜索接口是否正常',textactual_legal_person == '田小亮')

+ 1 - 1
cases/pc/登录功能/搜索功能/rc_search.py

@@ -15,4 +15,4 @@ class c6:
         count = response_data["data"]["count"]
         STEP(2,'第二步设置检查点')
         #设置检查点
-        CHECK_POINT('检查搜索接口是否正常',count > 0)
+        CHECK_POINT('检查融创用户招标搜索接口是否正常',count > 0)

+ 1 - 1
cases/pc/登录功能/搜索功能/supplySearch.py

@@ -13,4 +13,4 @@ class c4:
         res = json.loads(r.content.decode('utf-8'))
         STEP(2,'第二步设置检查点')
         #设置检查点
-        CHECK_POINT('检查搜索接口是否正常',res['data']['ckeys'] == 'PH计')
+        CHECK_POINT('检查供应搜索接口是否正常',res['data']['ckeys'] == 'PH计')

+ 16 - 0
cases/pc/登录功能/机构中心/add_personnel.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+import json
+
+class c1:
+    name = '添加人员'
+
+    def teststeps(self):
+        INFO('初始化方法')
+        STEP(1, '第一步调用函数')
+        res = apimgr.add_personnel()
+        resp = res.json()
+        error_code = resp['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查添加人员接口是否正常', error_code==0)

+ 17 - 0
cases/pc/登录功能/机构中心/enterprise_information.py

@@ -0,0 +1,17 @@
+from hytest import *
+from lib.webapi import apimgr
+import json
+
+class c1:
+    name = '企业信息'
+
+    def teststeps(self):
+        INFO('初始化方法')
+        STEP(1, '第一步调用函数')
+        res = apimgr.enterprise_information()
+        resp = res.json()
+        error_code = resp['error_code']
+        actural = resp['data']['admin_system']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查企业信息接口是否正常', error_code==0 and actural==False)

+ 16 - 0
cases/pc/登录功能/机构中心/subdepartment.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+import json
+
+class c1:
+    name = '子部门'
+
+    def teststeps(self):
+        INFO('初始化方法')
+        STEP(1, '第一步调用函数')
+        res = apimgr.subdepartment()
+        resp = res.json()
+        error_code = resp['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查企业子部门接口是否正常', error_code==0)

+ 1 - 1
cases/pc/登录功能/消息中心/messagelist.py

@@ -13,6 +13,6 @@ class c1:
         error_code = resp['code']
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查推送记录接口是否正常', error_code==0)
+        CHECK_POINT('检查消息中心列表接口是否正常', error_code==0)
     def teardown(self):
         INFO('清除方法')

+ 1 - 1
cases/pc/登录功能/用户中台/actionMode_commonlyList.py

@@ -13,4 +13,4 @@ class c1:
         # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户中台接口是否正常',  actural == 0)
+        CHECK_POINT('检查常用功能列表获取接口是否正常',  actural == 0)

+ 1 - 1
cases/pc/登录功能/用户信息获取/authorised_info.py

@@ -13,4 +13,4 @@ class c1:
         # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查权益中台是否正常',  actural == 0)
+        CHECK_POINT('检查功能是否授权是否正常',  actural == 0)

+ 1 - 1
cases/pc/登录功能/留资/sample_report_information.py

@@ -13,4 +13,4 @@ class c1:
         # INFO(length)
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户中台接口是否正常',  actural == 0 )
+        CHECK_POINT('检查获取样例报告信息接口是否正常',  actural == 0 )

+ 1 - 1
cases/pc/登录功能/监控/new_project_attention.py

@@ -14,4 +14,4 @@ class c1:
         error_code = response_data["error_code"]
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查数据导出接口是否正常', error_code == -1 )
+        CHECK_POINT('检查新增项目关注接口是否正常', error_code == -1 )

+ 1 - 1
cases/pc/登录功能/监控/project_screenarea.py

@@ -13,4 +13,4 @@ class c1:
         actural=r['error_code']
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查数据导出接口是否正常', actural == 0 )
+        CHECK_POINT('检查关注项目地区筛选接口是否正常', actural == 0 )

+ 17 - 0
cases/pc/登录功能/订阅/distribution_list.py

@@ -0,0 +1,17 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='商机管理分发设置列表'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.distribution_list()
+        res = r.json()
+        #INFO(res)
+        actural  = res['error_code']
+        actural1 = res['data']['subdis']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查商机管理分发设置列表是否正常',actural ==0 and actural1 ==0)

+ 17 - 0
cases/pc/登录功能/订阅/distribution_update.py

@@ -0,0 +1,17 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='商机管理分发规则修改'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.distribution_update()
+        res = r.json()
+        #INFO(res)
+        actural  = res['error_code']
+        actural1 = res['data']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查商机管理分发规则修改接口是否正常',actural ==0 and actural1 ==1)

+ 1 - 1
cases/pc/登录功能/身份信息获取/Identity_list.py

@@ -11,4 +11,4 @@ class c1:
         actural1=r['error_code']
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户信息',actural1 == 0)
+        CHECK_POINT('检查身份信息获取接口是否正常',actural1 == 0)

+ 1 - 1
cases/pc/登录功能/身份信息获取/Identity_switch.py

@@ -13,4 +13,4 @@ class c1:
         actural1=r['data']
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查用户信息',actural1 == 1)
+        CHECK_POINT('检查身份信息切换接口是否正常',actural1 == 1)

+ 1 - 0
cfg/cfg.py

@@ -1,3 +1,4 @@
 target_host = 'https://www.jianyu360.cn'
 target_host_app = 'https://app-a1.jianyu360.cn'
 target_host_api = 'https://api.jianyu360.com'
+target_host_wxapi = 'https://jy-applet.jianyu360.cn'

+ 33 - 90
doc/zbsousuo.py

@@ -1,90 +1,33 @@
-import json
-
-import requests
-
-headers1 = {
-    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67"
-}
-
-url = "https://www.jianyu360.cn/phone/login"
-data={
-"reqType": "phoneLogin",
-"isAutoLogin": "false",
-"phone": "18211989987",
-"password": "123456"
-}
-res = requests.post(url=url,headers=headers1,data=data)
-print(res)
-assert res.status_code==200
-assert res.json()["status"] == 1
-assert res.json()["userInfo"]["result"] == "ok"
-assert res.json()["userInfo"]["s_nickname"] == "182****9987"
-cookies=res.cookies
-# print(cookies)
-# print(res.status_code)
-print(res.json())
-cookie_dict = cookies.get_dict()
-session_id = cookie_dict.get("SESSIONID")
-headers = {
-"Content-Type": "application/json",
-"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67",
-    "Cookie": f"SESSIONID={session_id}"
-}
-# print(headers)
-# url = "https://www.jianyu360.cn/jylab/supsearch/index.html"
-# data={
-# "keywords": "建筑",
-# "publishtime": "fiveyear",
-# "selectType": "content"
-# }
-
-# response = requests.post(url=url, headers=headers,data=data)
-# text=response.text
-# print(text)
-# response_text = response.text  # 假设 response 是请求的响应对象,将响应体保存在 response_text 变量中
-
-# 提取 keys 的值
-# keys_value = response_text.split('var keys = "', 1)[-1].split('"', 1)[0]
-
-# 断言 keys 等于 "建筑"
-# assert keys_value == "建筑"
-# url3="https://www.jianyu360.cn/succbi/api/dw/services/queryData"
-# data={"query":
-#           {"resid":"rk6LnRZndKIcnSYLtlpwVG","fields":[{"name":"XMLBDMHZ"}],"sources":"null","filter":[],"params":
-#               [{"name":"searchinput3","value":"科技"}],"sort":[],"options":
-#               {"limit":1,"offset":0,"needResultFilter":"true","queryTotalRowCount":"false"},"queryId":"model6"},
-#                 "resid":"rk6LnRZndKIcnSYLtlpwVG"}
-# rseb=requests.post(url=url,data=data,headers=headers)
-# print(rseb.text)
-# url="https://www.jianyu360.cn/publicapply/enterpriseSearch/doQuery"
-# data={
-# "match": "北京剑鱼信息技术有限公司河南分公司",
-# "matchType": "A",
-# "pageSize": "10",
-# "pageNum": "0"
-# }
-# qq=requests.post(url=url,data=data,headers=headers)
-# print(qq.text)
-
-url2 = "https://www.jianyu360.cn/jyapi/jybx/buyer/eType/buyerList"
-data = {
-    "buyerName": "万达信息股份有限公司",
-    "province": [],
-    "city": [],
-    "buyerClass": [],
-    "isCheckFollow": True,
-    "isCheckReceive": True,
-    "isContact": 0,
-    "pageSize": 10,
-    "pageNum": 1
-}
-
-response = requests.post(url=url2, data=json.dumps(data), headers=headers)
-
-
-print(response.text)
-url3="https://www.jianyu360.cn/jyinfo/supplySearch"
-data={"keywords":"PH计","searchType":"title","province":"","city":"","time":"","status":"0","pageSize":50,"pageIndex":1}
-resa=requests.post(url=url3,headers=headers,data=json.dumps(data))
-res = json.loads(resa.content.decode('utf-8'))
-assert res['data']['ckeys'] == 'PH计'
+from hytest import *
+from lib.webapi import apimgr
+
+
+class c1:
+    name = '我的'
+
+    def teststeps(self):
+        INFO('测试步骤')
+
+        # STEP 1: 调用小程序登录接口,获取 cookies
+        STEP(1, '调用小程序登录接口获取 cookies')
+        try:
+            apimgr.mgr_get_cookie(phone='15037870765', token='8817684142977367381')
+            INFO('Cookies 获取成功')
+        except Exception as e:
+            INFO(f'获取 Cookies 失败: {e}')
+            raise
+
+        # STEP 2: 调用获取订单详情接口
+        STEP(2, '调用获取订单详情接口')
+        try:
+            res = apimgr.debrisproduct_orderDetail(order_id='12345')
+            r = res.json()
+            INFO(r)
+        except Exception as e:
+            INFO(f'调用订单详情接口失败: {e}')
+            raise
+
+        # STEP 3: 设置检查点
+        STEP(3, '设置检查点')
+        actual_error_code = r.get('error_code')
+        CHECK_POINT('检查获取订单详情接口是否正常', actual_error_code == 0)

+ 115 - 1
lib/webapi.py

@@ -42,9 +42,15 @@ class APIMgr():
     headers = {
         "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67;jy-test"
     }
-
+    # 定义第二个 headers
+    headers_1 = {
+        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.67;jy-test",
+        "Content-Type":"application/json",
+        "MiniprogramCode":"wy_zbxm"
+    }
     #headers设置为全局变量
     GSTORE['headers'] = headers
+    GSTORE['headers_1'] = headers_1
     # session对象设置为全局变量
     s = requests.Session()
     GSTORE['s'] = s
@@ -1267,6 +1273,114 @@ class APIMgr():
         }
         response = self.s.get(f"{cfg.target_host}/front/project/nzj/details", headers=headers,params=params)
         return response
+    #获取小程序广告位
+    def debrisproduct_getAdList(self):
+        headers_1 = GSTORE['headers_1']
+        response = self.s.post(f"{cfg.target_host_wxapi}/debrisproduct/free/getAdList", headers=headers_1,data={"Code":"jy-appsearch-home-top"})
+        return response
+    #获取地理位置
+    def debrisproduct_getLocation(self):
+        headers_1 = GSTORE['headers_1']
+        response = self.s.get(f"{cfg.target_host_wxapi}/debrisproduct/free/location", headers=headers_1)
+        return response
+    #所有商机获取
+    def debrisproduct_getAllBusiness(self):
+        headers_1 = GSTORE['headers_1']
+        response = self.s.post(f"{cfg.target_host_wxapi}/debrisproduct/free/getAllBusiness", headers=headers_1)
+        return response
+    #获取小程序配置
+    def debrisproduct_getConfig(self):
+        headers_1 = GSTORE['headers_1']
+        response = self.s.post(f"{cfg.target_host_wxapi}/debrisproduct/free/getSetting", headers=headers_1)
+        return response
+    #业主单位名称联想
+    def debrisproduct_getAssName(self):
+        headers_1 = GSTORE['headers_1']
+        response = self.s.post(f"{cfg.target_host_wxapi}/debrisproduct/buyer/getAssName", headers=headers_1,data={"buyerName":"科技"})
+        return response
+    #业主单位列表
+    def debrisproduct_getList(self):
+        headers_1 = GSTORE['headers_1']
+        response = self.s.post(f"{cfg.target_host_wxapi}/debrisproduct/buyer/getList", headers=headers_1,data={"page_num":10,"pagesize":1})
+        return response
+    #业主搜索历史
+    def debrisproduct_buyer_getSearchList(self):
+        headers_1 = GSTORE['headers_1']
+        response = self.s.post(f"{cfg.target_host_wxapi}/debrisproduct/buyer/getSearchList", headers=headers_1)
+        return response
+    #获取价格列表
+    def debrisproduct_getPriceList(self):
+        headers_1 = GSTORE['headers_1']
+        response = self.s.post(f"{cfg.target_host_wxapi}/debrisproduct/getPriceList", headers=headers_1)
+        return response
+
+    """子部门"""
+    def subdepartment(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        data = {
+            "id":26741
+        }
+        response = s.post(f"{cfg.target_host}/entbase/department/childrens", headers=hearders, data=data)
+        return response
+
+    """添加人员"""
+    def add_personnel(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        data = {
+            "name":"贾路瑶",
+            "phone":"19588533063",
+            "id":26741
+        }
+        response = s.post(f"{cfg.target_host}/entbase/person/add", headers=hearders, data=data)
+        return response
+
+    """企业信息"""
+    def enterprise_information(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        params= {
+            "t":"1736561573400"
+        }
+        response = s.get(f"{cfg.target_host}/entbase/ent/entinfo", headers=hearders, params=params)
+        return response
+
+    """分发设置列表接口"""
+    def distribution_list(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        data= {
+            "identity":"ent"
+        }
+        response = s.get(f"{cfg.target_host}/entnicheNew/distribute/list", headers=hearders, data=data)
+        return response
+
+    """分发规则修改接口"""
+    def distribution_update(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json= {
+            "id": "67820b98e7364a57c3b7eaf5",
+            "buyerclass": ["财政"],
+            "items": ["测试分组"],
+            "persons": [96208],
+            "area": {"安徽": []},
+            "district": {},
+            "identity": "ent"
+        }
+        response = s.get(f"{cfg.target_host}/entnicheNew/distribute/update", headers=hearders, json=json)
+        return response
+
+    """分发规则详情接口"""
+    def distribution_details(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        data= {
+            "identity": "ent"
+        }
+        response = s.get(f"{cfg.target_host_app}/entnicheNew/distribute/detail?id=67820b98e7364a57c3b7eaf5", headers=hearders, data=data)
+        return response
 
 apimgr = APIMgr()
 

+ 287 - 0
lib/wxapi.py

@@ -0,0 +1,287 @@
+import json
+import requests
+from hytest.common import *
+from cfg import cfg
+from bs4 import BeautifulSoup
+from requests.packages import urllib3
+
+#存放公用方法
+# 存储 全局共享 数据
+GSTORE = {}
+class APIMgr():
+    #打印https请求与消息
+    def __init__(self):
+        self.ui = None
+        self.token = None
+
+    def printRequest(self,req):
+        if req.body==None:
+            msgBody=''
+        else:
+            msgBody=req.body
+        self.ui.outputWindow.append(
+            '{}\n{}\n{}\n\n{}'.format(
+                '\n\n-------发送请求--------',
+                req.method+''+req.url,
+                '\n'.join('{}:{}'.format(k,v) for k,v in req.headers.items()),
+                msgBody,
+            ))
+
+    # 打印http相应消息的函数
+    def printResponse(self, response):
+        print('\n\n----- https response begin    -----')
+        print(response.status_code)
+        # print(response.headers)
+        for k, v in response.headers.items():
+            print(f'{k}:{v}')
+
+        print(response.content.decode('utf8'))
+        print('----- https response end-----\n\n')
+
+
+    headers = {
+        'Accept-Charset':'utf-8',
+        'Accept':'*/*',
+        'Accept-Encoding':'gzip, deflate, br',
+        'User-Agent':'Apifox/1.0.0 (https://apifox.com)',
+        'Content-Type':'application/json',
+         'MiniprogramCode':'wy_zbxm'
+    }
+
+    #headers设置为全局变量
+    GSTORE['headers'] = headers
+    # session对象设置为全局变量
+    s = requests.Session()
+    GSTORE['s'] = s
+
+    # 小程序登录接口
+    def mgr_login_wxapi(self, useproxies=False):
+        headers=GSTORE['headers']
+        s = GSTORE['s']
+        if useproxies:
+            self.s.proxies.update({'http':'127.0.0.1:8888'})
+        response = self.s.post(f"{cfg.target_host_wxapi}/debrisproduct/free/autologin",headers=headers,json=
+                                    {
+                                     'phone':'15037870765',
+                                     'token':'8817684142977367381'
+                                    })
+        self.printResponse(response)
+        # 把response对象返回出去
+        return response
+
+    """退出登录小程序"""
+    def mgr_logout_wxapi(self):
+        url = f"{cfg.target_host_wxapi}/debrisproduct/logout"
+        headers = GSTORE['headers']
+        s = GSTORE['s']
+        s.post(url=url, headers=headers)
+
+    """我的用户信息"""
+    def myuser_information(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/myinfo", headers=hearders)
+        return response
+
+    """招标项目搜索-搜索入口"""
+    def bidding_project_search(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "area": "河南",
+            "propertyForm": "医院",
+            "OwnerType": "医疗单位",
+            "Page": 1,
+            "PageSize": 1,
+            "KeyWords": "物业"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/search/bidList", headers=hearders, json=json)
+        return response
+
+    """采购意向搜索-搜索入口"""
+    def purchase_intention_search(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "area": "安徽",
+            "propertyForm": "学校",
+            "OwnerType": "教育单位",
+            "Page": 1,
+            "PageSize": 1,
+            "KeyWords": "数据"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/search/buyPurposeList", headers=hearders, json=json)
+        return response
+
+    """招标项目搜索-订阅入口"""
+    def tender_subscription(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "area": "河南",
+            "propertyForm": "医院",
+            "OwnerType": "医疗单位",
+            "Page": 1,
+            "PageSize": 1,
+            "KeyWords": "物业"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/search/bidSubscribeList", headers=hearders, json=json)
+        return response
+
+    """采购意向搜索-订阅入口"""
+    def purchase_intention_subscription(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "area": "安徽",
+            "propertyForm": "学校",
+            "OwnerType": "教育单位",
+            "Page": 1,
+            "PageSize": 1,
+            "KeyWords": "数据"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/search/buyPurposeSubscribeList", headers=hearders, json=json)
+        return response
+
+    """情报热词"""
+    def information_buzzword(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        response = s.get(f"{cfg.target_host_wxapi}/debrisproduct/info/getHotInfo", headers=hearders)
+        return response
+
+    """情报列表/搜索-搜索"""
+    def information_search(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "page_size": 1,
+            "page_num": 1,
+            "keyWords": "科技"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/info/getInfoList", headers=hearders, json=json)
+        return response
+
+    """情报列表/搜索-订阅"""
+    def information_subscription(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "page_size": 1,
+            "page_num": 1,
+            "keyWords": "科技"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/info/subscribeList", headers=hearders, json=json)
+        return response
+
+    """监控列表"""
+    def monitor_list(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "Size": 1,
+            "Page": 1
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/monitorList", headers=hearders, json=json)
+        return response
+
+    """监控操作"""
+    def monitor_operate(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "CompanyName":"东莞市中医院",
+            "OperateType":1
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/monitorOperate", headers=hearders, json=json)
+        return response
+
+    """详情页信息-投标"""
+    def detailed_information(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json = {
+            "_id": "ABCY1xZcDIvJyssAlV1cHU8CicoEjRjYWR1Pw4jIy4wc3xzfTNUCec%3D"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/getBiddingDetail", headers=hearders, json=json)
+        return response
+
+    #获取订单详情
+    def debrisproduct_orderDetail(self, orderCode):
+        headers = GSTORE['headers']
+        s = GSTORE['s']  # 从全局变量中获取 cookie
+        INFO(f"使用的 cookies: {s}")  # 打印 cookie,确保它正确
+        response = s.post(
+            f"{cfg.target_host_wxapi}/debrisproduct/orderDetail",
+            headers=headers,
+            data={"orderCode": orderCode}
+        )
+        return response
+    #获取订单列表
+    def debrisproduct_orderList(self, orderCode):
+        headers = GSTORE['headers']
+        s = GSTORE['s']  # 从全局变量中获取 cookie
+        INFO(f"使用的 cookies: {s}")  # 打印 cookie,确保它正确
+        response = s.post(
+            f"{cfg.target_host_wxapi}/debrisproduct/orderList",
+            headers=headers,
+            data={"orderCode": orderCode}
+        )
+
+    """情报详情"""
+    def information_details(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json = {
+            "id":"61cbb70345a326c6c34a5e0e"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/info/getInfoDetail", headers=hearders, json=json)
+        return response
+
+    """订阅查询"""
+    def subscription_query(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/userInfo", headers=hearders)
+        return response
+
+    """采购单位分析"""
+    def purchasing_analysis(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json = {
+            "Id": "6683afb5fd2a955205279a0e",
+            "Type": 0
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/getBuyerAnalyze", headers=hearders, json=json)
+        return response
+
+    """详情页信息"""
+    def detail_page_information(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json = {
+            "Id": "ABCY1xZcDIvJyssAlV1cHU8CicoEjRjYWR1Pw4jIy4wc3xzfTNUCec%3D",
+            "Type":1
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/getDetailEquity", headers=hearders, json=json)
+        return response
+
+    """订阅区域修改"""
+    def subscription_region_modification(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json = {
+            "ModifyType":"全部"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/updateArea", headers=hearders, json=json)
+        return response
+
+    """订阅业务类型修改"""
+    def subscription_service_type_changes(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/updateIndustry", headers=hearders)
+        return response
+
+apimgr = APIMgr()