|
@@ -1,13 +1,16 @@
|
|
|
-import requests, json
|
|
|
+import json
|
|
|
+import requests
|
|
|
from hytest.common import *
|
|
|
from cfg import cfg
|
|
|
-from requests.packages import urllib3
|
|
|
|
|
|
#存放公用方法
|
|
|
# 存储 全局共享 数据
|
|
|
GSTORE = {}
|
|
|
class APIMgr():
|
|
|
#打印https请求与消息
|
|
|
+ def __init__(self):
|
|
|
+ self.ui = None
|
|
|
+
|
|
|
def printRequest(self,req):
|
|
|
if req.body==None:
|
|
|
msgBody=''
|
|
@@ -142,8 +145,14 @@ class APIMgr():
|
|
|
return response
|
|
|
|
|
|
#采购单位搜索
|
|
|
- def buyersousuo(self, buyerName, province=[], city=[], buyerClass=[], isCheckFollow=True, isCheckReceive=True,
|
|
|
- isContact=0, pageSize=10,pageNum=1):
|
|
|
+ def buyersousuo(self, buyerName, province=None, city=None, buyerClass=None, isCheckFollow=True, isCheckReceive=True,
|
|
|
+ isContact=0, pageSize=10, pageNum=1):
|
|
|
+ if buyerClass is None:
|
|
|
+ buyerClass = []
|
|
|
+ if city is None:
|
|
|
+ city = []
|
|
|
+ if province is None:
|
|
|
+ province = []
|
|
|
url = f"{cfg.target_host}/jyapi/jybx/buyer/eType/buyerList"
|
|
|
data = {
|
|
|
"buyerName": buyerName,
|
|
@@ -194,8 +203,8 @@ class APIMgr():
|
|
|
def get_messagelist(self):
|
|
|
headers = GSTORE['headers']
|
|
|
s = GSTORE['s']
|
|
|
- response=s.post(f"{cfg.target_host}/jymessageCenter/messageList",headers=headers,params=
|
|
|
- {"needFilter":"1","msgType":"0","isRead":"-1","offset":"1","pageSize":"5"})
|
|
|
+ response=s.post(f"{cfg.target_host}/jyapi/messageCenter/MessageList",headers=headers,json=
|
|
|
+ {"msgType":-1,"isRead":-1,"offset":1,"size":20})
|
|
|
return response
|
|
|
|
|
|
"""用户中台"""
|
|
@@ -354,7 +363,7 @@ class APIMgr():
|
|
|
response = s.post(f"{cfg.target_host}/publicapply/bidcoll/list", headers=hearders, params=params)
|
|
|
return response
|
|
|
|
|
|
-
|
|
|
+ """标讯收藏"""
|
|
|
apimgr = APIMgr()
|
|
|
|
|
|
|