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
d87ff37b
Commit
d87ff37b
authored
Jun 04, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proxy
parent
8cf60829
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
src/components/study/freeCourses/index.js
+3
-3
src/components/study/myCourses/actions.js
+2
-2
No files found.
src/components/study/freeCourses/index.js
View file @
d87ff37b
import
React
,
{
PureComponent
}
from
'react'
import
React
,
{
PureComponent
}
from
'react'
import
{
Course
,
Tag
}
from
'../../../common'
import
{
Course
,
Tag
}
from
'../../../common'
import
{
api
}
from
'@/utils'
import
{
http
,
api
}
from
'@/utils'
import
'./free-courses.scss'
import
'./free-courses.scss'
...
@@ -42,11 +42,11 @@ class FreeCourse extends PureComponent {
...
@@ -42,11 +42,11 @@ class FreeCourse extends PureComponent {
}
}
getFreeCourses
=
()
=>
{
getFreeCourses
=
()
=>
{
return
api
.
get
(
`/api
/m/free_course/
${
this
.
state
.
page
}
/
${
this
.
state
.
num
}
`
)
return
http
.
get
(
`
${
api
.
home
}
/m/free_course/
${
this
.
state
.
page
}
/
${
this
.
state
.
num
}
`
)
}
}
getFreeLive
=
()
=>
{
getFreeLive
=
()
=>
{
return
api
.
get
(
`
/m/live/free_list`
)
return
http
.
get
(
`
${
api
.
home
}
/m/live/free_list`
)
}
}
render
()
{
render
()
{
...
...
src/components/study/myCourses/actions.js
View file @
d87ff37b
import
{
api
}
from
'@/utils'
import
{
http
,
api
}
from
'@/utils'
export
const
RECEIVE_MY_COURSES
=
'RECEIVE_MY_COURSES'
export
const
RECEIVE_MY_COURSES
=
'RECEIVE_MY_COURSES'
...
@@ -22,7 +22,7 @@ export const fetchCoursesListIfNeeded = () => (dispatch, getState) => {
...
@@ -22,7 +22,7 @@ export const fetchCoursesListIfNeeded = () => (dispatch, getState) => {
}
}
export
const
getMyCourses
=
payload
=>
dispatch
=>
{
export
const
getMyCourses
=
payload
=>
dispatch
=>
{
return
api
.
get
(
`
/m/my_course/
${
payload
.
page
}
/
${
payload
.
num
}
`
)
return
http
.
get
(
`
${
api
.
home
}
/m/my_course/
${
payload
.
page
}
/
${
payload
.
num
}
`
)
.
then
(
res
=>
{
.
then
(
res
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
data
.
length
===
0
)
{
if
(
data
.
length
===
0
)
{
...
...
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