feedback_customer_query.py 1.91 KB
# -*- coding: utf-8 -*-
"""
@Time : 2021/8/3 9:11
@Auth : wlm
@File :test_feedback_customer_query.py
@IDE :PyCharm
"""
"""
返还人管理——返还人列表查询
"""
from commons import common as com
from commons.MySession import my,sy1

class feedback_customer_query():
    url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list.action"

    header = {
         "Host": "test.jmsf.diligrp.com:8385",
         "Connection": "keep-alive",
         "Content-Length": "0",
         "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",
         "Accept-Language": "zh-CN,zh;q=0.9",
         "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list",
         "Accept-Encoding": "gzip,deflate",
         "Content-Type": "application/x-www-form-urlencoded",
    }

    body = '''rows=10
        &page=1
        &sort=id
        &order=desc
        &metadata[created]={"provider":"datetimeProvider","index":10,"field":"created"}
        &metadata[status]={"provider":"stateProvider","index":20,"field":"status"}
        &name=潘婷婷
        &createdStart=2021-08-11 00:00:00
        &createdEnd=2021-08-11 23:59:59
        '''


    def __init__(self):
        self.url = feedback_customer_query.url.replace("http://test.", com.get_global_config("global_data", "environment", "en"))
        self.header = feedback_customer_query.header
        self.body = feedback_customer_query.body
        # print(self.body)
# feedback_customer_query = urllib.parse.urlencode(feedback_customer_query())

# fcq = feedback_customer_query
# # # print(fcq.body)
# re = sy1.post(url = fcq.url, data = fcq.body.replace('\n',"").encode('utf-8'),headers = fcq.header,proxies = my.proxies)
# print(re.text)