Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
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
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
cf715df6
Commit
cf715df6
authored
Apr 14, 2021
by
chenshu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复登录错误
parent
fbd1ada9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
20 deletions
+24
-20
src/modules/root/Login.jsx
+24
-20
No files found.
src/modules/root/Login.jsx
View file @
cf715df6
...
...
@@ -3,7 +3,7 @@ import {
withRouter
}
from
'react-router-dom'
;
import
'./Login.less'
;
import
{
Input
,
Popover
,
message
,
Tabs
,
Button
}
from
'antd'
;
import
{
Input
,
Popover
,
message
,
Tabs
,
Button
}
from
'antd'
;
import
CheckBeforeSendCode
from
'../../components/CheckBeforeSendCode'
;
import
User
from
'@/common/js/user'
;
import
WechatLogin
from
'./WechatLogin'
...
...
@@ -25,25 +25,29 @@ function Login(props) {
const
[
phoneError
,
setPhoneError
]
=
useState
(
false
);
const
[
checkObject1
,
setCheckObject1
]
=
useState
({});
useEffect
(()
=>
{
const
enterpriseId
=
getParameterByName
(
"enterpriseId"
);
const
userId
=
getParameterByName
(
"userId"
);
const
from
=
getParameterByName
(
"from"
);
const
storeId
=
getParameterByName
(
"storeId"
);
if
(
storeId
){
User
.
setCustomerStoreId
(
storeId
);
}
if
(
from
===
'customer'
&&
enterpriseId
&&
userId
){
if
(
!
user
.
getToken
()
||
enterpriseId
!==
user
.
getEnterpriseId
()
){
getWXWorkLoginNoCheck
(
enterpriseId
,
userId
);
}
else
{
window
.
RCHistory
.
push
({
pathname
:
`/switch-route`
,
})
}
useEffect
(()
=>
{
const
enterpriseId
=
getParameterByName
(
"enterpriseId"
);
const
userId
=
getParameterByName
(
"userId"
);
const
from
=
getParameterByName
(
"from"
);
const
storeId
=
getParameterByName
(
"storeId"
);
if
(
storeId
)
{
User
.
setCustomerStoreId
(
storeId
);
}
if
(
from
===
'customer'
&&
enterpriseId
&&
userId
)
{
if
(
!
user
.
getToken
()
||
enterpriseId
!==
user
.
getEnterpriseId
())
{
getWXWorkLoginNoCheck
(
enterpriseId
,
userId
);
}
else
{
window
.
RCHistory
.
push
({
pathname
:
`/switch-route`
,
})
}
},[])
function
getWXWorkLoginNoCheck
(
enterpriseId
,
userId
){
}
else
{
User
.
removeUserId
();
User
.
removeToken
();
User
.
removeEnterpriseId
();
}
},
[])
function
getWXWorkLoginNoCheck
(
enterpriseId
,
userId
)
{
const
params
=
{
appTermEnum
:
"XIAOMAI_CLOUD_CLASS_PC_WEB_ADMIN"
,
enterpriseId
,
...
...
@@ -149,7 +153,7 @@ function Login(props) {
<
div
className=
"login-page"
>
<
div
className=
"login-main"
>
<
div
className=
"left-banner"
>
<
div
><
img
src=
{
require
(
"../../common/images/logo.png"
)
}
alt=
""
style=
{
{
width
:
60
,
height
:
61
}
}
/></
div
>
<
div
><
img
src=
{
require
(
"../../common/images/logo.png"
)
}
alt=
""
style=
{
{
width
:
60
,
height
:
61
}
}
/></
div
>
<
div
className=
"name"
>
小麦企培
</
div
>
<
div
className=
"desc"
>
一键开启直播授课 让知识更有价值
</
div
>
</
div
>
...
...
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