Merge branches 'dev_aliyun' and 'master' of https://bdgit.educoder.net/Hjqreturn/educoder

dev_forum
杨树明 5 years ago
commit 43ebdbca0c

@ -18,7 +18,7 @@ const ListPageIndex = Loadable({
//课堂首页 //课堂首页
const CoursesHome = Loadable({ const CoursesHome = Loadable({
loader: () => import('./coursesHome/coursesHome'), loader: () => import('./coursesHome/CoursesHome'),
loading:Loading, loading:Loading,
}) })

@ -1,6 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getImageUrl} from 'educoder'; import {getImageUrl} from 'educoder';
import CoursesHomeCard from "./coursesHomeCard.js" import CoursesHomeCard from "./CoursesHomeCard.js"
import axios from 'axios'; import axios from 'axios';
import {Input,Tooltip} from 'antd'; import {Input,Tooltip} from 'antd';
import UpgradeModals from '../../modals/UpgradeModals'; import UpgradeModals from '../../modals/UpgradeModals';
@ -10,7 +10,7 @@ import '@icedesign/base/lib/pagination/style.js';
const Search = Input.Search; const Search = Input.Search;
class coursesHome extends Component{ class CoursesHome extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
@ -160,7 +160,7 @@ class coursesHome extends Component{
) )
} }
} }
export default coursesHome; export default CoursesHome;
// {/*<Pagination showQuickJumper current={page} pageSize={16} total={coursesHomelist.courses_count} onChange={this.onChange} />*/} // {/*<Pagination showQuickJumper current={page} pageSize={16} total={coursesHomelist.courses_count} onChange={this.onChange} />*/}

@ -4,7 +4,7 @@ import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import {Tooltip,Spin,Alert} from 'antd'; import {Tooltip,Spin,Alert} from 'antd';
import ShowSpin from '../../../common/ShowSpin'; import ShowSpin from '../../../common/ShowSpin';
class coursesHomeCard extends Component{ class CoursesHomeCard extends Component{
constructor(props) { constructor(props) {
super(props) super(props)
} }
@ -134,5 +134,5 @@ class coursesHomeCard extends Component{
) )
} }
} }
export default coursesHomeCard; export default CoursesHomeCard;

@ -29,12 +29,14 @@ class ShixunModal extends Component{
axios.get(url).then((result)=>{ axios.get(url).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.message===undefined){
this.setState({ this.setState({
shixunmodallist:result.data, shixunmodallist:result.data,
hometypepvisible:false, hometypepvisible:false,
newshixunmodallist:result.data.shixun_list, newshixunmodallist:result.data.shixun_list,
}) })
} }
}
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
@ -59,7 +61,7 @@ class ShixunModal extends Component{
} }
}).then((result)=>{ }).then((result)=>{
if(result.status===200){ if(result.status===200){
if(result.data.message===undefined){
let shixun_list = result.data.shixun_list; let shixun_list = result.data.shixun_list;
for (var i = 0; i < shixun_list.length; i++) { for (var i = 0; i < shixun_list.length; i++) {
newshixunmodallists.push(shixun_list[i]) newshixunmodallists.push(shixun_list[i])
@ -70,7 +72,7 @@ class ShixunModal extends Component{
hometypepvisible: false hometypepvisible: false
}) })
}
} }
}).catch((error)=>{ }).catch((error)=>{

Loading…
Cancel
Save