|
|
@ -10,22 +10,22 @@ import SubMenu from 'antd/lib/menu/SubMenu';
|
|
|
|
console.log('course/list')
|
|
|
|
console.log('course/list')
|
|
|
|
const { Paragraph } = Typography;
|
|
|
|
const { Paragraph } = Typography;
|
|
|
|
import cookie from 'react-cookies';
|
|
|
|
import cookie from 'react-cookies';
|
|
|
|
const getList = async (subject_id,chapter_id ) => {
|
|
|
|
// const getList = async (subject_id,chapter_id ) => {
|
|
|
|
// const hide = message.loading('正在配置');
|
|
|
|
// // const hide = message.loading('正在配置');
|
|
|
|
try {
|
|
|
|
// try {
|
|
|
|
const a=await listMyLearningChapterCourse({
|
|
|
|
// const a=await listMyLearningChapterCourse({
|
|
|
|
identity_id:cookie.load('identity_id'),
|
|
|
|
// identity_id:cookie.load('identity_id'),
|
|
|
|
person_id:cookie.load('person_id'),
|
|
|
|
// person_id:cookie.load('person_id'),
|
|
|
|
subject_id:subject_id,
|
|
|
|
// subject_id:subject_id,
|
|
|
|
chapter_id:chapter_id,
|
|
|
|
// chapter_id:chapter_id,
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
// message.success('配置成功');
|
|
|
|
// // message.success('配置成功');
|
|
|
|
return a;
|
|
|
|
// return a;
|
|
|
|
} catch (error) {
|
|
|
|
// } catch (error) {
|
|
|
|
// message.error('配置失败请重试!');
|
|
|
|
// // message.error('配置失败请重试!');
|
|
|
|
return false;
|
|
|
|
// return false;
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
};
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
const CardList = () => {
|
|
|
|
const CardList = () => {
|
|
|
|
const params=useParams();
|
|
|
|
const params=useParams();
|
|
|
@ -40,11 +40,6 @@ const CardList = () => {
|
|
|
|
subject_id:ids[2]
|
|
|
|
subject_id:ids[2]
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},{
|
|
|
|
|
|
|
|
formatResult: (result) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('result',result);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const list = data?.list||[];
|
|
|
|
const list = data?.list||[];
|
|
|
@ -52,8 +47,18 @@ const CardList = () => {
|
|
|
|
const last_data=data?data.last_learning_course:[];
|
|
|
|
const last_data=data?data.last_learning_course:[];
|
|
|
|
const chapter_list=data?data.chapter_list:[];
|
|
|
|
const chapter_list=data?data.chapter_list:[];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const aa = useRequest(() => {
|
|
|
|
|
|
|
|
return listMyLearningChapterCourse({
|
|
|
|
|
|
|
|
identity_id:cookie.load('identity_id'),
|
|
|
|
|
|
|
|
person_id:cookie.load('person_id'),
|
|
|
|
|
|
|
|
subject_id:2,//chapter_list[0].subject_id
|
|
|
|
|
|
|
|
chapter_id:2,//chapter_list[0].chapter_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
console.log('getList',getList)
|
|
|
|
// console.log('getList',getList)
|
|
|
|
// const a=await listMyLearningChapterCourse({
|
|
|
|
// const a=await listMyLearningChapterCourse({
|
|
|
|
// identity_id:cookie.load('identity_id'),
|
|
|
|
// identity_id:cookie.load('identity_id'),
|
|
|
|
// person_id:cookie.load('person_id'),
|
|
|
|
// person_id:cookie.load('person_id'),
|
|
|
@ -62,19 +67,19 @@ const CardList = () => {
|
|
|
|
// });
|
|
|
|
// });
|
|
|
|
},[]);
|
|
|
|
},[]);
|
|
|
|
|
|
|
|
|
|
|
|
if(chapter_list.length!==0){
|
|
|
|
// if(chapter_list.length!==0){
|
|
|
|
|
|
|
|
//
|
|
|
|
// const msg = useRequest(() => {
|
|
|
|
// // const msg = useRequest(() => {
|
|
|
|
// return listMyLearningChapterCourse({
|
|
|
|
// // return listMyLearningChapterCourse({
|
|
|
|
// identity_id:cookie.load('identity_id'),
|
|
|
|
// // identity_id:cookie.load('identity_id'),
|
|
|
|
// person_id:cookie.load('person_id'),
|
|
|
|
// // person_id:cookie.load('person_id'),
|
|
|
|
// subject_id:chapter_list?chapter_list[0].subject_id:'',
|
|
|
|
// // subject_id:chapter_list?chapter_list[0].subject_id:'',
|
|
|
|
// chapter_id:chapter_list?chapter_list[0].chapter_id:'',
|
|
|
|
// // chapter_id:chapter_list?chapter_list[0].chapter_id:'',
|
|
|
|
//
|
|
|
|
// //
|
|
|
|
// });
|
|
|
|
// // });
|
|
|
|
// });
|
|
|
|
// // });
|
|
|
|
// console.log('msg',msg)
|
|
|
|
// // console.log('msg',msg)
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// const msg = await listMyLearningChapterCourse({
|
|
|
|
// const msg = await listMyLearningChapterCourse({
|
|
|
|
// identity_id:cookie.load('identity_id'),
|
|
|
|
// identity_id:cookie.load('identity_id'),
|
|
|
|