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
d5bdf898
Commit
d5bdf898
authored
5 years ago
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
click vip to course detail modify in my page
parent
17bb8938
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
src/components/my/index.js
+15
-5
No files found.
src/components/my/index.js
View file @
d5bdf898
...
...
@@ -7,10 +7,14 @@ import {WithTab} from '@/HOCs'
import
{
Link
}
from
"react-router-dom"
import
{
connect
}
from
"react-redux"
import
{
HeaderBar
}
from
"@/common"
import
{
getCourses
}
from
'./../detail/actions'
;
const
Item
=
List
.
Item
;
const
Brief
=
Item
.
Brief
;
@
connect
(
state
=>
({
user
:
state
.
user
}))
class
My
extends
PureComponent
{
constructor
(
props
)
{
super
(
props
)
...
...
@@ -24,6 +28,14 @@ class My extends PureComponent {
this
.
props
.
history
.
push
(
'/passport'
)
}
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
history
.
push
(
`/detail?id=
${
id
}
`
);
return
false
;
}));
}
render
()
{
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
...
...
@@ -64,7 +76,8 @@ class My extends PureComponent {
<
/Link
>
{
(
isVIP
===
0
||
!
isVIP
)
&&
<
Link
className
=
"my-isvip"
to
=
{
`/detail?id=139`
}
><
/Link
>
<
a
href
=
"javascript:;"
className
=
"my-isvip"
onClick
=
{()
=>
this
.
toCourseDetail
(
139
)}
><
/a
>
// <Link className="my-isvip" to={`/detail?id=139`}></Link>
}
<
/List
>
}
...
...
@@ -127,7 +140,4 @@ class My extends PureComponent {
}
export
default
connect
(
state
=>
({
user
:
state
.
user
}),
null
)(
WithTab
(
My
))
export
default
WithTab
(
My
);
This diff is collapsed.
Click to expand it.
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