|
|
|
|
@ -764,12 +764,13 @@ var Collection = function Collection(_ref) {
|
|
|
|
|
btnLoading = _useState4[0],
|
|
|
|
|
setBtnLoading = _useState4[1];
|
|
|
|
|
var childRefs = (0,_react_17_0_2_react.useRef)({});
|
|
|
|
|
var course_id = user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 || (_user$userInfo = _user$userInfo.course) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.course_id;
|
|
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(''),
|
|
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
|
|
cancleId = _useState6[0],
|
|
|
|
|
setCancleId = _useState6[1];
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
course_id: (user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 || (_user$userInfo = _user$userInfo.course) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.course_id) || params.coursesId,
|
|
|
|
|
course_id: course_id || params.coursesId,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
}),
|
|
|
|
|
@ -859,7 +860,7 @@ var Collection = function Collection(_ref) {
|
|
|
|
|
}();
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getCollectionList();
|
|
|
|
|
}, []);
|
|
|
|
|
}, [course_id]);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
|
|
className: Collectionmodules.bg,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
@ -913,7 +914,7 @@ var Collection = function Collection(_ref) {
|
|
|
|
|
onSelectCheckBox: function onSelectCheckBox() {},
|
|
|
|
|
showCheckbox: false,
|
|
|
|
|
ref: function ref(el) {
|
|
|
|
|
return childRefs.current[v.id] = el;
|
|
|
|
|
return childRefs.current[v.question_id] = el;
|
|
|
|
|
}
|
|
|
|
|
}, v.question_id)
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
@ -978,7 +979,7 @@ var Collection = function Collection(_ref) {
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
handleDetailClick(v.id);
|
|
|
|
|
handleDetailClick(v.question_id);
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-chengxinkaoshishengming font14 mr5",
|
|
|
|
|
@ -1029,7 +1030,6 @@ var Collection = function Collection(_ref) {
|
|
|
|
|
setCancleCollectVis(false);
|
|
|
|
|
},
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var _user$userInfo3;
|
|
|
|
|
var bodyParams, res, updatedRefs;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
@ -1038,7 +1038,7 @@ var Collection = function Collection(_ref) {
|
|
|
|
|
bodyParams = {
|
|
|
|
|
container_id: cancleId,
|
|
|
|
|
container_type: 'ExerciseQuestion',
|
|
|
|
|
course_id: (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 || (_user$userInfo3 = _user$userInfo3.course) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.course_id
|
|
|
|
|
course_id: course_id
|
|
|
|
|
};
|
|
|
|
|
_context2.next = 4;
|
|
|
|
|
return (0,service_exercise/* cancleCollectQuestion */._o)(objectSpread2_default()({}, bodyParams));
|