fc_add.py
1.55 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
# -*- coding: utf-8 -*-
"""
@Time : 2021/7/29 11:18
@Auth : wlm
@File :test_fc_edit.py
@IDE :PyCharm
"""
# -*- coding: utf-8 -*-
"""
返还人管理——新增返还人
"""
from commons import common as com
from commons.MySession import my
class fc_add():
url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/add.action"
header = {
"Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "77",
"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 = 'parentId=0&name=你好&mobile=18828281176&cardNumber=888810054630'
# body = "parentId=0&name=你好&mobile=18828281176&cardNumber=888810054630&relationCardTemp=888810054630&relationalCard[0].cardNumber=888810054630"
def __init__(self):
self.url = fc_add.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") )
self.header = fc_add.header
self.body = fc_add.body
# fc = fc_add()
# print(fc.body)
# re = my.post(url = fc.url,data = fc.body.encode('utf-8'),headers = fc.header)
# print(re.json())
# print(re.headers)