fc_edit.py
1.53 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
# -*- coding: utf-8 -*-
"""
@Time : 2021/7/30 9:55
@Auth : wlm
@File :test_fc_edit.py
@IDE :PyCharm
"""
"""
返还人管理——修改返还人
"""
from commons import common as com
from commons.MySession import my
class fc_edit():
url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/add.action"
header = {
"Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "148",
"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",
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8", "Accept-Language": "zh-CN,zh;q=0.9",
"Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list",
"Accept-Encoding": "gzip,deflate"
}
body = "id=40&name=农交&mobile=18828281176&cardNumber=888810054630"
# body = "id=40&name=农交&mobile=18828281176&cardNumber=888810054630&\
# relationCardTemp=210720133001&relationalCard[0].cardNumber=210720131533"
def __init__(self):
self.url = fc_edit.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") )
self.header = fc_edit.header
self.body = fc_edit.body
# fc=fc_edit()
# print(fc.body)
# re=my.post(url=fc.url,data=fc.body.encode('utf-8'),headers=fc.header)
# print(re.json())
# print(re.headers)