feedback_order_settlement.py 1.76 KB
# -*- coding: utf-8 -*-
"""
@Time : 2021/7/30 9:44
@Auth : wlm
@File :test_feedback_order_settlement.py
@IDE :PyCharm
"""
from commons import common as com
from commons.MySession import my,sy1
import requests
"""
结账管理——结账
"""
class feedback_order_settlement():
    url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/doSettleAccount.action"
    header = {
         "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "190",
         "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/FeedbackOrderController/list",
         "Accept-Encoding": "gzip,deflate"
        }
    body = "id=25&cardNo=888810057654&settleAmount=2&ids=12034&feedbackCustomerId=25&feedbackCustomerName=验证员工推送到CRM&billIds=3621&settledAmounts=2"
    # body1 = "id=25&cardNo=888810057654&settleAmount=2&ids=11960&feedbackCustomerId=25&feedbackCustomerName=验证员工推送到CRM&billIds=3509&settledAmounts=2"
    def __init__(self):
        self.url = feedback_order_settlement.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") )
        self.header = feedback_order_settlement.header
        self.body = feedback_order_settlement.body

# fos=feedback_order_settlement()
# print(fos.url)
# print(fos.body)
# re=sy1.post(url=fos.url,headers=fos.header,data=fos.body.encode('utf-8'))
# print(re.json())
# print(re.headers)