Commit 39501fcf by zhanghaozhe

tmp

parent 5f544961
...@@ -18,7 +18,8 @@ class Search extends PureComponent { ...@@ -18,7 +18,8 @@ class Search extends PureComponent {
} }
async componentDidMount() { async componentDidMount() {
const data = await api.get(`/m/live/free_list`) const data = await api.get(`/search/search_hot_word`)
console.log(data)
} }
render() { render() {
......
...@@ -42,7 +42,7 @@ class FreeCourse extends PureComponent { ...@@ -42,7 +42,7 @@ class FreeCourse extends PureComponent {
} }
getFreeCourses = () => { getFreeCourses = () => {
return api.get(`/m/free_course/${this.state.page}/${this.state.num}`) return api.get(`/api/m/free_course/${this.state.page}/${this.state.num}`)
} }
getFreeLive = () => { getFreeLive = () => {
......
...@@ -29,7 +29,7 @@ const router = () => ( ...@@ -29,7 +29,7 @@ const router = () => (
<Route path='/my' component={My}/> <Route path='/my' component={My}/>
<Route path='/courselist' component={CourseList}/> <Route path='/courselist' component={CourseList}/>
<Route path='/preferential' component={Preferential}/> <Route path='/preferential' component={Preferential}/>
<Route path='/search' component={Search}/> <Route path='/looking' component={Search}/>
<Route path='/order' component={Order}/> <Route path='/order' component={Order}/>
<Route path='/detail' component={Detail}/> <Route path='/detail' component={Detail}/>
<Route path='/examination' component={Examination}/> <Route path='/examination' component={Examination}/>
......
...@@ -6,6 +6,7 @@ const target = 'http://fast-test.julyedu.com' ...@@ -6,6 +6,7 @@ const target = 'http://fast-test.julyedu.com'
module.exports = function (app) { module.exports = function (app) {
/*
app.use(proxy( app.use(proxy(
'/api', '/api',
{ {
...@@ -16,7 +17,9 @@ module.exports = function (app) { ...@@ -16,7 +17,9 @@ module.exports = function (app) {
} }
}) })
) )
/*app.use(proxy( */
/*
app.use(proxy(
config.home.development, config.home.development,
{ {
target, target,
...@@ -25,9 +28,9 @@ module.exports = function (app) { ...@@ -25,9 +28,9 @@ module.exports = function (app) {
'^/api': '' '^/api': ''
} }
}) })
)*/ )
*/
/*
Object.keys(config).forEach(item => { Object.keys(config).forEach(item => {
app.use(proxy( app.use(proxy(
config[item]['development'], { config[item]['development'], {
...@@ -40,7 +43,6 @@ module.exports = function (app) { ...@@ -40,7 +43,6 @@ module.exports = function (app) {
} }
)) ))
}) })
*/
}; };
......
...@@ -6,7 +6,7 @@ const config = { ...@@ -6,7 +6,7 @@ const config = {
proxy: {} proxy: {}
}, },
search: { search: {
development: '/s', development: '/search',
test: 'https://search.julyedu.com', test: 'https://search.julyedu.com',
production: 'https://search.julyedu.com', production: 'https://search.julyedu.com',
proxy: {} proxy: {}
......
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