webapi.py 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524
  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 conditions(self):
  1002. header = GSTORE['headers']
  1003. response = self.s.post(f"{cfg.target_host}/front/project/nzj/conditions",headers=header)
  1004. return response
  1005. # 工作桌面商机情报列表
  1006. def workdesk_intelligence(self):
  1007. header = GSTORE['headers']
  1008. data = {
  1009. "msgType": 5,
  1010. "needDealtWithCount": True,
  1011. "offset": 1,
  1012. "size": 5
  1013. }
  1014. response =self.s.post(f"{cfg.target_host}/jyapi/messageCenter/WorkDeskList", headers=header, json=data)
  1015. return response
  1016. #商品积分查询
  1017. def goods_points(self):
  1018. header = GSTORE['headers']
  1019. response = self.s.post(f"{cfg.target_host}/jyintegral/productPoints/introduction",headers=header)
  1020. return response
  1021. #工作桌面首页-我的消息-未读消息数量
  1022. def workdesk_unread_messages(self):
  1023. header = GSTORE['headers']
  1024. json ={
  1025. "size": 20,
  1026. "msgType": -1,
  1027. "offset": 1,
  1028. "isRead": 0,
  1029. "isColumn": False,
  1030. "isColumnNewMsg": False,
  1031. "isContainLetter": False,
  1032. "isMsgList": False
  1033. }
  1034. response =self.s.post(f"{cfg.target_host}/jyapi/messageCenter/MessageList",headers=header,json=json)
  1035. return response
  1036. #一键清空未读消息
  1037. def clear_unread_msg(self):
  1038. header = GSTORE['headers']
  1039. response = self.s.post(f"{cfg.target_host}/jyapi/messageCenter/ClearUnreadMsg",headers = header)
  1040. return response
  1041. #新商机管理-修改关键词设置
  1042. def update_keyword_entnichenew(self):
  1043. header = GSTORE['headers']
  1044. json = {
  1045. "a_items": [
  1046. {
  1047. "a_key": [
  1048. {
  1049. "key": [
  1050. "管理修改"
  1051. ],
  1052. "notkey": [],
  1053. "matchway": 1
  1054. },
  1055. {
  1056. "appendkey": [],
  1057. "key": [
  1058. "软件"
  1059. ],
  1060. "keyindex": 2,
  1061. "matchway": 1,
  1062. "notkey": [],
  1063. "showForm": False,
  1064. "updatetime": 0
  1065. },
  1066. {
  1067. "appendkey": [],
  1068. "key": [
  1069. "科技信息"
  1070. ],
  1071. "keyindex": 3,
  1072. "matchway": 1,
  1073. "notkey": [],
  1074. "showForm": False,
  1075. "updatetime": 0
  1076. }
  1077. ],
  1078. "groupIndex": 0,
  1079. "opened": True,
  1080. "s_item": "科技信息",
  1081. "showForm": False,
  1082. "updatetime": 0
  1083. },
  1084. {
  1085. "a_key": [
  1086. {
  1087. "appendkey": [],
  1088. "key": [
  1089. "工程技术"
  1090. ],
  1091. "keyindex": 0,
  1092. "matchway": 1,
  1093. "notkey": [],
  1094. "showForm": False,
  1095. "updatetime": 0
  1096. },
  1097. {
  1098. "appendkey": [],
  1099. "key": [
  1100. "智慧屏"
  1101. ],
  1102. "keyindex": 1,
  1103. "matchway": 1,
  1104. "notkey": [],
  1105. "showForm": False,
  1106. "updatetime": 0
  1107. },
  1108. {
  1109. "appendkey": [
  1110. "智能设备"
  1111. ],
  1112. "key": [
  1113. "智能"
  1114. ],
  1115. "keyindex": 2,
  1116. "matchway": 1,
  1117. "notkey": [],
  1118. "showForm": False,
  1119. "updatetime": 0
  1120. },
  1121. {
  1122. "appendkey": [],
  1123. "key": [
  1124. "智能"
  1125. ],
  1126. "keyindex": 3,
  1127. "matchway": 1,
  1128. "notkey": [],
  1129. "showForm": False,
  1130. "updatetime": 0
  1131. }
  1132. ],
  1133. "groupIndex": 1,
  1134. "opened": True,
  1135. "s_item": "智能",
  1136. "showForm": False,
  1137. "updatetime": 0
  1138. },
  1139. {
  1140. "a_key": [
  1141. {
  1142. "appendkey": [],
  1143. "key": [
  1144. "物业"
  1145. ],
  1146. "keyindex": 0,
  1147. "matchway": 1,
  1148. "notkey": [],
  1149. "showForm": False,
  1150. "updatetime": 0
  1151. }
  1152. ],
  1153. "groupIndex": 2,
  1154. "opened": True,
  1155. "s_item": "物业",
  1156. "showForm": False,
  1157. "updatetime": 0
  1158. },
  1159. {
  1160. "a_key": [
  1161. {
  1162. "appendkey": [],
  1163. "key": [
  1164. "计算机"
  1165. ],
  1166. "keyindex": 0,
  1167. "matchway": 1,
  1168. "notkey": [],
  1169. "showForm": False,
  1170. "updatetime": 0
  1171. }
  1172. ],
  1173. "groupIndex": 3,
  1174. "opened": True,
  1175. "s_item": "计算机",
  1176. "showForm": False,
  1177. "updatetime": 0
  1178. },
  1179. {
  1180. "a_key": [
  1181. {
  1182. "appendkey": [
  1183. "景观",
  1184. "苗木",
  1185. "栽植",
  1186. "灌木",
  1187. "室外",
  1188. "公路绿化"
  1189. ],
  1190. "key": [
  1191. "绿化"
  1192. ],
  1193. "keyindex": 0,
  1194. "matchway": 1,
  1195. "notkey": [],
  1196. "showForm": False,
  1197. "updatetime": 0
  1198. }
  1199. ],
  1200. "groupIndex": 4,
  1201. "opened": True,
  1202. "s_item": "绿化",
  1203. "showForm": False,
  1204. "updatetime": 0
  1205. },
  1206. {
  1207. "a_key": [
  1208. {
  1209. "appendkey": [],
  1210. "groupIndex": 0,
  1211. "groupName": "1",
  1212. "key": [
  1213. "造价表"
  1214. ],
  1215. "keyIndex": 0,
  1216. "keyindex": 0,
  1217. "matchway": 1,
  1218. "notkey": [
  1219. ""
  1220. ],
  1221. "showForm": False,
  1222. "updatetime": 0
  1223. },
  1224. {
  1225. "appendkey": [],
  1226. "groupIndex": 0,
  1227. "groupName": "1",
  1228. "key": [
  1229. "天气预报"
  1230. ],
  1231. "keyIndex": 1,
  1232. "keyindex": 1,
  1233. "matchway": 1,
  1234. "notkey": [
  1235. ""
  1236. ],
  1237. "showForm": False,
  1238. "updatetime": 0
  1239. },
  1240. {
  1241. "appendkey": [],
  1242. "groupIndex": 0,
  1243. "groupName": "1",
  1244. "key": [
  1245. "鼠标"
  1246. ],
  1247. "keyIndex": 2,
  1248. "keyindex": 2,
  1249. "matchway": 1,
  1250. "notkey": [
  1251. ""
  1252. ],
  1253. "showForm": False,
  1254. "updatetime": 0
  1255. }
  1256. ],
  1257. "groupIndex": 5,
  1258. "opened": True,
  1259. "s_item": "1",
  1260. "showForm": False,
  1261. "updatetime": 0
  1262. },
  1263. {
  1264. "a_key": [],
  1265. "groupIndex": 6,
  1266. "opened": True,
  1267. "s_item": "收不到推送",
  1268. "showForm": False,
  1269. "updatetime": 0
  1270. },
  1271. {
  1272. "a_key": [
  1273. {
  1274. "appendkey": [],
  1275. "groupIndex": 2,
  1276. "groupName": "测试",
  1277. "key": [
  1278. "软件工程"
  1279. ],
  1280. "keyIndex": 0,
  1281. "keyindex": 0,
  1282. "matchway": 1,
  1283. "notkey": [
  1284. ""
  1285. ],
  1286. "showForm": False,
  1287. "updatetime": 0
  1288. },
  1289. {
  1290. "appendkey": [],
  1291. "groupIndex": 2,
  1292. "groupName": "测试",
  1293. "key": [
  1294. "测试"
  1295. ],
  1296. "keyIndex": 1,
  1297. "keyindex": 1,
  1298. "matchway": 1,
  1299. "notkey": [
  1300. ""
  1301. ],
  1302. "showForm": False,
  1303. "updatetime": 0
  1304. },
  1305. {
  1306. "appendkey": [],
  1307. "groupIndex": 2,
  1308. "groupName": "测试",
  1309. "key": [
  1310. "修改"
  1311. ],
  1312. "keyIndex": 2,
  1313. "keyindex": 2,
  1314. "matchway": 1,
  1315. "notkey": [],
  1316. "showForm": False,
  1317. "updatetime": 0
  1318. }
  1319. ],
  1320. "groupIndex": 7,
  1321. "opened": True,
  1322. "s_item": "测试",
  1323. "showForm": False,
  1324. "updatetime": 0
  1325. },
  1326. {
  1327. "a_key": [
  1328. {
  1329. "appendkey": [],
  1330. "key": [
  1331. "医疗"
  1332. ],
  1333. "keyindex": 0,
  1334. "matchway": 1,
  1335. "notkey": [],
  1336. "showForm": False,
  1337. "updatetime": 0
  1338. },
  1339. {
  1340. "appendkey": [],
  1341. "key": [
  1342. "医院"
  1343. ],
  1344. "keyindex": 1,
  1345. "matchway": 1,
  1346. "notkey": [],
  1347. "showForm": False,
  1348. "updatetime": 0
  1349. },
  1350. {
  1351. "appendkey": [],
  1352. "key": [
  1353. "工程"
  1354. ],
  1355. "keyindex": 2,
  1356. "matchway": 1,
  1357. "notkey": [],
  1358. "showForm": False,
  1359. "updatetime": 0
  1360. },
  1361. {
  1362. "appendkey": [],
  1363. "groupIndex": 3,
  1364. "groupName": "信息类",
  1365. "key": [
  1366. "信息"
  1367. ],
  1368. "keyIndex": 0,
  1369. "keyindex": 3,
  1370. "matchway": 1,
  1371. "notkey": [
  1372. ""
  1373. ],
  1374. "showForm": False,
  1375. "updatetime": 0
  1376. },
  1377. {
  1378. "appendkey": [
  1379. "技术"
  1380. ],
  1381. "groupIndex": 3,
  1382. "groupName": "信息类",
  1383. "key": [
  1384. "信息"
  1385. ],
  1386. "keyIndex": 1,
  1387. "keyindex": 4,
  1388. "matchway": 0,
  1389. "notkey": [],
  1390. "showForm": False,
  1391. "updatetime": 0
  1392. },
  1393. {
  1394. "appendkey": [
  1395. "造价"
  1396. ],
  1397. "groupIndex": 3,
  1398. "groupName": "信息类",
  1399. "key": [
  1400. "工程"
  1401. ],
  1402. "keyIndex": 2,
  1403. "keyindex": 5,
  1404. "matchway": 0,
  1405. "notkey": [],
  1406. "showForm": False,
  1407. "updatetime": 0
  1408. }
  1409. ],
  1410. "groupIndex": 8,
  1411. "opened": True,
  1412. "s_item": "信息类",
  1413. "showForm": False,
  1414. "updatetime": 0
  1415. },
  1416. {
  1417. "a_key": [
  1418. {
  1419. "appendkey": [],
  1420. "key": [
  1421. "旅游"
  1422. ],
  1423. "keyindex": 0,
  1424. "matchway": 1,
  1425. "notkey": [
  1426. "游玩"
  1427. ],
  1428. "showForm": False,
  1429. "updatetime": 0
  1430. },
  1431. {
  1432. "appendkey": [
  1433. "分析"
  1434. ],
  1435. "groupIndex": 4,
  1436. "groupName": "软件工程",
  1437. "key": [
  1438. "测试"
  1439. ],
  1440. "keyIndex": 0,
  1441. "keyindex": 1,
  1442. "matchway": 1,
  1443. "notkey": [],
  1444. "showForm": False,
  1445. "updatetime": 0
  1446. }
  1447. ],
  1448. "groupIndex": 9,
  1449. "opened": True,
  1450. "s_item": "软件工程",
  1451. "showForm": False,
  1452. "updatetime": 0
  1453. }
  1454. ],
  1455. "identity": "ent"
  1456. }
  1457. response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/key/update", headers=header,json=json)
  1458. return response
  1459. apimgr = APIMgr()