Commit f4a9ba01 authored by 张慧's avatar 张慧

Merge branch 'common_dev' into zhanghui_dev

次卡相关接口
parents 681ae0a2 2ded200d
...@@ -2,5 +2,6 @@ develop_host: ...@@ -2,5 +2,6 @@ develop_host:
backend: http://backend.paas-develop.env backend: http://backend.paas-develop.env
om: http://om.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
...@@ -20,8 +20,10 @@ class LoginFunction: ...@@ -20,8 +20,10 @@ class LoginFunction:
for key in hostList: for key in hostList:
if 'backend' == key: if 'backend' == key:
return self.get_develop_session() return self.get_develop_session()
elif 'doctor' == key: if 'doctor' == key:
return self.get_doctor_session() return self.get_doctor_session()
elif 'om' == key:
return self.get_om_session()
def get_develop_session(self): def get_develop_session(self):
url = self.host["develop_host"]["backend"] + self.params["backend_login"]["url"] url = self.host["develop_host"]["backend"] + self.params["backend_login"]["url"]
...@@ -48,6 +50,17 @@ class LoginFunction: ...@@ -48,6 +50,17 @@ class LoginFunction:
) )
return s return s
def get_om_session(self):
url = self.host["develop_host"]["om"] + self.params["om_login"]["url"]
s = requests.session()
r = s.request(
self.params["om_login"]["method"],
url=url,
params=self.params["om_login"]["params"],
data=self.params["om_login"]["data"],
headers={'Connection': 'close'}
)
return s
......
...@@ -30,3 +30,10 @@ doctor_login: ...@@ -30,3 +30,10 @@ doctor_login:
csrfmiddlewaretoken: "PKHywf6cMBZUkc5WfklO71bQNoMztAfv" csrfmiddlewaretoken: "PKHywf6cMBZUkc5WfklO71bQNoMztAfv"
om_login:
method: post
url: /achelous/account/login
params: {}
data:
username: "admin"
password: "123123"
\ No newline at end of file
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