Commit 3c0be884 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent 5299d93b
...@@ -15,8 +15,8 @@ import json ...@@ -15,8 +15,8 @@ import json
module = "cmdc_31st" module = "cmdc_31st"
# 第一步登录后台运营系统获取token # 第一步登录后台运营系统获取token
username = commonFuc().get_business_data(module, "username1") username = commonFuc().get_business_data(module, "username4")
password = commonFuc().get_business_data(module, "password1") password = commonFuc().get_business_data(module, "password4")
# 获取登录后Cmdc_access_token # 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token() cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token) headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
...@@ -37,7 +37,7 @@ request_body = commonFuc().get_business_data(module, "payload15") ...@@ -37,7 +37,7 @@ request_body = commonFuc().get_business_data(module, "payload15")
# 发送请求 # 发送请求
result = requests.post(url, json=request_body, headers=headers) result = requests.post(url, json=request_body, headers=headers)
result = json.loads(result.content) result = json.loads(result.content)
print(result) # print(result)
# 生成随机数 # 生成随机数
set_random = random.randint(0, len(result["data"]["list"]) - 1) set_random = random.randint(0, len(result["data"]["list"]) - 1)
# 获取补货设置信息 # 获取补货设置信息
......
...@@ -15,8 +15,8 @@ import json ...@@ -15,8 +15,8 @@ import json
module = "cmdc_31st" module = "cmdc_31st"
# 第一步登录后台运营系统获取token # 第一步登录后台运营系统获取token
username = commonFuc().get_business_data(module, "username1") username = commonFuc().get_business_data(module, "username4")
password = commonFuc().get_business_data(module, "password1") password = commonFuc().get_business_data(module, "password4")
# 获取登录后Cmdc_access_token # 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token() cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token) headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
......
Supports Markdown
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