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

商品编辑

parent 2e83a3f6
...@@ -43,30 +43,30 @@ class web_request(BaseRequest): ...@@ -43,30 +43,30 @@ class web_request(BaseRequest):
def service_all(self): def service_all(self):
return self.api_send(self.ACCOUNT_URL["service_all"]) return self.api_send(self.ACCOUNT_URL["service_all"])
def file_upload(self, img_type,csrfmiddlewaretoken,id,name,type,lastModifiedDate,size,file): # def file_upload(self, img_type,csrfmiddlewaretoken,id,name,type,lastModifiedDate,size,file):
self.params["img_type"] = img_type # self.params["img_type"] = img_type
self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken # self.params["csrfmiddlewaretoken"] = csrfmiddlewaretoken
self.params["id"] = id # self.params["id"] = id
self.params["name"] = name # self.params["name"] = name
self.params["type"] = type # self.params["type"] = type
self.params["lastModifiedDate"] = lastModifiedDate # self.params["lastModifiedDate"] = lastModifiedDate
self.params["size"] = size # self.params["size"] = size
self.params["file"] = file # self.params["file"] = file
return self.api_send(self.ACCOUNT_URL["file_upload"]) # return self.api_send(self.ACCOUNT_URL["file_upload"])
if __name__ == '__main__': if __name__ == '__main__':
# print(web_request().account_unreadbadgecount()) print(web_request().account_unreadbadgecount())
# print(web_request().article_videotoken()) print(web_request().article_videotoken())
# print(web_request().doctor_submechanisms()) print(web_request().doctor_submechanisms())
# print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g")) print(web_request().service_offline("209992", "PC8uTySuxipukIMuqNV1OPB376C2ZZ3g"))
# print(web_request().conversation(0, 1)) print(web_request().conversation(0, 1))
# print(web_request().conversation_unread_list(1)) print(web_request().conversation_unread_list(1))
# print(web_request().service()) print(web_request().service())
# print("发送") print("发送")
# print(web_request().conversation_diary(602329)) print(web_request().conversation_diary(602329))
# print(web_request().conversation_coupon(602329)) print(web_request().conversation_coupon(602329))
# print(web_request().service_all()) 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)")) # 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 \ No newline at end of file
...@@ -92,18 +92,18 @@ service_all: ...@@ -92,18 +92,18 @@ service_all:
isLogin: 1 isLogin: 1
file_upload: #file_upload:
method: post # method: post
url: /api/web/file/upload # url: /api/web/file/upload
param: {} # param: {}
data: # data:
img_type: ${img_type} # img_type: ${img_type}
csrfmiddlewaretoken: ${csrfmiddlewaretoken} # csrfmiddlewaretoken: ${csrfmiddlewaretoken}
id: ${id} # id: ${id}
name: ${name} # name: ${name}
type: ${type} # type: ${type}
lastModifiedDate: ${lastModifiedDate} # lastModifiedDate: ${lastModifiedDate}
size: ${size} # size: ${size}
file: ${file} # file: ${file}
json: {} # json: {}
isLogin: 1 # isLogin: 1
\ No newline at end of file \ No newline at end of file
develop_host: develop_host:
backend: http://backend.paas-develop.env # backend: http://backend.paas-develop.env
doctor: http://doctor.paas-develop.env doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com # backend: https://backend.igengmei.com
...@@ -73,10 +73,8 @@ class BaseRequest: ...@@ -73,10 +73,8 @@ class BaseRequest:
# proxies={"http":"172.30.9.226:8888"} # proxies={"http":"172.30.9.226:8888"}
) )
<<<<<<< HEAD
print("0000000",r) print("0000000",r)
return r.json() return r.json()
=======
try: try:
content_type = r.headers.get("content-type").split(";")[0] content_type = r.headers.get("content-type").split(";")[0]
except: except:
...@@ -85,7 +83,6 @@ class BaseRequest: ...@@ -85,7 +83,6 @@ class BaseRequest:
return r.json() return r.json()
return r.text return r.text
>>>>>>> fb89a48b68dd9fbb39318e85c4602c5ae880f25b
# 随机生成trace_id # 随机生成trace_id
def trace_id(self): 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