Commit 5d15ed17780d5e116d4ddd1b1f0bcc2112e1a57d

Authored by liujiqiang
1 parent 16fa7e05

gx

commons/clientSession.py
... ... @@ -11,7 +11,7 @@
11 11  
12 12 import requests
13 13 import json
14   -from commons.readConf import readConfig
  14 +from commons.scripts.readConf import readConfig
15 15  
16 16 class cliSession(object):
17 17 def __init__(self):
... ... @@ -40,7 +40,7 @@ class cliSession(object):
40 40 """
41 41 # 返回登录信息,以及可用headers,clientHeaders用户客户端操作header,webHeaders用于web页面使用headers
42 42 res = requests.post(url=self.loginUrl,data=json.dumps(self.loginData))
43   - print(res.json())
  43 + # print(res.json())
44 44 UAP_accessToken,UAP_refreshToken,UAP_firmId=res.json()["data"]["accessToken"],res.json()["data"]["refreshToken"],res.json()["data"]["user"]["firmId"]
45 45 webHeadersCookie = "UAP_accessToken="+UAP_accessToken+"; UAP_refreshToken="+UAP_refreshToken+";UAP_firmId="+str(UAP_firmId)
46 46 clientHeadersCookie = "UAP_accessToken="+UAP_accessToken+"; UAP_refreshToken="+UAP_refreshToken
... ...
commons/readConf.py renamed to commons/scripts/readConf.py
... ... @@ -22,7 +22,7 @@ class readConfig(object):
22 22 self.file_name = r'test_config_hg'
23 23 self.relative_path = r'/config/marketConfig/'
24 24 self.file_path = os.path.abspath(
25   - os.path.join(os.path.dirname(__file__), "../")) + self.relative_path + self.file_name
  25 + os.path.join(os.path.dirname(__file__), "../../")) + self.relative_path + self.file_name
26 26 print(self.file_path)
27 27 self.conf.read(self.file_path,encoding="utf-8")
28 28  
... ...