autoUpdataFile

dev_local_v9_zzxy
eduauto 1 year ago
parent 0ef9a4e134
commit 1d43073fdc

@ -29,7 +29,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.8c32bfb2.js"></script>
<script src="/react/build/umi.0e09690f.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -636,7 +636,7 @@ var NewClassroomPage = function NewClassroomPage(_ref) {
};
var handleFinish = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(values) {
var _ref4, course_list_name, credit, name, class_period, endTime, publicClassroom, course_module_types, school, _ref4$set, set, allow_copy, allowed_quit, is_show_conceal, _ref4$student_join_ap, student_join_approve, end_date, postData, res, _res, result, _result$course_module, _res2, _res3;
var _ref4, course_list_name, credit, name, class_period, endTime, publicClassroom, course_module_types, school, _ref4$set, set, allow_copy, allowed_quit, is_show_conceal, _ref4$student_join_ap, student_join_approve, category, end_date, postData, res, _res, result, _result$course_module, _res2, _res3;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
@ -647,7 +647,7 @@ var NewClassroomPage = function NewClassroomPage(_ref) {
message/* default */.ZP.info('课堂信息只有课堂管理员可以调整');
return _context2.abrupt("return");
case 3:
_ref4 = values || {}, course_list_name = _ref4.course, credit = _ref4.credit, name = _ref4.classroom, class_period = _ref4.period, endTime = _ref4.endTime, publicClassroom = _ref4.publicClassroom, course_module_types = _ref4.classModule, school = _ref4.school, _ref4$set = _ref4.set, set = _ref4$set === void 0 ? 0 : _ref4$set, allow_copy = _ref4.allow_copy, allowed_quit = _ref4.allowed_quit, is_show_conceal = _ref4.is_show_conceal, _ref4$student_join_ap = _ref4.student_join_approve, student_join_approve = _ref4$student_join_ap === void 0 ? false : _ref4$student_join_ap;
_ref4 = values || {}, course_list_name = _ref4.course, credit = _ref4.credit, name = _ref4.classroom, class_period = _ref4.period, endTime = _ref4.endTime, publicClassroom = _ref4.publicClassroom, course_module_types = _ref4.classModule, school = _ref4.school, _ref4$set = _ref4.set, set = _ref4$set === void 0 ? 0 : _ref4$set, allow_copy = _ref4.allow_copy, allowed_quit = _ref4.allowed_quit, is_show_conceal = _ref4.is_show_conceal, _ref4$student_join_ap = _ref4.student_join_approve, student_join_approve = _ref4$student_join_ap === void 0 ? false : _ref4$student_join_ap, category = _ref4.category;
end_date = endTime && dayjs_min_default()(endTime).format('YYYY-MM-DD');
postData = {
course_list_name: course_list_name,
@ -662,7 +662,8 @@ var NewClassroomPage = function NewClassroomPage(_ref) {
set: set,
allow_copy: allow_copy,
is_show_conceal: is_show_conceal,
student_join_approve: student_join_approve
student_join_approve: student_join_approve,
category: category
};
if (!isEdit) {
_context2.next = 17;

@ -368,8 +368,8 @@ var Navigation = function Navigation(_ref) {
},
onFinish: ( /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(value) {
var _value$cover_image_id, _value$cover_image_id2;
var url, imgdata, res;
var _value$cover_image_id, _value$cover_image_id2, _imgdata;
var url, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
@ -382,8 +382,7 @@ var Navigation = function Navigation(_ref) {
case 3:
value.cover_image_id = (value === null || value === void 0 || (_value$cover_image_id = value.cover_image_id) === null || _value$cover_image_id === void 0 || (_value$cover_image_id = _value$cover_image_id.response) === null || _value$cover_image_id === void 0 ? void 0 : _value$cover_image_id.id) || (value === null || value === void 0 || (_value$cover_image_id2 = value.cover_image_id) === null || _value$cover_image_id2 === void 0 || (_value$cover_image_id2 = _value$cover_image_id2.file) === null || _value$cover_image_id2 === void 0 || (_value$cover_image_id2 = _value$cover_image_id2.response) === null || _value$cover_image_id2 === void 0 ? void 0 : _value$cover_image_id2.id);
url = params !== null && params !== void 0 && params.id ? "/api/monthly_magazines/".concat(params.id, ".json") : "/api/monthly_magazines.json";
imgdata = JSON.parse(localStorage.getItem('datalist'));
_context.next = 8;
_context.next = 7;
return (0,fetch/* default */.ZP)(url, {
method: params !== null && params !== void 0 && params.id ? 'put' : 'post',
body: objectSpread2_default()(objectSpread2_default()({}, value), {}, {
@ -391,17 +390,16 @@ var Navigation = function Navigation(_ref) {
article_ids: selectlistok === null || selectlistok === void 0 ? void 0 : selectlistok.map(function (item) {
return item.id;
}),
data: (imgdata === null || imgdata === void 0 ? void 0 : imgdata.length) > 0 ? imgdata : undefined
data: ((_imgdata = imgdata) === null || _imgdata === void 0 ? void 0 : _imgdata.length) > 0 ? imgdata : undefined
})
});
case 8:
case 7:
res = _context.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
localStorage.setItem('datalist', JSON.stringify([]));
// message.info('新增成功')
_umi_production_exports.history.push('/magazinever/monthlyadmins');
}
case 10:
case 9:
case "end":
return _context.stop();
}
@ -430,7 +428,7 @@ var Navigation = function Navigation(_ref) {
,
label: "\u5C01\u9762\u56FE:",
rules: [{
required: true,
required: false,
message: '请上传封面图'
}],
children: attachId ? renderImg() : /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, {
@ -485,10 +483,6 @@ var Navigation = function Navigation(_ref) {
type: "primary",
onClick: function onClick() {
var _selectlistok$map;
if (!attachId) {
message/* default */.ZP.info('请选择封面图');
return;
}
if ((selectlistok === null || selectlistok === void 0 ? void 0 : selectlistok.length) === 0) {
message/* default */.ZP.info('请选择文章');
return;
@ -497,7 +491,7 @@ var Navigation = function Navigation(_ref) {
return item === null || item === void 0 ? void 0 : item.id;
})) === null || _selectlistok$map === void 0 ? void 0 : _selectlistok$map.toString()));
},
children: "\u9884\u89C8"
children: "\u8C03\u6574\u6392\u7248"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {

@ -135,7 +135,6 @@ var Journal = function Journal() {
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#165DFF',
cursor: 'pointer'
},
onClick: function onClick() {},
@ -179,10 +178,15 @@ var Journal = function Journal() {
width: 180,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
href: record === null || record === void 0 ? void 0 : record.download_url,
download: "pdf",
children: "\u4E0B\u8F7DPDF"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
cursor: "pointer",
marginLeft: 10
},
onClick: function onClick() {
_umi_production_exports.history.push("/magazinever/monthlyadmins/edit/".concat(record === null || record === void 0 ? void 0 : record.id));

@ -293,7 +293,7 @@ var DragQuestions = function DragQuestions(_ref) {
backgroundColor: "#f4f4f4",
border: "1px solid #ddd",
borderRadius: "4px",
width: '23%',
width: '20%',
position: 'relative'
}, provided.draggableProps.style),
children: [(item === null || item === void 0 ? void 0 : item.category) !== 'directory' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@ -452,32 +452,32 @@ var Navigation = function Navigation(_ref) {
return _getdata.apply(this, arguments);
}
function _getdata() {
_getdata = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _select$get;
_getdata = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var _select$get2;
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context.next = 2;
_context2.next = 2;
return (0,fetch/* default */.ZP)("/api/monthly_magazines/preview.json", {
method: 'Post',
body: {
magazine_id: 1,
monthly_magazine_id: (params === null || params === void 0 ? void 0 : params.id) || '',
cover_image_id: select.get('cover_image_id'),
article_ids: (_select$get = select.get('article_ids')) === null || _select$get === void 0 ? void 0 : _select$get.split(',')
article_ids: (_select$get2 = select.get('article_ids')) === null || _select$get2 === void 0 ? void 0 : _select$get2.split(',')
}
});
case 2:
res = _context.sent;
res = _context2.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
setdatalist(res === null || res === void 0 ? void 0 : res.data);
}
case 4:
case "end":
return _context.stop();
return _context2.stop();
}
}, _callee);
}, _callee2);
}));
return _getdata.apply(this, arguments);
}
@ -492,13 +492,13 @@ var Navigation = function Navigation(_ref) {
imgUrl: logo
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: prviewmodules.reportContent,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: prviewmodules.back_style,
style: {
color: '#fff',
@ -511,7 +511,53 @@ var Navigation = function Navigation(_ref) {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-fanhui2 font12 mr5"
}), "\u8FD4\u56DE"]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: 'red',
marginRight: 20
},
children: "\u70B9\u51FB\u4FDD\u5B58\u540E\u81EA\u52A8\u751F\u6210\u5DF2\u6392\u7248\u7684\u6708\u520A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: prviewmodules.addbutton,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _select$get;
var url, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
url = params !== null && params !== void 0 && params.id ? "/api/monthly_magazines/".concat(params.id, ".json") : "/api/monthly_magazines.json";
_context.next = 3;
return (0,fetch/* default */.ZP)(url, {
method: params !== null && params !== void 0 && params.id ? 'put' : 'post',
body: {
name: select.get('name'),
cover_image_id: select.get('cover_image_id'),
magazine_id: 1,
article_ids: (_select$get = select.get('article_ids')) === null || _select$get === void 0 ? void 0 : _select$get.split(','),
data: datalist
}
});
case 3:
res = _context.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
// message.info('新增成功')
_umi_production_exports.history.push('/magazinever/monthlyadmins');
}
// let res = await Fetch(``)
case 5:
case "end":
return _context.stop();
}
}, _callee);
})),
children: "\u4FDD\u5B58"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: prviewmodules.wrap,
style: {
@ -531,13 +577,13 @@ var Navigation = function Navigation(_ref) {
})]
});
};
/* harmony default export */ var prview = ((0,_umi_production_exports.connect)(function (_ref2) {
var loading = _ref2.loading,
user = _ref2.user,
engineeringNavigtion = _ref2.engineeringNavigtion,
dispatch = _ref2.dispatch,
account = _ref2.account,
classroomList = _ref2.classroomList;
/* harmony default export */ var prview = ((0,_umi_production_exports.connect)(function (_ref3) {
var loading = _ref3.loading,
user = _ref3.user,
engineeringNavigtion = _ref3.engineeringNavigtion,
dispatch = _ref3.dispatch,
account = _ref3.account,
classroomList = _ref3.classroomList;
return objectSpread2_default()(objectSpread2_default()({
loading: loading,
user: user

@ -283,6 +283,7 @@ var jsx_runtime = __webpack_require__(37712);
className: MonthlyPreviewmodules.flex,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: MonthlyPreviewmodules.com_btn,
onClick: function onClick() {},
style: {
marginRight: 20
},

@ -19236,8 +19236,9 @@ var StageItemDom = function StageItemDom(_ref) {
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
if (!(!((_user$userInfo = user.userInfo) !== null && _user$userInfo !== void 0 && _user$userInfo.admin) && !((_user$userInfo2 = user.userInfo) !== null && _user$userInfo2 !== void 0 && _user$userInfo2.business) && !DataProps.can_view)) {
_context9.next = 2;
console.log('---', user);
if (!(!(user !== null && user !== void 0 && (_user$userInfo = user.userInfo) !== null && _user$userInfo !== void 0 && _user$userInfo.admin) && !(user !== null && user !== void 0 && (_user$userInfo2 = user.userInfo) !== null && _user$userInfo2 !== void 0 && _user$userInfo2.business) && !DataProps.can_view)) {
_context9.next = 3;
break;
}
return _context9.abrupt("return", modal/* default */.Z.info({
@ -19250,7 +19251,7 @@ var StageItemDom = function StageItemDom(_ref) {
children: "\u5F53\u524D\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650"
})
}));
case 2:
case 3:
if (DataProps.link) {
(0,video/* viewVideo */.DH)({
is_f: 1,
@ -19260,7 +19261,7 @@ var StageItemDom = function StageItemDom(_ref) {
});
}
(0,util/* openNewWindow */.xg)(DataProps.link || "/video/".concat(DataProps.id, "?subject_id=").concat(params.pathId));
case 4:
case 5:
case "end":
return _context9.stop();
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save