Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
fa2eccfc
Commit
fa2eccfc
authored
Jun 21, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复未登录跳转丢失id问题
parent
41da80ff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
src/components/passport/accountLogin/index.js
+7
-2
src/components/passport/index.js
+0
-1
src/router/router-config.js
+2
-1
No files found.
src/components/passport/accountLogin/index.js
View file @
fa2eccfc
...
...
@@ -17,6 +17,11 @@ import { Toast } from "antd-mobile";
class
AccountLogin
extends
PureComponent
{
componentDidMount
()
{
console
.
log
(
this
.
props
.
location
);
}
render
()
{
const
{
errors
,
...
...
@@ -73,8 +78,8 @@ const formikConfig = {
username
,
password
}).
then
(
res
=>
{
if
(
!
res
.
hasError
)
{
let
{
from
}
=
props
.
location
.
state
||
{
from
:
{
pathname
:
'/'
}}
history
.
replace
(
from
.
pathname
)
let
{
from
}
=
props
.
location
.
state
||
{
from
:
{
pathname
:
'/'
,
search
:
''
}}
history
.
replace
(
{
pathname
:
from
.
pathname
,
search
:
from
.
search
}
)
}
else
{
Toast
.
info
(
res
.
msg
,
2
,
null
,
false
)
}
...
...
src/components/passport/index.js
View file @
fa2eccfc
...
...
@@ -21,7 +21,6 @@ class Passport extends Component {
redirect_url
=
location
.
protocol
+
'//'
+
location
.
hostname
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
...
...
src/router/router-config.js
View file @
fa2eccfc
...
...
@@ -103,7 +103,8 @@ export default [
},
{
path
:
'/play'
,
component
:
Video
component
:
Video
,
isPrivate
:
true
},
{
path
:
'/scholarship'
,
...
...
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