|
@@ -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
|
|
@@ -359,6 +365,16 @@ class APIMgr():
|
|
|
})
|
|
|
return response
|
|
|
|
|
|
+ #点击查看消息消息状态修改成已读
|
|
|
+ def get_markread(self):
|
|
|
+ hearders = GSTORE['headers']
|
|
|
+ s = GSTORE['s']
|
|
|
+ json={
|
|
|
+ "msgId":285266
|
|
|
+ }
|
|
|
+ response = s.post(f"{cfg.target_host}/jyapi/messageCenter/markRead", headers=hearders,json=json)
|
|
|
+ return response
|
|
|
+
|
|
|
"""用户中台"""
|
|
|
def get_userCenter(self):
|
|
|
hearders = GSTORE['headers']
|
|
@@ -1029,6 +1045,342 @@ class APIMgr():
|
|
|
header = GSTORE['headers']
|
|
|
response = self.s.post(f"{cfg.target_host}/bigmember/search/buyer/association?name=河南科技大学", headers=header)
|
|
|
return response
|
|
|
+ #消息查看记录
|
|
|
+ def msgopenlog(self):
|
|
|
+ header = GSTORE['headers']
|
|
|
+ data={
|
|
|
+ "msgLogId":287204,
|
|
|
+ "platform":1}
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyapi/messageCenter/msgOpenLog",headers=header,json=data)
|
|
|
+ return response
|
|
|
+
|
|
|
+ #查看消息详情
|
|
|
+ def messagedetail(self):
|
|
|
+ header = GSTORE['headers']
|
|
|
+ data={
|
|
|
+ "msgLogId":240818
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyapi/messageCenter/messageDetail",headers=header,json=data)
|
|
|
+ return response
|
|
|
+
|
|
|
+ #拟在建搜索条件接口
|
|
|
+ def conditions(self):
|
|
|
+ header = GSTORE['headers']
|
|
|
+ response = self.s.post(f"{cfg.target_host}/front/project/nzj/conditions",headers=header)
|
|
|
+ return response
|
|
|
+
|
|
|
+ # 工作桌面商机情报列表
|
|
|
+ def workdesk_intelligence(self):
|
|
|
+ header = GSTORE['headers']
|
|
|
+ data = {
|
|
|
+ "msgType": 5,
|
|
|
+ "needDealtWithCount": True,
|
|
|
+ "offset": 1,
|
|
|
+ "size": 5
|
|
|
+ }
|
|
|
+ response =self.s.post(f"{cfg.target_host}/jyapi/messageCenter/WorkDeskList", headers=header, json=data)
|
|
|
+ return response
|
|
|
+ #商品积分查询
|
|
|
+ def goods_points(self):
|
|
|
+ header = GSTORE['headers']
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyintegral/productPoints/introduction",headers=header)
|
|
|
+ return response
|
|
|
+ #工作桌面首页-我的消息-未读消息数量
|
|
|
+ def workdesk_unread_messages(self):
|
|
|
+ header = GSTORE['headers']
|
|
|
+ json ={
|
|
|
+ "size": 20,
|
|
|
+ "msgType": -1,
|
|
|
+ "offset": 1,
|
|
|
+ "isRead": 0,
|
|
|
+ "isColumn": False,
|
|
|
+ "isColumnNewMsg": False,
|
|
|
+ "isContainLetter": False,
|
|
|
+ "isMsgList": False
|
|
|
+ }
|
|
|
+
|
|
|
+ response =self.s.post(f"{cfg.target_host}/jyapi/messageCenter/MessageList",headers=header,json=json)
|
|
|
+ return response
|
|
|
+ #一键清空未读消息
|
|
|
+ def clear_unread_msg(self):
|
|
|
+ header = GSTORE['headers']
|
|
|
+ response = self.s.post(f"{cfg.target_host}/jyapi/messageCenter/ClearUnreadMsg",headers = header)
|
|
|
+ return response
|
|
|
+ #新商机管理-企业订阅-修改关键词设置
|
|
|
+ def update_keyword_entnichenew(self):
|
|
|
+ header = GSTORE['headers']
|
|
|
+ json = {
|
|
|
+ "a_items": [
|
|
|
+ {
|
|
|
+ "a_key": [
|
|
|
+ {
|
|
|
+ "key": [
|
|
|
+ "计算机"
|
|
|
+ ],
|
|
|
+ "notkey": [],
|
|
|
+ "matchway": 1
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "groupIndex": 0,
|
|
|
+ "opened": True,
|
|
|
+ "s_item": "测试分组",
|
|
|
+ "showForm": False,
|
|
|
+ "updatetime": 0
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "identity": "ent"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/key/update", headers=header,json=json)
|
|
|
+ return response
|
|
|
+
|
|
|
+ #获取区域设置
|
|
|
+ def entnichenew_area(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ s = GSTORE['s']
|
|
|
+ response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/area/get",headers = headers)
|
|
|
+ return response
|
|
|
+
|
|
|
+ #商机管理-企业订阅-获取关键词设置
|
|
|
+ def keywords_get(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ data ={
|
|
|
+ "identity": "ent"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/key/get", headers=headers, data =data)
|
|
|
+ return response
|
|
|
+ #商机管理-企业订阅-获取推送设置
|
|
|
+ def pushset_get(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ data={
|
|
|
+ "identity": "ent"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/pushset/get", headers=headers, data=data)
|
|
|
+ return response
|
|
|
+
|
|
|
+ #设置登录保持期
|
|
|
+ def set_keeplogin(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ data = {
|
|
|
+ "isAutoLogin" : "true" ,
|
|
|
+ "loginER" : "NSg7BAFFBQMHBkZXRFpXRAsDBQJHBzwN___NjcAJDRFBQMHBkZXRFpXRAsDBQJHGTE8"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/free/setKeepLogin",headers = headers ,data = data)
|
|
|
+ return response
|
|
|
+
|
|
|
+ #发送邮箱验证码
|
|
|
+ def send_mailverify(self):
|
|
|
+ headers = GSTORE["headers"]
|
|
|
+ data = {
|
|
|
+ "email" : "luwenna@topnet.net.cn"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/front/dataExport/sendMailVerify",headers = headers , data = data)
|
|
|
+ return response
|
|
|
+
|
|
|
+ #验证数据导出邮箱验证码
|
|
|
+ def check_mailverify(self):
|
|
|
+ headers = GSTORE["headers"]
|
|
|
+ data = {
|
|
|
+ "emailVerity" : "YQ09Z1",
|
|
|
+ "email" : "luwenna@topnet.net.cn"
|
|
|
+ }
|
|
|
+ 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']
|
|
|
+ s = GSTORE['s']
|
|
|
+ json = {
|
|
|
+ "buyer": [
|
|
|
+ "法院",
|
|
|
+ "发改"
|
|
|
+ ],
|
|
|
+ "identity": "ent"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/area/get", headers=headers,json=json)
|
|
|
+ return response
|
|
|
+
|
|
|
+ # 获取信息类型
|
|
|
+ def entnichenew_infotype(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ s = GSTORE['s']
|
|
|
+ json = {
|
|
|
+ "identity": "ent"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/index", headers=headers,json=json)
|
|
|
+ return response
|
|
|
+
|
|
|
+ # 修改信息类型
|
|
|
+ def entnichenew_infotype_update(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ s = GSTORE['s']
|
|
|
+ json = {
|
|
|
+ "msg": [
|
|
|
+ "预告",
|
|
|
+ "预审",
|
|
|
+ "预审结果",
|
|
|
+ "论证意见",
|
|
|
+ "需求公示"
|
|
|
+ ],
|
|
|
+ "identity": "ent"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/infotype/update", headers=headers,json=json)
|
|
|
+ return response
|
|
|
+ #商机管理-企业订阅-修改推送设置
|
|
|
+ def entnichenew_pushset_update(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ data = {
|
|
|
+ "ratemode": 2,
|
|
|
+ "apppush": 1,
|
|
|
+ "mailpush": 1,
|
|
|
+ "matchway": 2,
|
|
|
+ "wxpush": 1,
|
|
|
+ "matchmode": "title,detail",
|
|
|
+ "switch": 1,
|
|
|
+ "identity": "ent"
|
|
|
+ }
|
|
|
+ response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/pushset/update", headers=headers,data=data)
|
|
|
+ return response
|
|
|
+
|
|
|
+ #未登录“拟在建项目”详情页
|
|
|
+ def nzj_details(self):
|
|
|
+ headers = GSTORE['headers']
|
|
|
+ params = {
|
|
|
+ "pid":"040709005b58070d4a46020952075350590c1d4302530802"
|
|
|
+ }
|
|
|
+ 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()
|
|
|
|