fc_add.py 2.58 KB
# -*- coding: utf-8 -*-
"""
@Time : 2021/7/29 11:18
@Auth : wlm
@File :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",
        "Cookie": "UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4NjU1NzgsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIixcInVzZXJUeXBlXCI6MX0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4NjczNzgsImlhdCI6MTYyNzg2NTU3OCwianRpIjoiMTBhOTY2ZmEtYTAzYS00YTFiLTliYmMtNDIzMTRhN2Y2ZGVmIn0.LnIkAnxYqN75lotTXyIyNn6Mu7qvu4eOqeEhuXcoeWGpJ5_vTYDbOt7VY9EbvN_dNVdaW1LD0Fp0hDWNLu9mUi-RytYo-WgvSM-BBuzCnp9r9CschtW0lmzQhYtvp1GF5FC0FMw1LQB0WVeQjKW8hShwQgD8DqYh_1EWXDgJ3VE; UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5; UAP_firmId=9"
    }
    # body = 'parentId=0&name=框架&mobile=18828273365&cardNumber=888800022857'
    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=FeedbackCustomerController()
# print(fc.body)
# re=my.post(url=fc.url,data=fc.body.encode('utf-8'),headers=fc.header)
# print(re.json())
# print(re.headers)