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
c19303f6
Commit
c19303f6
authored
Jul 21, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信登录无痕验证
parent
0018a825
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/components/my/index.js
+3
-2
No files found.
src/components/my/index.js
View file @
c19303f6
...
@@ -8,8 +8,8 @@ import { Link } from "react-router-dom"
...
@@ -8,8 +8,8 @@ import { Link } from "react-router-dom"
import
{
connect
}
from
"react-redux"
import
{
connect
}
from
"react-redux"
import
{
HeaderBar
}
from
"@/common"
import
{
HeaderBar
}
from
"@/common"
import
{
http
}
from
"@/utils"
import
{
http
}
from
"@/utils"
import
{
getCourses
}
from
'./../detail/actions'
;
import
{
setCurrentUser
,
startFetchUser
}
from
"@/store/userAction"
import
{
setCurrentUser
,
startFetchUser
}
from
"@/store/userAction"
import
{
endFetchNoTrace
}
from
'@/store/no-trace-validation/reducer'
const
Item
=
List
.
Item
;
const
Item
=
List
.
Item
;
...
@@ -17,7 +17,7 @@ const Brief = Item.Brief;
...
@@ -17,7 +17,7 @@ const Brief = Item.Brief;
@
connect
(
state
=>
({
@
connect
(
state
=>
({
user
:
state
.
user
,
user
:
state
.
user
,
}),
{
startFetchUser
,
setCurrentUser
})
}),
{
startFetchUser
,
setCurrentUser
,
endFetchNoTrace
})
class
My
extends
PureComponent
{
class
My
extends
PureComponent
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
...
@@ -34,6 +34,7 @@ class My extends PureComponent {
...
@@ -34,6 +34,7 @@ class My extends PureComponent {
getUser
=
()
=>
{
getUser
=
()
=>
{
this
.
props
.
startFetchUser
()
this
.
props
.
startFetchUser
()
http
.
get
(
`
${
API
.
home
}
/m/user_info_sample/1`
).
then
(
res
=>
{
http
.
get
(
`
${
API
.
home
}
/m/user_info_sample/1`
).
then
(
res
=>
{
this
.
props
.
endFetchNoTrace
()
this
.
props
.
setCurrentUser
(
this
.
transformUser
(
res
))
this
.
props
.
setCurrentUser
(
this
.
transformUser
(
res
))
})
})
}
}
...
...
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