Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓莹莹
backend_auto
Commits
353bbacb
Commit
353bbacb
authored
Jun 11, 2021
by
陈雪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品编辑
parent
2e83a3f6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
43 deletions
+40
-43
web_request.py
all_doctor_api/web_request.py
+23
-23
web_request.yaml
all_doctor_api/web_request.yaml
+16
-16
host.yaml
host.yaml
+1
-1
base_request.py
in_common/base_request.py
+0
-3
No files found.
all_doctor_api/web_request.py
View file @
353bbacb
...
...
@@ -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
all_doctor_api/web_request.yaml
View file @
353bbacb
...
...
@@ -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
host.yaml
View file @
353bbacb
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
in_common/base_request.py
View file @
353bbacb
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment