Commit 353bbacb authored by 陈雪's avatar 陈雪

商品编辑

parent 2e83a3f6
......@@ -43,30 +43,30 @@ class web_request(BaseRequest):
def service_all(self):
return self.api_send(self.ACCOUNT_URL["service_all"])
def file_upload(self, img_type,csrfmiddlewaretoken,id,name,type,lastModifiedDate,size,file):
self.params["img_type"] = img_type
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
self.params["id"] = id
self.params["name"] = name
self.params["type"] = type
self.params["lastModifiedDate"] = lastModifiedDate
self.params["size"] = size
self.params["file"] = file
return self.api_send(self.ACCOUNT_URL["file_upload"])
# def file_upload(self, img_type,csrfmiddlewaretoken,id,name,type,lastModifiedDate,size,file):
# self.params["img_type"] = img_type
# self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
# self.params["id"] = id
# self.params["name"] = name
# self.params["type"] = type
# self.params["lastModifiedDate"] = lastModifiedDate
# self.params["size"] = size
# self.params["file"] = file
# return self.api_send(self.ACCOUNT_URL["file_upload"])
if __name__ == '__main__':
# print(web_request().account_unreadbadgecount())
# print(web_request().article_videotoken())
# print(web_request().doctor_submechanisms())
# print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
# print(web_request().conversation(0, 1))
# print(web_request().conversation_unread_list(1))
# print(web_request().service())
# print("发送")
# print(web_request().conversation_diary(602329))
# print(web_request().conversation_coupon(602329))
# print(web_request().service_all())
print(web_request().file_upload("19","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g","WU_FILE_0","lADPDg7mQdiUTiLNAZDNAZA_400_400.jpg_720x720g.jpg","image/jpeg","Mon Apr 26 2021 11:29:45 GMT+0800 (中国标准时间)","17688","(binary)"))
\ No newline at end of file
print(web_request().account_unreadbadgecount())
print(web_request().article_videotoken())
print(web_request().doctor_submechanisms())
print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
print(web_request().conversation(0, 1))
print(web_request().conversation_unread_list(1))
print(web_request().service())
print("发送")
print(web_request().conversation_diary(602329))
print(web_request().conversation_coupon(602329))
print(web_request().service_all())
# print(web_request().file_upload("19","PC8uTySuxipukIMuqNV1OPB376C2ZZ3g","WU_FILE_0","lADPDg7mQdiUTiLNAZDNAZA_400_400.jpg_720x720g.jpg","image/jpeg","Mon Apr 26 2021 11:29:45 GMT+0800 (中国标准时间)","17688","(binary)"))
\ No newline at end of file
......@@ -92,18 +92,18 @@ service_all:
isLogin: 1
file_upload:
method: post
url: /api/web/file/upload
param: {}
data:
img_type: ${img_type}
csrfmiddlewaretoken: ${csrfmiddlewaretoken}
id: ${id}
name: ${name}
type: ${type}
lastModifiedDate: ${lastModifiedDate}
size: ${size}
file: ${file}
json: {}
isLogin: 1
\ No newline at end of file
#file_upload:
# method: post
# url: /api/web/file/upload
# param: {}
# data:
# img_type: ${img_type}
# csrfmiddlewaretoken: ${csrfmiddlewaretoken}
# id: ${id}
# name: ${name}
# type: ${type}
# lastModifiedDate: ${lastModifiedDate}
# size: ${size}
# file: ${file}
# json: {}
# isLogin: 1
\ No newline at end of file
develop_host:
backend: http://backend.paas-develop.env
# backend: http://backend.paas-develop.env
doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
......@@ -73,10 +73,8 @@ class BaseRequest:
# proxies={"http":"172.30.9.226:8888"}
)
<<<<<<< HEAD
print("0000000",r)
return r.json()
=======
try:
content_type = r.headers.get("content-type").split(";")[0]
except:
......@@ -85,7 +83,6 @@ class BaseRequest:
return r.json()
return r.text
>>>>>>> fb89a48b68dd9fbb39318e85c4602c5ae880f25b
# 随机生成trace_id
def trace_id(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment