From 9ec594ff90e2a8ff586e0e2cb86cdd41a1caca1e Mon Sep 17 00:00:00 2001 From: autosubmit Date: Wed, 16 Aug 2023 18:43:55 +0800 Subject: [PATCH] Auto Submit --- p__Classrooms__Lists__Board__Add__index.async.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/p__Classrooms__Lists__Board__Add__index.async.js b/p__Classrooms__Lists__Board__Add__index.async.js index 4ba2985493..86db0aec51 100644 --- a/p__Classrooms__Lists__Board__Add__index.async.js +++ b/p__Classrooms__Lists__Board__Add__index.async.js @@ -169,31 +169,33 @@ var AddBoard = function AddBoard(_ref) { }, onFinish: /*#__PURE__*/function () { var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(v) { - var _boardsCategoryList$b4, _boardsCategoryList$b5, _boardsCategoryList$b6; + var _v$attachment_ids, _boardsCategoryList$b4, _boardsCategoryList$b5, _boardsCategoryList$b6; var select_board_id, res, _res$data; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: - // v.attachment_ids = v.attachment_ids?.map((v: any) => v.response.id) + v.attachment_ids = (_v$attachment_ids = v.attachment_ids) === null || _v$attachment_ids === void 0 ? void 0 : _v$attachment_ids.map(function (v) { + return v.response.id; + }); select_board_id = boardsCategoryList === null || boardsCategoryList === void 0 ? void 0 : (_boardsCategoryList$b4 = boardsCategoryList.boards) === null || _boardsCategoryList$b4 === void 0 ? void 0 : (_boardsCategoryList$b5 = _boardsCategoryList$b4.filter(function (item) { return item.name == "未分配目录"; })) === null || _boardsCategoryList$b5 === void 0 ? void 0 : (_boardsCategoryList$b6 = _boardsCategoryList$b5[0]) === null || _boardsCategoryList$b6 === void 0 ? void 0 : _boardsCategoryList$b6.id; v = objectSpread2_default()(objectSpread2_default()({}, v), {}, { select_board_id: select_board_id }); - _context.next = 4; + _context.next = 5; return (0,fetch/* default */.ZP)("/api/boards/".concat(params.categoryId, "/messages.json"), { method: "post", body: v }); - case 4: + case 5: res = _context.sent; if (res.status === 0) { (0,util/* trackEvent */.L9)(['教学课堂', '讨论', '发帖']); message/* default.success */.ZP.success("发布成功"); _umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/board/").concat(params.categoryId, "/Detail/").concat(res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.id)); } - case 6: + case 7: case "end": return _context.stop(); }