fc_edit.py 1.53 KB
# -*- 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)