Commit eb8aa51b authored by wangxuelai's avatar wangxuelai

''

parent dc355e9c
......@@ -1498,7 +1498,6 @@ export default {
},
});
let saveData = null;
console.log(value, 'value');
if (editSingleCourseId == 0) {
saveData = yield call(onlineAjax.createGatherSingleCourse, {
...editSingleCourseInfo,
......@@ -1856,6 +1855,21 @@ export default {
}
}
},
* createCourseMateria({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const {
content, filename, type, uploaderLoading, images,
} = payload;
const createCourseMateriaData = yield call(courseMateriaAjax.createMateria, {
school_id: sid,
type,
src: filename,
content: JSON.stringify({
...content,
images,
}),
});
},
},
reducers: {
save(state, action) {
......
......@@ -1001,6 +1001,22 @@ export default {
},
},
});
// console.log()
// * createCourseMateria({ payload }, { call, put, select }) {
// const { sid } = yield select(state => state.webapp);
// const {
// content, filename, type, uploaderLoading, images,
// } = payload;
// const createCourseMateriaData = yield call(courseMateriaAjax.createMateria, {
// school_id: sid,
// type,
// src: filename,
// content: JSON.stringify({
// ...content,
// images,
// }),
// });
// },
}
} else if (from == 'materia') { // 课件通过素材库选取得到
yield put({
......@@ -1075,6 +1091,21 @@ export default {
});
}
},
* createCourseMateria({ payload }, { call, put, select }) {
const { sid } = yield select(state => state.webapp);
const {
content, filename, type, uploaderLoading, images,
} = payload;
const createCourseMateriaData = yield call(courseMateriaAjax.createMateria, {
school_id: sid,
type,
src: filename,
content: JSON.stringify({
...content,
images,
}),
});
},
},
reducers: {
save(state, action) {
......
......@@ -161,18 +161,6 @@ export default {
images,
}),
});
setTimeout(uploaderLoading);
const { code, data, msg } = createCourseMateriaData;
if (code == 200) {
yield put({
type: 'querymaterialist',
payload: {
params: {},
},
});
} else {
message.error(msg, 1);
}
},
},
reducers: {
......
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