Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-uitest-sow
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiamai-test
xm-uitest-sow
Commits
55370257
Commit
55370257
authored
Aug 04, 2021
by
linguangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化登录频繁后的处理逻辑
parent
d2d4bdff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/framework/common.py
+3
-3
No files found.
src/framework/common.py
View file @
55370257
...
...
@@ -95,7 +95,7 @@ def get_token(user, Terminal = 'SOW-B'):
url
=
"https://gateway.xiaomai5.com/hades/anon/hades/login?storeId=null&token=null&storeUserId=null&userId=null"
r
=
requests
.
post
(
url
=
url
,
data
=
data
,
headers
=
headers
)
try
:
xmtoken
=
r
.
json
()[
"result"
]
[
"xmToken"
]
xmtoken
=
r
.
json
()[
"result"
]
except
Exception
as
e
:
return
r
.
json
()[
"message"
]
return
xmtoken
...
...
@@ -138,7 +138,7 @@ def create_a_live(start_time, start_time2=None, user="lgw-b"):
courseName
=
''
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
8
))
courseName2
=
''
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
8
))
url
=
"https://gateway.xiaomai5.com/hades/public/courseCloud/createLiveCloudCourse?storeId="
\
"&token={}&storeUserId={}&userId={}"
.
format
(
storeId
,
xmtoken
,
storeUserId
,
userId
)
"&token={}&storeUserId={}&userId={}"
.
format
(
storeId
,
xmtoken
[
"xmToken"
]
,
storeUserId
,
userId
)
params
=
{
"adminIds"
:
[],
"calendarTime"
:
[
calendarTime
],
"categoryId"
:
"1386892090935164929"
,
"endTime"
:
endTime
,
"needRecord"
:
"YES"
,
"startTime"
:
startTime
,
"courseName"
:
courseName
,
"storeId"
:
storeId
,
"teacherId"
:
userId
,
...
...
@@ -149,7 +149,7 @@ def create_a_live(start_time, start_time2=None, user="lgw-b"):
"Chrome/91.0.4472.77 Safari/537.36"
,
"storeId"
:
storeId
,
"storeUserId"
:
storeUserId
,
"xmtoken"
:
xmtoken
,
"xmtoken"
:
xmtoken
[
"xmToken"
]
,
"userId"
:
userId
,
"product"
:
"xmCloudClass"
,
"enterpriseId"
:
enterpriseId
}
...
...
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