webapi.py 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526
  1. import json
  2. import requests
  3. from hytest.common import *
  4. from cfg import cfg
  5. from bs4 import BeautifulSoup
  6. from requests.packages import urllib3
  7. #存放公用方法
  8. # 存储 全局共享 数据
  9. GSTORE = {}
  10. class APIMgr():
  11. #打印https请求与消息
  12. def __init__(self):
  13. self.ui = None
  14. self.token = None
  15. def printRequest(self,req):
  16. if req.body==None:
  17. msgBody=''
  18. else:
  19. msgBody=req.body
  20. self.ui.outputWindow.append(
  21. '{}\n{}\n{}\n\n{}'.format(
  22. '\n\n-------发送请求--------',
  23. req.method+''+req.url,
  24. '\n'.join('{}:{}'.format(k,v) for k,v in req.headers.items()),
  25. msgBody,
  26. ))
  27. # 打印http相应消息的函数
  28. def printResponse(self, response):
  29. print('\n\n----- https response begin -----')
  30. print(response.status_code)
  31. # print(response.headers)
  32. for k, v in response.headers.items():
  33. print(f'{k}:{v}')
  34. print(response.content.decode('utf8'))
  35. print('----- https response end-----\n\n')
  36. headers = {
  37. "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"
  38. }
  39. #headers设置为全局变量
  40. GSTORE['headers'] = headers
  41. # session对象设置为全局变量
  42. s = requests.Session()
  43. GSTORE['s'] = s
  44. #pc登录接口
  45. def mgr_login(self, phone='18211989987', password='123456',useproxies=False):
  46. headers=GSTORE['headers']
  47. s = GSTORE['s']
  48. if useproxies:
  49. self.s.proxies.update({'http':'127.0.0.1:8888'})
  50. response = self.s.post(f"{cfg.target_host}/phone/login",headers=headers,data=
  51. {
  52. 'reqType': 'phoneLogin',
  53. 'isAutoLogin': 'false',
  54. 'phone':phone,
  55. 'password':password
  56. })
  57. self.printResponse(response)
  58. # 把response对象返回出去
  59. return response
  60. # app登录接口
  61. def mgr_login_app(self, phone='18211989987', password='123456',useproxies=False):
  62. headers=GSTORE['headers']
  63. s = GSTORE['s']
  64. if useproxies:
  65. self.s.proxies.update({'http':'127.0.0.1:8888'})
  66. response = self.s.post(f"{cfg.target_host_app}/jyapp/free/login",headers=headers,params=
  67. {
  68. 'reqType': 'phoneLogin',
  69. 'phone':phone,
  70. 'password':password,
  71. 'rid':'',
  72. 'oid': '',
  73. 'phoneType': '',
  74. 'channel': '',
  75. 'deviceId': ''
  76. })
  77. self.printResponse(response)
  78. # 把response对象返回出去
  79. return response
  80. """退出登录pc"""
  81. def mgr_logout(self):
  82. url = f"{cfg.target_host}/front/signOut"
  83. headers = GSTORE['headers']
  84. s = GSTORE['s']
  85. s.post(url=url, headers=headers)
  86. # self.printResponse(res)
  87. # return res
  88. """退出登录app"""
  89. def mgr_logout_app(self):
  90. url = f"{cfg.target_host_app}/jyapp/free/signOut"
  91. headers = GSTORE['headers']
  92. s = GSTORE['s']
  93. s.post(url=url, headers=headers)
  94. #招标搜索
  95. def bidsearch(self, keywords="建筑", publishtime="fiveyear", selectType="content"):
  96. #使用全局变量
  97. headers = GSTORE['headers']
  98. params={"keywords":keywords,"publishtime":publishtime,"timeslot":"","area":"","subtype":"","minprice":"","maxprice":"","industry":"","buyerclass":"","buyertel":"","winnertel":"","selectType":selectType,"notkey":"","fileExists":"0","city":"","searchGroup":"0","searchMode":"0","wordsMode":"0","additionalWords":""}
  99. #保存session
  100. session = self.s
  101. response = session.post(f"{cfg.target_host}/jylab/supsearch/index.html", headers=headers, params=params)
  102. self.printResponse(response)
  103. return response
  104. #超前项目搜索
  105. def advanced_search(self):
  106. #使用全局变量
  107. headers = GSTORE['headers']
  108. #保存session
  109. session = self.s
  110. data={
  111. "searchGroup": 2,
  112. "reqType": "lastNews",
  113. "pageNum": 1,
  114. "pageSize": 50,
  115. "keyWords": "科技",
  116. "searchMode": 0,
  117. "bidField": "",
  118. "publishTime": "1689573022-1721195422",
  119. "selectType": "title,content",
  120. "subtype": "",
  121. "exclusionWords": "",
  122. "buyer": "",
  123. "winner": "",
  124. "agency": "",
  125. "industry": "",
  126. "province": "",
  127. "city": "",
  128. "district": "",
  129. "buyerClass": "",
  130. "fileExists": "",
  131. "price": "",
  132. "buyerTel": "",
  133. "winnerTel": ""
  134. }
  135. response = session.post(f"{cfg.target_host}/jyapi/jybx/core/mType/searchList", headers=headers, data=data)
  136. return response
  137. # 企业搜索
  138. def enterpriseSearch(self, match="北京剑鱼信息技术有限公司河南分公司", matchType="A", pageSize="10", pageNum="0"):
  139. # 使用全局变量
  140. headers = GSTORE['headers']
  141. # 保存session
  142. session = self.s
  143. response = session.post(f"{cfg.target_host}/publicapply/enterpriseSearch/doQuery", headers=headers, data={
  144. 'match': match,
  145. 'matchType': matchType,
  146. 'pageSize': pageSize,
  147. 'pageNum': pageNum
  148. })
  149. self.printResponse(response)
  150. return response
  151. # 供应搜索
  152. def supplySearch(self, keywords="PH计", searchType="title", province="", city="", time="", status="0",
  153. pageSize=50, pageIndex=1):
  154. headers = GSTORE['headers']
  155. headers['Content-Type'] = 'application/json' # 添加Content-Type头部
  156. url = f"{cfg.target_host}/jyinfo/supplySearch"
  157. data = {
  158. "keywords": keywords,
  159. "searchType": searchType,
  160. "province": province,
  161. "city": city,
  162. "time": time,
  163. "status": status,
  164. "pageSize": pageSize,
  165. "pageIndex": pageIndex
  166. }
  167. session=self.s
  168. response = session.post(url=url, headers=headers, data=json.dumps(data))
  169. self.printResponse(response)
  170. return response
  171. #采购单位搜索
  172. def buyer_search(self, buyerName, province=None, city=None, buyerClass=None, isCheckFollow=True, isCheckReceive=True,
  173. isContact=0, pageSize=10, pageNum=1):
  174. if buyerClass is None:
  175. buyerClass = []
  176. if city is None:
  177. city = []
  178. if province is None:
  179. province = []
  180. url = f"{cfg.target_host}/jyapi/jybx/buyer/eType/buyerList"
  181. data = {
  182. "buyerName": buyerName,
  183. "province": province,
  184. "city": city,
  185. "buyerClass": buyerClass,
  186. "isCheckFollow": isCheckFollow,
  187. "isCheckReceive": isCheckReceive,
  188. "isContact": isContact,
  189. "pageSize": pageSize,
  190. "pageNum":pageNum
  191. }
  192. response = requests.post(url=url, json=data, headers=self.headers)
  193. self.printResponse(response)
  194. return response
  195. #融创用户搜索
  196. def rc_search(self):
  197. headers = GSTORE['headers']
  198. headers['Content-Type'] = 'application/json' # 添加Content-Type头部
  199. url = f"{cfg.target_host}/jyapi/jybx/core/mType/searchList"
  200. params={
  201. "searchGroup": 0,
  202. "reqType": "lastNews",
  203. "pageNum": 1,
  204. "pageSize": 50,
  205. "keyWords": "医疗设备",
  206. "searchMode": 0,
  207. "bidField": "",
  208. "publishTime": "1654704000-1657900799",
  209. "selectType": "title,content",
  210. "subtype": "",
  211. "exclusionWords": "",
  212. "buyer": "",
  213. "winner": "",
  214. "agency": "",
  215. "industry": "",
  216. "province": "",
  217. "city": "",
  218. "district": "",
  219. "buyerClass": "",
  220. "fileExists": "",
  221. "price": "",
  222. "buyerTel": "",
  223. "winnerTel": "",
  224. "mobileTag": [
  225. "军队类",
  226. "武警类",
  227. "融通类",
  228. "退役类",
  229. "融办类",
  230. "某某类",
  231. "all"
  232. ]
  233. }
  234. session = self.s
  235. response = session.post(url=url, headers=headers, params=params)
  236. self.printResponse(response)
  237. return response
  238. """三级页公告摘要"""
  239. #两个接口,
  240. def preagent(self,url='https://www.jianyu360.cn/nologin/content/ApGY1xdfTI4LyMsM3d4cE8JIzAvFj1jcXNlKwUkPT0dY2BwDidUCZM%3D.html'):
  241. headers = {
  242. 'Referer': url
  243. }
  244. s = GSTORE["s"]
  245. response = s.get(f"{cfg.target_host}/publicapply/detail/preAgent", headers=headers)
  246. response_data=json.loads(response.text)
  247. token=response_data["data"]["token"]
  248. return token
  249. def detail_baseinfo(self,url='https://www.jianyu360.cn/nologin/content/ApGY1xdfTI4LyMsM3d4cE8JIzAvFj1jcXNlKwUkPT0dY2BwDidUCZM%3D.html'):
  250. headers = GSTORE['headers']
  251. s = GSTORE["s"]
  252. token=self.preagent(url)
  253. params = {
  254. "token":token
  255. }
  256. response = s.post(f"{cfg.target_host}/publicapply/detail/baseInfo", headers=headers, params=params)
  257. return response
  258. """三级页商机推荐"""
  259. def detail_advancedinfo(self):
  260. headers = GSTORE['headers']
  261. s = GSTORE["s"]
  262. res = self.detail_baseinfo()
  263. response_data = json.loads(res.text)
  264. token = response_data["data"]["token"]
  265. params = {
  266. "token": token
  267. }
  268. response = s.post(f"{cfg.target_host}/publicapply/detail/advancedInfo", headers=headers, params=params)
  269. return response
  270. """三级页监控项目"""
  271. def detail_monitor_project(self):
  272. headers = GSTORE['headers']
  273. s = GSTORE["s"]
  274. params = {
  275. "sid": "ABCY1xdfTI4LyMsM3d4cE8JIzAvFj1jcXNlKwUkPT0dY2BwDidUCZM="
  276. }
  277. response = s.post(f"{cfg.target_host}/bigmember/follow/project/add", headers=headers, params=params)
  278. return response
  279. """取消项目监控"""
  280. def cacel_project(self):
  281. headers = GSTORE['headers']
  282. s = GSTORE["s"]
  283. params = {
  284. "sid": "ABCY1xdfTI4LyMsM3d4cE8JIzAvFj1jcXNlKwUkPT0dY2BwDidUCZM=",
  285. "fid[followId]":"ABCY3ZdfT0FUCw4AnpUA3k%3D",
  286. "fid[limit_count]": 10,
  287. "fid[msg_open]": True,
  288. "fid[status]": True,
  289. }
  290. response = s.post(f"{cfg.target_host}/bigmember/follow/project/cancel", headers=headers, params=params)
  291. return response
  292. """用户信息获取isadd接口"""
  293. def isadd(self):
  294. headers = GSTORE['headers']
  295. s = GSTORE["s"]
  296. response = s.get(f"{cfg.target_host}/bigmember/use/isAdd", headers=headers)
  297. return response
  298. #接口数据传值常用三种方式:urlencoded---params,键值对---data,json格式---json
  299. #获取推送记录接口
  300. def push_list(self):
  301. headers=GSTORE['headers']
  302. s = GSTORE['s']
  303. response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/fType/list",headers=headers,json=
  304. {"pageNum": 1, "pageSize": 50, "format": "table", "area": "", "selectTime": "all", "city": "", "buyerClass": "",
  305. "subtype": "", "industry": "", "keyWords": "", "fileExists": "", "price": "", "source": "", "exportNum": "",
  306. "vt": ""})
  307. return response
  308. # 不登录招标搜索
  309. def notloggedin_search(self, keyword='科技', publishtime='thisyear', selectType='content,title'):
  310. headers = GSTORE['headers']
  311. params={"keywords": keyword , "publishtime": publishtime, "timeslot": "", "area": "", "subtype": "",
  312. "minprice": "", "maxprice": "", "industry": "", "buyerclass": "", "buyertel": "", "winnertel": "",
  313. "selectType": selectType, "notkey": "", "fileExists": "0", "city": "", "searchGroup": "0",
  314. "searchMode": "0", "wordsMode": "0", "additionalWords": ""}
  315. response = requests.post(f"{cfg.target_host}/jylab/supsearch/index.html", headers=headers, params=params)
  316. response.raise_for_status() # 如果请求失败,会抛出异常
  317. return response
  318. #不登录采购单位搜索
  319. def notloggedin_buysearch(self,keyword):
  320. headers = GSTORE['headers']
  321. s = GSTORE['s']
  322. data = {"buyerName":keyword,"province":[],"city":[],"buyerClass":[],"isCheckFollow":False,"isCheckReceive":False,"isContact":0,"pageSize":10,"pageNum":1}
  323. response =s.post(f"{cfg.target_host}/jyapi/jybx/buyer/eType/buyerList", headers=headers, json=data)
  324. # response.raise_for_status() # 如果请求失败,会抛出异常
  325. return response
  326. #消息中心列表
  327. def get_messagelist(self):
  328. headers = GSTORE['headers']
  329. s = GSTORE['s']
  330. response=s.post(f"{cfg.target_host}/jyapi/messageCenter/MessageList",headers=headers,json=
  331. {
  332. "isColumn": True,
  333. "isColumnNewMsg": False,
  334. "isMsgList": True,
  335. "msgType": -1,
  336. "isRead": -1,
  337. "offset": 1,
  338. "size": 20
  339. })
  340. return response
  341. #点击查看消息消息状态修改成已读
  342. def get_markread(self):
  343. hearders = GSTORE['headers']
  344. s = GSTORE['s']
  345. json={
  346. "msgId":285266
  347. }
  348. response = s.post(f"{cfg.target_host}/jyapi/messageCenter/markRead", headers=hearders,json=json)
  349. return response
  350. """用户中台"""
  351. def get_userCenter(self):
  352. hearders = GSTORE['headers']
  353. s = GSTORE['s']
  354. response = s.post(f"{cfg.target_host}/userCenter/workDesktop/menuInfo", headers=hearders)
  355. return response
  356. """我的订单"""
  357. def get_myOrder(self):
  358. hearders = GSTORE['headers']
  359. s = GSTORE['s']
  360. params = {
  361. "type": 0,
  362. "pageNum": 1,
  363. "fromPage": "pc",
  364. "page_size": 10
  365. }
  366. response = s.post(f"{cfg.target_host}/subscribepay/orderListDetails/myOrder", headers=hearders, params=params)
  367. return response
  368. """优惠卷"""
  369. def get_coupon(self):
  370. hearders = GSTORE['headers']
  371. s = GSTORE['s']
  372. params={
  373. "mold": 4,
  374. "currentPage": 1,
  375. "pageSize": 8,
  376. "platform": "P"
  377. }
  378. response= s.post(f"{cfg.target_host}/jyCoupon/getInfoByUser", headers=hearders,params=params)
  379. return response
  380. """数据自动导出"""
  381. def get_dataExport(self,publishtime=1672502400_1688951529,keyword='数据',selectType='title'):
  382. hearders = GSTORE['headers']
  383. s = GSTORE['s']
  384. params={
  385. "publishtime":publishtime,
  386. "area":"",
  387. "city":"",
  388. "region":"",
  389. "industry":"",
  390. "buyerclass":"",
  391. "keyword": [{"keyword":keyword,"appended":[],"exclude":[]}],
  392. "selectType":selectType,
  393. "minprice":"",
  394. "maxprice":"",
  395. "subtype":"",
  396. "buyer":"",
  397. "winner":"",
  398. "dataType": 2
  399. }
  400. response = s.post(f"{cfg.target_host}/front/dataExport/sieveData", headers=hearders, params=params)
  401. return response
  402. """数据导出记录"""
  403. def Export_recordList(self):
  404. hearders = GSTORE['headers']
  405. s = GSTORE['s']
  406. params={
  407. "pageNum": 0,
  408. "pageSize": 10
  409. }
  410. response = s.post(f"{cfg.target_host}/subscribepay/dataExportPack/recordList", headers=hearders, params=params)
  411. return response
  412. """数据导出-超出2w条,点击不在提示"""
  413. def export_prompt(self):
  414. hearders = GSTORE['headers']
  415. s = GSTORE['s']
  416. params={
  417. "status": 1
  418. }
  419. response = s.post(f"{cfg.target_host}/front/dataExport/setDontPromptAgain", headers=hearders, params=params)
  420. return response
  421. """数据导出-判断是否展示弹框"""
  422. def export_frame(self):
  423. hearders = GSTORE['headers']
  424. s = GSTORE['s']
  425. response = s.post(f"{cfg.target_host}/front/dataExport/getDontPromptAgain", headers=hearders)
  426. return response
  427. """数据导出筛选条件列表"""
  428. def export_list(self):
  429. hearders = GSTORE['headers']
  430. s = GSTORE['s']
  431. response = s.get(f"{cfg.target_host}/subscribepay/dataExportPack/screenList", headers=hearders)
  432. return response
  433. """剑鱼文库搜索"""
  434. def Library_search(self,keyWord='数据'):
  435. hearders = GSTORE['headers']
  436. s = GSTORE['s']
  437. params={
  438. "keyWord":keyWord,
  439. "tag":"",
  440. "sort": "tSort",
  441. "num": 1,
  442. "size": 10
  443. }
  444. response = s.post(f"{cfg.target_host}/jydocs/search", headers=hearders, params=params)
  445. return response
  446. """剑鱼文库收藏"""
  447. def Library_collection(self):
  448. hearders = GSTORE['headers']
  449. s = GSTORE['s']
  450. params={
  451. "sign": 1,
  452. "num": 1,
  453. "size": 10
  454. }
  455. response = s.post(f"{cfg.target_host}/jydocs/user/list", headers=hearders, params=params)
  456. return response
  457. """剑鱼文库我的文库"""
  458. def My_library(self):
  459. hearders = GSTORE['headers']
  460. s = GSTORE['s']
  461. params={
  462. "sign": 0,
  463. "num": 1,
  464. "size": 10
  465. }
  466. response = s.post(f"{cfg.target_host}/jydocs/user/list", headers=hearders, params=params)
  467. return response
  468. """项目进度监控"""
  469. def Project_monitoring(self):
  470. hearders = GSTORE['headers']
  471. s = GSTORE['s']
  472. params={
  473. "pageNum": 0,
  474. "pageSize": 500
  475. }
  476. response = s.post(f"{cfg.target_host}/bigmember/follow/project/list", headers=hearders, params=params)
  477. return response
  478. """企业情报监控"""
  479. def Enterprise_monitoring(self):
  480. hearders = GSTORE['headers']
  481. s = GSTORE['s']
  482. params={
  483. "pageNum": 0,
  484. "pageSize": 10,
  485. "match":"",
  486. "group":"",
  487. }
  488. response = s.post(f"{cfg.target_host}/bigmember/follow/ent/list", headers=hearders, params=params)
  489. return response
  490. """客户监控"""
  491. def Customer_monitoring(self,):
  492. hearders = GSTORE['headers']
  493. s = GSTORE['s']
  494. params = {
  495. "pagesize": 10,
  496. "pageno": 0,
  497. "keyword":""
  498. }
  499. response = s.post(f"{cfg.target_host}/publicapply/customer/list", headers=hearders, params=params)
  500. return response
  501. """标讯收藏"""
  502. def Message_Collection(self):
  503. hearders = GSTORE['headers']
  504. s = GSTORE['s']
  505. params={
  506. "buyerPhone":0,
  507. "buyerclass":"",
  508. "label":"",
  509. "pagenum":1,
  510. "pagesize":50,
  511. "selectTime":"",
  512. "winnerPhone":0
  513. }
  514. response = s.post(f"{cfg.target_host}/publicapply/bidcoll/list", headers=hearders, params=params)
  515. return response
  516. """标讯收藏"""
  517. #信息获取
  518. def Getuser(self):
  519. headers = GSTORE['headers']
  520. s = GSTORE['s']
  521. response = s.get(f"{cfg.target_host}/jypay/user/getAccountInfo", headers=headers)
  522. return response
  523. #密码校验
  524. def Check_password(self):
  525. headers = GSTORE['headers']
  526. s = GSTORE['s']
  527. params = {
  528. "password": "123456"
  529. }
  530. response = s.post(f"{cfg.target_host}/publicapply/password/check", headers=headers, params=params)
  531. return response
  532. #身份获取
  533. def Identity_list(self,n=0):
  534. headers = GSTORE['headers']
  535. s = GSTORE['s']
  536. params = {
  537. }
  538. response = s.post(f"{cfg.target_host}/publicapply/identity/list",headers=headers, params=params)
  539. # 解析响应内容为JSON
  540. response_json = response.json()
  541. # 从JSON响应中提取token
  542. self.token = response_json['data'][n]['token']
  543. return response
  544. def Identity_switch(self):
  545. headers = GSTORE['headers']
  546. s = GSTORE["s"]
  547. params = {
  548. "token":self.token
  549. }
  550. response =s.post(f"{cfg.target_host}/publicapply/identity/switch", headers=headers, params=params)
  551. return response
  552. """获取用户信息"""
  553. def User_info(self):
  554. headers = {
  555. 'content-Type': 'application/json',
  556. 'appId': '10000',
  557. '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'
  558. }
  559. s = GSTORE["s"]
  560. params = {}
  561. response =s.post(f"{cfg.target_host}/userCenter/ent/userInfo",headers=headers,params=params)
  562. return response
  563. def Whether_buy(self):
  564. headers = GSTORE["headers"]
  565. s = GSTORE["s"]
  566. response =s.get(f"{cfg.target_host}/entnicheNew/buy/whetherbuy",headers=headers)
  567. return response
  568. def Commonly_List(self):
  569. headers = {
  570. 'content-Type': 'application/json',
  571. 'appId': '10000',
  572. 'userid': '63a41aa5cd7ea10389b2a8f3'
  573. }
  574. s = GSTORE['s']
  575. response =s.post(f"{cfg.target_host}/userCenter/workDesktop/renew/commonlyList",headers=headers)
  576. return response
  577. """权限校验"""
  578. def Authorised_info(self):
  579. headers = {
  580. "Content-Type":"application/json",
  581. "functionCode":"znsj_kf_use"
  582. }
  583. s = GSTORE['s']
  584. response =s.post(f"{cfg.target_host}/resourceCenter/waitEmpowerDetail",headers=headers)
  585. return response
  586. """未登录采购单位列表"""
  587. def nologin_buyer_list(self):
  588. headers = GSTORE['headers']
  589. s = GSTORE['s']
  590. data = {"buyerName":"","province":[],"city":[],"buyerClass":[],"isCheckFollow":False,"isCheckReceive":False,"isContact":0,"pageSize":10,"pageNum":1}
  591. response =s.post(f"{cfg.target_host}/jyapi/jybx/buyer/eType/buyerList",headers=headers,json=data)
  592. return response
  593. """未登录供应商列表"""
  594. def nologin_supplySearch(self):
  595. headers = GSTORE['headers']
  596. s = GSTORE['s']
  597. data = {"keywords":"信息","searchType":"title","province":"","city":"","time":"","status":"0","pageSize":50,"pageIndex":1}
  598. response =s.post(f"{cfg.target_host}/jyinfo/supplySearch",headers=headers,json=data)
  599. return response
  600. """未登录企业搜索"""
  601. def nologin_enterpriseSearch(self):
  602. headers = GSTORE['headers']
  603. s = GSTORE['s']
  604. params = {"match":"科技"}
  605. response =s.post(f"{cfg.target_host}/publicapply/enterpriseSearch/doQuery",headers=headers, params=params)
  606. return response
  607. """未登录招标信息搜索"""
  608. def nologin_Tender_search(self ):
  609. headers = GSTORE['headers']
  610. s = GSTORE['s']
  611. params = {"match":"科技"}
  612. response =s.post(f"{cfg.target_host}/jyapi/jybx/core/fType/searchList",headers=headers, params=params)
  613. return response
  614. """未登录拟在建搜索"""
  615. def nologin_Proposed_construction_search(self ):
  616. headers = GSTORE['headers']
  617. s = GSTORE['s']
  618. params = {"match":"科技"}
  619. response =s.post(f"{cfg.target_host}/front/project/nzj/search",headers=headers, params=params)
  620. return response
  621. """未登录拟在建搜索详情页"""
  622. def nologin_proposed_construction_content(self):
  623. headers = GSTORE['headers']
  624. s = GSTORE['s']
  625. params = {"pid":"040600055c0f00594f4351560153085d530f4e4200035201"}
  626. response =s.post(f"{cfg.target_host}/front/project/nzj/details",headers=headers, params=params)
  627. return response
  628. """工作桌面首页行业报告"""
  629. def industry_report(self):
  630. headers = GSTORE['headers']
  631. s = GSTORE['s']
  632. response = s.get(f"{cfg.target_host}/front/project/deskAnalysisReport", headers=headers)
  633. return response
  634. """工作桌面首页商机情报详情页"""
  635. def business_opportunity(self):
  636. headers = GSTORE['headers']
  637. s = GSTORE['s']
  638. # id='ABCY1xaYD0FJD0sNHN6cAcSMTI4DRZjV3diPB43LyEgfGpzbQFUCV8='
  639. response = s.get(f"{cfg.target_host}/bigmember/project/businessDetails?id=ABCY1xaYD0FJD0sNHN6cAcSMTI4DRZjV3diPB43LyEgfGpzbQFUCV8=", headers=headers,data={})
  640. return response
  641. """大会员推送记录列表"""
  642. def bigmember_push(self):
  643. headers = GSTORE['headers']
  644. response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/mType/list", headers=headers, json=
  645. {
  646. "pageNum": 1,
  647. "pageSize": 50,
  648. "format": "table",
  649. "area": "",
  650. "selectTime": "all",
  651. "city": "",
  652. "buyerClass": "",
  653. "subtype": "",
  654. "industry": "",
  655. "keyWords": "",
  656. "fileExists": "",
  657. "price": "",
  658. "source": "",
  659. "exportNum": "",
  660. "district": "",
  661. "isRead": "",
  662. "vt": "m"
  663. })
  664. return response
  665. """商机管理推送记录"""
  666. def entniche_push(self):
  667. headers = GSTORE['headers']
  668. response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/eType/list", headers=headers, json=
  669. {
  670. "pageNum": 1,
  671. "pageSize": 50,
  672. "format": "table",
  673. "area": "",
  674. "selectTime": "all",
  675. "city": "",
  676. "buyerClass": "",
  677. "subtype": "",
  678. "industry": "",
  679. "keyWords": "",
  680. "fileExists": "",
  681. "price": "",
  682. "source": "",
  683. "exportNum": "",
  684. "district": "",
  685. "isRead": "",
  686. "vt": "s"
  687. })
  688. return response
  689. """订阅搜索"""
  690. #免费用户订阅搜索
  691. def free_subscription_search(self):
  692. headers = GSTORE['headers']
  693. response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/fType/list", headers=headers, json=
  694. {
  695. "pageNum": 1,
  696. "pageSize": 50,
  697. "format": "table",
  698. "area": "",
  699. "selectTime": "1718534447_1721126447",
  700. "city": "",
  701. "buyerClass": "",
  702. "subtype": "",
  703. "industry": "",
  704. "keyWords": "",
  705. "fileExists": "",
  706. "price": "",
  707. "source": "",
  708. "exportNum": "",
  709. "district": "",
  710. "isRead": "",
  711. "vt": ""
  712. })
  713. return response
  714. #超级订阅用户订阅搜索
  715. def svip_subscription_search(self):
  716. headers = GSTORE['headers']
  717. response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/vType/list", headers=headers, json=
  718. {
  719. "pageNum": 1,
  720. "pageSize": 50,
  721. "format": "table",
  722. "area": "安徽",
  723. "selectTime": "1675094400_1719763199",
  724. "city": "",
  725. "buyerClass": "传媒,采矿业,电信行业,金融业,建筑业,能源化工,农林牧渔,批发零售,信息技术,运输物流,制造业,住宿餐饮",
  726. "subtype": "招标公告,招标,邀标,询价,竞谈,单一,竞价,变更",
  727. "industry": "",
  728. "keyWords": "计算机",
  729. "fileExists": "",
  730. "price": "",
  731. "source": "",
  732. "exportNum": "",
  733. "district": "",
  734. "isRead": "",
  735. "vt": "v"
  736. })
  737. return response
  738. #大会员用户订阅搜索
  739. def bigmember_subscription_search(self):
  740. headers = GSTORE['headers']
  741. response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/mType/list", headers=headers, json=
  742. {
  743. "pageNum": 1,
  744. "pageSize": 50,
  745. "format": "table",
  746. "area": "安徽,北京,甘肃",
  747. "selectTime": "1672502400_1719763199",
  748. "city": "",
  749. "buyerClass": "人大,政协,党委办,组织,宣传,统战,纪委,政府办,发改,财政,教育,科技,工信,民政,民宗,人社,公安,检察院,法院,司法,应急管理,军队,自然资源,生态环境,住建,市政,城管,交通,水利,农业,气象,文旅,卫健委,医疗,学校,档案,体育,政务中心,机关事务,国资委,海关,税务,市场监管,商务,人行,银保监,证监,审计,出版广电,统计,公共资源交易,社会团体",
  750. "subtype": "招标预告,预告,预审,预审结果,论证意见,需求公示,招标结果,中标,成交,废标,流标",
  751. "industry": "",
  752. "keyWords": "信息,科技,能源",
  753. "fileExists": "",
  754. "price": "",
  755. "source": "",
  756. "exportNum": "",
  757. "isRead": "1",
  758. "vt": "m"
  759. })
  760. return response
  761. #新增项目关注
  762. def new_project_attention(self):
  763. headers = GSTORE['headers']
  764. response =self.s.post(f"{cfg.target_host}/bigmember/follow/project/add?sid=ABCY1xaYD0vLD86RHxkcwcvJDAZDSB3dlVkKDgzIDodeGpzfQlUCdA=",headers=headers)
  765. return response
  766. #关注项目地区筛选
  767. def project_screenarea(self):
  768. headers = GSTORE['headers']
  769. response =self.s.get(f"{cfg.target_host}/bigmember/follow/project/screenArea",headers=headers, params={})
  770. return response
  771. #商机管理订阅搜索
  772. def entname_subscription_search(self):
  773. headers = GSTORE['headers']
  774. response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/eType/list", headers=headers, json=
  775. {
  776. "pageNum": 1,
  777. "pageSize": 50,
  778. "format": "table",
  779. "area": "安徽,重庆,河南,江苏",
  780. "selectTime": "1672502400_1719763199",
  781. "city": "",
  782. "buyerClass": "",
  783. "subtype": "招标公告,招标,邀标,询价,竞谈,单一,竞价,变更,招标结果,中标,成交,废标,流标",
  784. "industry": "农林牧渔_生产物资,农林牧渔_生产设备,农林牧渔_相关服务",
  785. "keyWords": "农业,园林,森林",
  786. "fileExists": "",
  787. "price": "",
  788. "source": "1",
  789. "exportNum": "",
  790. "isRead": "",
  791. "vt": "s"
  792. })
  793. return response
  794. #招标采购搜索信息对外接口
  795. def bid_search_api(self):
  796. headers = {
  797. 'Accept-Charset': 'utf-8',
  798. 'timestamp': '1726207205',
  799. 'sign': '1058A958B8D562EA9F2234AC42716778',
  800. 'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
  801. 'Content-Type': 'application/json'
  802. }
  803. response = self.s.post(f"{cfg.target_host_api}/thirdpartyapi/standard/bid/search?appid=jianyuDev", headers=headers, json={
  804. "releaseTimeStart": 1695456870,"keyWord": ["市政粮食"],"searchMode":1})
  805. return response
  806. #招标采购搜索信息普通字段包对外接口
  807. def bid_ordinarypkg(self):
  808. headers = {
  809. 'Accept-Charset': 'utf-8',
  810. 'timestamp': '1726207205',
  811. 'sign': '1058A958B8D562EA9F2234AC42716778',
  812. 'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
  813. 'Content-Type': 'application/json'
  814. }
  815. response = self.s.post(f"{cfg.target_host_api}/thirdpartyapi/standard/bid/ordinarypkg?appid=jianyuDev",
  816. headers=headers, json={"id": "040654015b5f500a1b4774135a57015651085a585c4f4c7605dc"})
  817. return response
  818. # 招标采购搜索信息高级字段包对外接口
  819. def bid_seniorpkg(self):
  820. headers = {
  821. 'Accept-Charset': 'utf-8',
  822. 'timestamp': '1726207205',
  823. 'sign': '1058A958B8D562EA9F2234AC42716778',
  824. 'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
  825. 'Content-Type': 'application/json'
  826. }
  827. response = self.s.post(f"{cfg.target_host_api}/thirdpartyapi/standard/bid/seniorpkg?appid=jianyuDev",
  828. headers=headers,
  829. json={"id": "040654015b5f500a1b4774135a57015651085a585c4f4c7605dc"})
  830. return response
  831. #招标采购信息附件下载接口
  832. def bid_annex(self):
  833. headers = {
  834. 'Accept-Charset': 'utf-8',
  835. 'timestamp': '1726207205',
  836. 'sign': '1058A958B8D562EA9F2234AC42716778',
  837. 'User-Agent': 'Apifox/1.0.0 (https://apifox.com)',
  838. 'Content-Type': 'application/json'
  839. }
  840. response = self.s.post(f"{cfg.target_host_api}/thirdpartyapi/standard/bid/annex?appid=jianyuDev",
  841. headers=headers,
  842. json={"fid":"040507510f0a075618137614500208530c095c500f1814785d44030451"})
  843. return response
  844. #客户标签类型获取
  845. def customer_getLabel(self):
  846. headers = GSTORE['headers']
  847. response = self.s.post(f"{cfg.target_host}/entnicheNew/customer/getLabel", headers=headers, json={})
  848. return response
  849. #商机管理客户关注
  850. def customer_attention(self):
  851. headers = GSTORE['headers']
  852. response = self.s.post(f"{cfg.target_host}/publicapply/customer/attention", headers=headers, json={"name":"石嘴山市交通工程建设管理中心","mold":1,"D":True})
  853. return response
  854. #app登录后获取新用户留资报表
  855. def new_uer_sales(self):
  856. headers = GSTORE['headers']
  857. response = self.s.post(f"{cfg.target_host_app}/salesLeads/appIsNewUerSales", headers=headers, json={})
  858. return response
  859. #定制化分析报告_超前项目
  860. def reports_advanced_projects(self):
  861. headers = GSTORE['headers']
  862. response = self.s.post(f"{cfg.target_host}/leadGeneration/getDate", headers=headers, json={})
  863. return response
  864. #行为采集
  865. def behavior_acquisition(self):
  866. headers = GSTORE['headers']
  867. response = self.s.post(f"{cfg.target_host}/leadGeneration/clickRecord", headers=headers, json={"type":"B"})
  868. return response
  869. #获取样例报告信息
  870. def sample_report_information(self):
  871. headers = GSTORE['headers']
  872. response = self.s.post(f"{cfg.target_host}/salesLeads/sampleReport", headers=headers, json={})
  873. return response
  874. #项目名称联想
  875. def project_name_lenovo(self):
  876. headers = GSTORE['headers']
  877. params = {"pName":[ "科技信息"]}
  878. response = self.s.post(f"{cfg.target_host}/bigmember/analysis/projectName", headers=headers, params=params)
  879. return response
  880. #采购单位名称联想
  881. def buyer_name_lenovo(self):
  882. headers = GSTORE['headers']
  883. params = {
  884. "pName":[ "科技信息"],
  885. "sType":1
  886. }
  887. response = self.s.post(f"{cfg.target_host}/bigmember/analysis/projectName", headers=headers, params=params)
  888. return response
  889. #投标决策分析内容
  890. def bidding_decision_analysis_content(self):
  891. headers = GSTORE['headers']
  892. json = {
  893. "area": {"北京": []},
  894. "buyer": "北京大学",
  895. "buyerContent": [
  896. {
  897. "key": ["设备"],
  898. "matchway": 1
  899. },
  900. {
  901. "key": ["多功能投影仪"],
  902. "matchway": 1
  903. }],
  904. "pname": "",
  905. "limitTime": "fiveYear",
  906. "searchItem": 1,
  907. "searchType": 0,
  908. "page": 1,
  909. "pageSize": 5
  910. }
  911. response = self.s.post(f"{cfg.target_host}/bigmember/decision/decInfo", headers=headers, json=json)
  912. return response
  913. #app新用户报表提交/跳过
  914. def app_new_uer_sales(self):
  915. headers = GSTORE['headers']
  916. json = {
  917. "area##business":"广州,北京",
  918. "company":"剑鱼",
  919. "department":"其他",
  920. "model##business":"投标方",
  921. "position":"职员",
  922. "product##engineering":"交通设施,外工程",
  923. "product##product":"化工用品包装材料,机电设备",
  924. "product##seryice":"广告传媒,餐饮服务"
  925. }
  926. response = self.s.post(f"{cfg.target_host_app}/salesLeads/appNewUerSales", headers=headers, json=json)
  927. return response
  928. # 商机情报详情页
  929. def business_intelligence(self):
  930. headers = GSTORE['headers'] = GSTORE['headers']
  931. response = self.s.post(
  932. f"{cfg.target_host}/bigmember/project/businessDetails?id=ABCY1xZdSlYKD0sAnd6cAcSMTI4DRZjV3diPB40OS8NfGpzZQFUCYI%3D",
  933. headers=headers)
  934. return response
  935. def me_Monitoring(self):
  936. headers = GSTORE['headers']
  937. response = self.s.get(f"{cfg.target_host}/bigmember/project/meMonitoring", headers=headers)
  938. return response
  939. # 要闻
  940. def important_News(self):
  941. heards = GSTORE['headers']
  942. response = self.s.get(f"{cfg.target_host}/front/project/importantNews", headers=heards)
  943. return response
  944. # 文库分类
  945. def jydocs_indexTag(self):
  946. headers = GSTORE['headers']
  947. response = self.s.post(f"{cfg.target_host}/jydocs/indexTag", headers=headers, json={})
  948. return response
  949. # 文库搜索
  950. def jydocs_search(self):
  951. headers = GSTORE["headers"]
  952. response = self.s.post(f"{cfg.target_host}/jydocs/search?keyWord=法律", headers=headers)
  953. return response
  954. # 文库详情
  955. def jydocs_detail(self):
  956. headers = GSTORE['headers']
  957. response = self.s.post(f"{cfg.target_host}/jydocs/detail?docId=docin-4756450426", headers=headers)
  958. return response
  959. # 留资提交2.0
  960. def salesLeads_collectInfo(self):
  961. headers = GSTORE['headers']
  962. response = self.s.post(f"{cfg.target_host}/salesLeads/collectInfo", headers=headers,
  963. json={"source": "article_proposed_project", "name": "质量部测试", "phone": "18211989987",
  964. "mail": "1550987547@qq.com", "industry": "", "company": "质量部测试企业",
  965. "companyType": "投标企业", "position": "总裁", "workScope": "", "partnerNeeds": "",
  966. "agree": True, "branch": ""})
  967. return response
  968. # 留资提交
  969. def salesLeads_retainedCapital(self):
  970. headers = GSTORE['headers']
  971. response = self.s.post(f"{cfg.target_host}/salesLeads/retainedCapital", headers=headers,
  972. params={"source": "article_proposed_project"})
  973. return response
  974. #供应信息附件下载
  975. def supplyInfo_attachment(self):
  976. headers = GSTORE['headers']
  977. response = self.s.post(f"{cfg.target_host}/publicapply/attachment/supplyInfo?msgId=RV9AWV1F&fileName=%E7%8E%8B%E7%BF%94%E5%90%8D%E7%89%87.png", headers=headers,)
  978. return response
  979. #采购联系人
  980. def buyer_contact(self):
  981. header = GSTORE['headers']
  982. response = self.s.post(f"{cfg.target_host}/bigmember/search/buyer/association?name=河南科技大学", headers=header)
  983. return response
  984. #消息查看记录
  985. def msgopenlog(self):
  986. header = GSTORE['headers']
  987. data={
  988. "msgLogId":287204,
  989. "platform":1}
  990. response = self.s.post(f"{cfg.target_host}/jyapi/messageCenter/msgOpenLog",headers=header,json=data)
  991. return response
  992. #查看消息详情
  993. def messagedetail(self):
  994. header = GSTORE['headers']
  995. data={
  996. "msgLogId":240818
  997. }
  998. response = self.s.post(f"{cfg.target_host}/jyapi/messageCenter/messageDetail",headers=header,json=data)
  999. return response
  1000. # 工作桌面商机情报列表
  1001. def workdesk_intelligence(self):
  1002. header = GSTORE['headers']
  1003. data = {
  1004. "msgType": 5,
  1005. "needDealtWithCount": True,
  1006. "offset": 1,
  1007. "size": 5
  1008. }
  1009. response =self.s.post(f"{cfg.target_host}/jyapi/messageCenter/WorkDeskList", headers=header, json=data)
  1010. return response
  1011. #商品积分查询
  1012. def goods_points(self):
  1013. header = GSTORE['headers']
  1014. response = self.s.post(f"{cfg.target_host}/jyintegral/productPoints/introduction",headers=header)
  1015. return response
  1016. #工作桌面首页-我的消息-未读消息数量
  1017. def workdesk_unread_messages(self):
  1018. header = GSTORE['headers']
  1019. json ={
  1020. "size": 20,
  1021. "msgType": -1,
  1022. "offset": 1,
  1023. "isRead": 0,
  1024. "isColumn": False,
  1025. "isColumnNewMsg": False,
  1026. "isContainLetter": False,
  1027. "isMsgList": False
  1028. }
  1029. response =self.s.post(f"{cfg.target_host}/jyapi/messageCenter/MessageList",headers=header,json=json)
  1030. return response
  1031. #一键清空未读消息
  1032. def clear_unread_msg(self):
  1033. header = GSTORE['headers']
  1034. response = self.s.post(f"{cfg.target_host}/jyapi/messageCenter/ClearUnreadMsg",headers = header)
  1035. return response
  1036. #新商机管理-修改关键词设置
  1037. def update_keyword_entnichenew(self):
  1038. header = GSTORE['headers']
  1039. json = {
  1040. "a_items": [
  1041. {
  1042. "a_key": [
  1043. {
  1044. "key": [
  1045. "管理修改"
  1046. ],
  1047. "notkey": [],
  1048. "matchway": 1
  1049. },
  1050. {
  1051. "appendkey": [],
  1052. "key": [
  1053. "软件"
  1054. ],
  1055. "keyindex": 2,
  1056. "matchway": 1,
  1057. "notkey": [],
  1058. "showForm": False,
  1059. "updatetime": 0
  1060. },
  1061. {
  1062. "appendkey": [],
  1063. "key": [
  1064. "科技信息"
  1065. ],
  1066. "keyindex": 3,
  1067. "matchway": 1,
  1068. "notkey": [],
  1069. "showForm": False,
  1070. "updatetime": 0
  1071. }
  1072. ],
  1073. "groupIndex": 0,
  1074. "opened": True,
  1075. "s_item": "科技信息",
  1076. "showForm": False,
  1077. "updatetime": 0
  1078. },
  1079. {
  1080. "a_key": [
  1081. {
  1082. "appendkey": [],
  1083. "key": [
  1084. "工程技术"
  1085. ],
  1086. "keyindex": 0,
  1087. "matchway": 1,
  1088. "notkey": [],
  1089. "showForm": False,
  1090. "updatetime": 0
  1091. },
  1092. {
  1093. "appendkey": [],
  1094. "key": [
  1095. "智慧屏"
  1096. ],
  1097. "keyindex": 1,
  1098. "matchway": 1,
  1099. "notkey": [],
  1100. "showForm": False,
  1101. "updatetime": 0
  1102. },
  1103. {
  1104. "appendkey": [
  1105. "智能设备"
  1106. ],
  1107. "key": [
  1108. "智能"
  1109. ],
  1110. "keyindex": 2,
  1111. "matchway": 1,
  1112. "notkey": [],
  1113. "showForm": False,
  1114. "updatetime": 0
  1115. },
  1116. {
  1117. "appendkey": [],
  1118. "key": [
  1119. "智能"
  1120. ],
  1121. "keyindex": 3,
  1122. "matchway": 1,
  1123. "notkey": [],
  1124. "showForm": False,
  1125. "updatetime": 0
  1126. }
  1127. ],
  1128. "groupIndex": 1,
  1129. "opened": True,
  1130. "s_item": "智能",
  1131. "showForm": False,
  1132. "updatetime": 0
  1133. },
  1134. {
  1135. "a_key": [
  1136. {
  1137. "appendkey": [],
  1138. "key": [
  1139. "物业"
  1140. ],
  1141. "keyindex": 0,
  1142. "matchway": 1,
  1143. "notkey": [],
  1144. "showForm": False,
  1145. "updatetime": 0
  1146. }
  1147. ],
  1148. "groupIndex": 2,
  1149. "opened": True,
  1150. "s_item": "物业",
  1151. "showForm": False,
  1152. "updatetime": 0
  1153. },
  1154. {
  1155. "a_key": [
  1156. {
  1157. "appendkey": [],
  1158. "key": [
  1159. "计算机"
  1160. ],
  1161. "keyindex": 0,
  1162. "matchway": 1,
  1163. "notkey": [],
  1164. "showForm": False,
  1165. "updatetime": 0
  1166. }
  1167. ],
  1168. "groupIndex": 3,
  1169. "opened": True,
  1170. "s_item": "计算机",
  1171. "showForm": False,
  1172. "updatetime": 0
  1173. },
  1174. {
  1175. "a_key": [
  1176. {
  1177. "appendkey": [
  1178. "景观",
  1179. "苗木",
  1180. "栽植",
  1181. "灌木",
  1182. "室外",
  1183. "公路绿化"
  1184. ],
  1185. "key": [
  1186. "绿化"
  1187. ],
  1188. "keyindex": 0,
  1189. "matchway": 1,
  1190. "notkey": [],
  1191. "showForm": False,
  1192. "updatetime": 0
  1193. }
  1194. ],
  1195. "groupIndex": 4,
  1196. "opened": True,
  1197. "s_item": "绿化",
  1198. "showForm": False,
  1199. "updatetime": 0
  1200. },
  1201. {
  1202. "a_key": [
  1203. {
  1204. "appendkey": [],
  1205. "groupIndex": 0,
  1206. "groupName": "1",
  1207. "key": [
  1208. "造价表"
  1209. ],
  1210. "keyIndex": 0,
  1211. "keyindex": 0,
  1212. "matchway": 1,
  1213. "notkey": [
  1214. ""
  1215. ],
  1216. "showForm": False,
  1217. "updatetime": 0
  1218. },
  1219. {
  1220. "appendkey": [],
  1221. "groupIndex": 0,
  1222. "groupName": "1",
  1223. "key": [
  1224. "天气预报"
  1225. ],
  1226. "keyIndex": 1,
  1227. "keyindex": 1,
  1228. "matchway": 1,
  1229. "notkey": [
  1230. ""
  1231. ],
  1232. "showForm": False,
  1233. "updatetime": 0
  1234. },
  1235. {
  1236. "appendkey": [],
  1237. "groupIndex": 0,
  1238. "groupName": "1",
  1239. "key": [
  1240. "鼠标"
  1241. ],
  1242. "keyIndex": 2,
  1243. "keyindex": 2,
  1244. "matchway": 1,
  1245. "notkey": [
  1246. ""
  1247. ],
  1248. "showForm": False,
  1249. "updatetime": 0
  1250. }
  1251. ],
  1252. "groupIndex": 5,
  1253. "opened": True,
  1254. "s_item": "1",
  1255. "showForm": False,
  1256. "updatetime": 0
  1257. },
  1258. {
  1259. "a_key": [],
  1260. "groupIndex": 6,
  1261. "opened": True,
  1262. "s_item": "收不到推送",
  1263. "showForm": False,
  1264. "updatetime": 0
  1265. },
  1266. {
  1267. "a_key": [
  1268. {
  1269. "appendkey": [],
  1270. "groupIndex": 2,
  1271. "groupName": "测试",
  1272. "key": [
  1273. "软件工程"
  1274. ],
  1275. "keyIndex": 0,
  1276. "keyindex": 0,
  1277. "matchway": 1,
  1278. "notkey": [
  1279. ""
  1280. ],
  1281. "showForm": False,
  1282. "updatetime": 0
  1283. },
  1284. {
  1285. "appendkey": [],
  1286. "groupIndex": 2,
  1287. "groupName": "测试",
  1288. "key": [
  1289. "测试"
  1290. ],
  1291. "keyIndex": 1,
  1292. "keyindex": 1,
  1293. "matchway": 1,
  1294. "notkey": [
  1295. ""
  1296. ],
  1297. "showForm": False,
  1298. "updatetime": 0
  1299. },
  1300. {
  1301. "appendkey": [],
  1302. "groupIndex": 2,
  1303. "groupName": "测试",
  1304. "key": [
  1305. "修改"
  1306. ],
  1307. "keyIndex": 2,
  1308. "keyindex": 2,
  1309. "matchway": 1,
  1310. "notkey": [],
  1311. "showForm": False,
  1312. "updatetime": 0
  1313. }
  1314. ],
  1315. "groupIndex": 7,
  1316. "opened": True,
  1317. "s_item": "测试",
  1318. "showForm": False,
  1319. "updatetime": 0
  1320. },
  1321. {
  1322. "a_key": [
  1323. {
  1324. "appendkey": [],
  1325. "key": [
  1326. "医疗"
  1327. ],
  1328. "keyindex": 0,
  1329. "matchway": 1,
  1330. "notkey": [],
  1331. "showForm": False,
  1332. "updatetime": 0
  1333. },
  1334. {
  1335. "appendkey": [],
  1336. "key": [
  1337. "医院"
  1338. ],
  1339. "keyindex": 1,
  1340. "matchway": 1,
  1341. "notkey": [],
  1342. "showForm": False,
  1343. "updatetime": 0
  1344. },
  1345. {
  1346. "appendkey": [],
  1347. "key": [
  1348. "工程"
  1349. ],
  1350. "keyindex": 2,
  1351. "matchway": 1,
  1352. "notkey": [],
  1353. "showForm": False,
  1354. "updatetime": 0
  1355. },
  1356. {
  1357. "appendkey": [],
  1358. "groupIndex": 3,
  1359. "groupName": "信息类",
  1360. "key": [
  1361. "信息"
  1362. ],
  1363. "keyIndex": 0,
  1364. "keyindex": 3,
  1365. "matchway": 1,
  1366. "notkey": [
  1367. ""
  1368. ],
  1369. "showForm": False,
  1370. "updatetime": 0
  1371. },
  1372. {
  1373. "appendkey": [
  1374. "技术"
  1375. ],
  1376. "groupIndex": 3,
  1377. "groupName": "信息类",
  1378. "key": [
  1379. "信息"
  1380. ],
  1381. "keyIndex": 1,
  1382. "keyindex": 4,
  1383. "matchway": 0,
  1384. "notkey": [],
  1385. "showForm": False,
  1386. "updatetime": 0
  1387. },
  1388. {
  1389. "appendkey": [
  1390. "造价"
  1391. ],
  1392. "groupIndex": 3,
  1393. "groupName": "信息类",
  1394. "key": [
  1395. "工程"
  1396. ],
  1397. "keyIndex": 2,
  1398. "keyindex": 5,
  1399. "matchway": 0,
  1400. "notkey": [],
  1401. "showForm": False,
  1402. "updatetime": 0
  1403. }
  1404. ],
  1405. "groupIndex": 8,
  1406. "opened": True,
  1407. "s_item": "信息类",
  1408. "showForm": False,
  1409. "updatetime": 0
  1410. },
  1411. {
  1412. "a_key": [
  1413. {
  1414. "appendkey": [],
  1415. "key": [
  1416. "旅游"
  1417. ],
  1418. "keyindex": 0,
  1419. "matchway": 1,
  1420. "notkey": [
  1421. "游玩"
  1422. ],
  1423. "showForm": False,
  1424. "updatetime": 0
  1425. },
  1426. {
  1427. "appendkey": [
  1428. "分析"
  1429. ],
  1430. "groupIndex": 4,
  1431. "groupName": "软件工程",
  1432. "key": [
  1433. "测试"
  1434. ],
  1435. "keyIndex": 0,
  1436. "keyindex": 1,
  1437. "matchway": 1,
  1438. "notkey": [],
  1439. "showForm": False,
  1440. "updatetime": 0
  1441. }
  1442. ],
  1443. "groupIndex": 9,
  1444. "opened": True,
  1445. "s_item": "软件工程",
  1446. "showForm": False,
  1447. "updatetime": 0
  1448. }
  1449. ],
  1450. "identity": "ent"
  1451. }
  1452. response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/key/update", headers=header,json=json)
  1453. return response
  1454. #获取区域设置
  1455. def entnichenew_area(self):
  1456. headers = GSTORE['headers']
  1457. s = GSTORE['s']
  1458. response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/area/get",headers = headers)
  1459. return response
  1460. apimgr = APIMgr()