|
@@ -127,9 +127,8 @@ class APIMgr():
|
|
self.printResponse(response)
|
|
self.printResponse(response)
|
|
return response
|
|
return response
|
|
|
|
|
|
- # 供应搜索
|
|
|
|
- def supplySearch(self, keywords="PH计", searchType="title", province="", city="", time="", status="0",
|
|
|
|
- pageSize=50, pageIndex=1):
|
|
|
|
|
|
+ # 供应搜索
|
|
|
|
+ def supplySearch(self, keywords="PH计", searchType="title", province="", city="", time="", status="0",pageSize=50, pageIndex=1):
|
|
headers = GSTORE['headers']
|
|
headers = GSTORE['headers']
|
|
headers['Content-Type'] = 'application/json' # 添加Content-Type头部
|
|
headers['Content-Type'] = 'application/json' # 添加Content-Type头部
|
|
url = f"{cfg.target_host}/jyinfo/supplySearch"
|
|
url = f"{cfg.target_host}/jyinfo/supplySearch"
|
|
@@ -149,8 +148,7 @@ class APIMgr():
|
|
return response
|
|
return response
|
|
|
|
|
|
#采购单位搜索
|
|
#采购单位搜索
|
|
- def buyersousuo(self, buyerName, province=None, city=None, buyerClass=None, 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:
|
|
if buyerClass is None:
|
|
buyerClass = []
|
|
buyerClass = []
|
|
if city is None:
|
|
if city is None:
|
|
@@ -172,6 +170,53 @@ class APIMgr():
|
|
response = requests.post(url=url, json=data, headers=self.headers)
|
|
response = requests.post(url=url, json=data, headers=self.headers)
|
|
self.printResponse(response)
|
|
self.printResponse(response)
|
|
return response
|
|
return response
|
|
|
|
+
|
|
|
|
+ #融创用户搜索
|
|
|
|
+ def rc_search(self):
|
|
|
|
+ headers = GSTORE['headers']
|
|
|
|
+ headers['Content-Type'] = 'application/json' # 添加Content-Type头部
|
|
|
|
+ url = f"{cfg.target_host}/jyapi/jybx/core/mType/searchList"
|
|
|
|
+ params={
|
|
|
|
+ "searchGroup": 0,
|
|
|
|
+ "reqType": "lastNews",
|
|
|
|
+ "pageNum": 1,
|
|
|
|
+ "pageSize": 50,
|
|
|
|
+ "keyWords": "医疗设备",
|
|
|
|
+ "searchMode": 0,
|
|
|
|
+ "bidField": "",
|
|
|
|
+ "publishTime": "1654704000-1657900799",
|
|
|
|
+ "selectType": "title,content",
|
|
|
|
+ "subtype": "",
|
|
|
|
+ "exclusionWords": "",
|
|
|
|
+ "buyer": "",
|
|
|
|
+ "winner": "",
|
|
|
|
+ "agency": "",
|
|
|
|
+ "industry": "",
|
|
|
|
+ "province": "",
|
|
|
|
+ "city": "",
|
|
|
|
+ "district": "",
|
|
|
|
+ "buyerClass": "",
|
|
|
|
+ "fileExists": "",
|
|
|
|
+ "price": "",
|
|
|
|
+ "buyerTel": "",
|
|
|
|
+ "winnerTel": "",
|
|
|
|
+ "mobileTag": [
|
|
|
|
+ "军队类",
|
|
|
|
+ "武警类",
|
|
|
|
+ "融通类",
|
|
|
|
+ "退役类",
|
|
|
|
+ "融办类",
|
|
|
|
+ "某某类",
|
|
|
|
+ "all"
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ session = self.s
|
|
|
|
+ response = session.post(url=url, headers=headers, params=params)
|
|
|
|
+ self.printResponse(response)
|
|
|
|
+ return response
|
|
|
|
+
|
|
|
|
+
|
|
#接口数据传值常用三种方式:urlencoded---params,键值对---data,json格式---json
|
|
#接口数据传值常用三种方式:urlencoded---params,键值对---data,json格式---json
|
|
#获取推送记录接口
|
|
#获取推送记录接口
|
|
def push_list(self):
|
|
def push_list(self):
|
|
@@ -384,7 +429,7 @@ class APIMgr():
|
|
response = s.post(f"{cfg.target_host}/publicapply/password/check", headers=headers, params=params)
|
|
response = s.post(f"{cfg.target_host}/publicapply/password/check", headers=headers, params=params)
|
|
return response
|
|
return response
|
|
#身份获取
|
|
#身份获取
|
|
- def Identity_list(self):
|
|
|
|
|
|
+ def Identity_list(self,n=0):
|
|
headers = GSTORE['headers']
|
|
headers = GSTORE['headers']
|
|
s = GSTORE['s']
|
|
s = GSTORE['s']
|
|
params = {
|
|
params = {
|
|
@@ -393,8 +438,9 @@ class APIMgr():
|
|
# 解析响应内容为JSON
|
|
# 解析响应内容为JSON
|
|
response_json = response.json()
|
|
response_json = response.json()
|
|
# 从JSON响应中提取token
|
|
# 从JSON响应中提取token
|
|
- self.token = response_json['data'][0]['token']
|
|
|
|
|
|
+ self.token = response_json['data'][n]['token']
|
|
return response
|
|
return response
|
|
|
|
+
|
|
def Identity_switch(self):
|
|
def Identity_switch(self):
|
|
headers = GSTORE["headers"]
|
|
headers = GSTORE["headers"]
|
|
s = GSTORE["s"]
|
|
s = GSTORE["s"]
|