feedback_customer_query.py
1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- coding: utf-8 -*-
"""
@Time : 2021/8/3 9:11
@Auth : wlm
@File :test_feedback_customer_query.py
@IDE :PyCharm
"""
"""
返还人管理——返还人列表查询
"""
from commons import common as com
from commons.MySession import my,sy1
class feedback_customer_query():
url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list.action"
header = {
"Host": "test.jmsf.diligrp.com:8385",
"Connection": "keep-alive",
"Content-Length": "0",
"Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385",
"X-Requested-With": "XMLHttpRequest",
"User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
"Accept-Language": "zh-CN,zh;q=0.9",
"Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list",
"Accept-Encoding": "gzip,deflate",
"Content-Type": "application/x-www-form-urlencoded",
}
body = '''rows=10
&page=1
&sort=id
&order=desc
&metadata[created]={"provider":"datetimeProvider","index":10,"field":"created"}
&metadata[status]={"provider":"stateProvider","index":20,"field":"status"}
&name=潘婷婷
&createdStart=2021-08-11 00:00:00
&createdEnd=2021-08-11 23:59:59
'''
def __init__(self):
self.url = feedback_customer_query.url.replace("http://test.", com.get_global_config("global_data", "environment", "en"))
self.header = feedback_customer_query.header
self.body = feedback_customer_query.body
# print(self.body)
# feedback_customer_query = urllib.parse.urlencode(feedback_customer_query())
# fcq = feedback_customer_query
# # # print(fcq.body)
# re = sy1.post(url = fcq.url, data = fcq.body.replace('\n',"").encode('utf-8'),headers = fcq.header,proxies = my.proxies)
# print(re.text)