Commit d87ff37b by zhanghaozhe

proxy

parent 8cf60829
import React, { PureComponent } from 'react'
import { Course, Tag } from '../../../common'
import { api } from '@/utils'
import { http, api } from '@/utils'
import './free-courses.scss'
......@@ -42,11 +42,11 @@ class FreeCourse extends PureComponent {
}
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 = () => {
return api.get(`/m/live/free_list`)
return http.get(`${api.home}/m/live/free_list`)
}
render() {
......
import { api } from '@/utils'
import { http, api } from '@/utils'
export const RECEIVE_MY_COURSES = 'RECEIVE_MY_COURSES'
......@@ -22,7 +22,7 @@ export const fetchCoursesListIfNeeded = () => (dispatch, getState) => {
}
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 => {
const {data, code, msg} = res.data
if (data.length === 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment