autoUpdataFile

dev_local_v9_zzxy
eduauto 1 year ago
parent f769fdeea2
commit 1ca81a41bd

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

@ -845,7 +845,7 @@ var IndexPage = function IndexPage(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
value: devicesValue,
style: {
width: '9vw'
width: '5vw'
},
options: devices,
fieldNames: {
@ -861,7 +861,7 @@ var IndexPage = function IndexPage(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
value: devicesValue1,
style: {
width: '10vw'
width: '5vw'
},
options: devices1,
onChange: function onChange(e) {

@ -178,11 +178,11 @@ 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)("a", {
children: [record !== null && record !== void 0 && record.download_url ? /*#__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", {
}) : '正在生成中', /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",

@ -70,9 +70,6 @@ var _umi_production_exports = __webpack_require__(5841);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(7557);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__(37205);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
@ -131,7 +128,6 @@ var jsx_runtime = __webpack_require__(37712);
/* harmony default export */ var Filebook = (function (_ref) {
var id = _ref.id,
onClose = _ref.onClose;
@ -152,62 +148,53 @@ var jsx_runtime = __webpack_require__(37712);
_useState8 = slicedToArray_default()(_useState7, 2),
list = _useState8[0],
setList = _useState8[1];
console.log('---id', id);
var _useState9 = (0,_react_17_0_2_react.useState)(),
var _useState9 = (0,_react_17_0_2_react.useState)([]),
_useState10 = slicedToArray_default()(_useState9, 2),
images = _useState10[0],
setimages = _useState10[1];
datalist = _useState10[0],
setdatalist = _useState10[1];
console.log('---id', id);
var _useState11 = (0,_react_17_0_2_react.useState)(),
_useState12 = slicedToArray_default()(_useState11, 2),
images = _useState12[0],
setimages = _useState12[1];
(0,_react_17_0_2_react.useEffect)(function () {
if (id) {
getDetail(id);
getColumn(id);
// getColumn(id)
}
}, [id]);
function getDetail(_x) {
return _getDetail.apply(this, arguments);
}
} // const getColumn = async (id: any) => {
// let res = await Fetch(`/api/page_previews.json`, {
// method: 'get',
// params: {
// article_id: '',
// monthly_magazine_id: id,
// limit: 1300,
// }
// })
// if (res?.status === 0) {
// setimages([...res?.data?.list])
// }
// };
function _getDetail() {
_getDetail = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(id) {
var res, _res$data2;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return (0,fetch/* default */.ZP)("/api/monthly_magazines/".concat(id, ".json"), {
mehtod: 'get'
});
case 2:
res = _context2.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
setList(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.articles);
}
case 4:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getDetail.apply(this, arguments);
}
var getColumn = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(id) {
_getDetail = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(id) {
var res, _res$data;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,fetch/* default */.ZP)("/api/page_previews.json", {
method: 'get',
params: {
article_id: '',
monthly_magazine_id: id,
limit: 1300
}
return (0,fetch/* default */.ZP)("/api/monthly_magazines/".concat(id, "/page_previews.json"), {
mehtod: 'get'
});
case 2:
res = _context.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
setimages(toConsumableArray_default()(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list));
setList(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.list) === null || _res$data === void 0 ? void 0 : _res$data.filter(function (item) {
return item === null || item === void 0 ? void 0 : item.article_title;
}));
setdatalist(res === null || res === void 0 ? void 0 : res.data);
}
case 4:
case "end":
@ -215,10 +202,8 @@ var jsx_runtime = __webpack_require__(37712);
}
}, _callee);
}));
return function getColumn(_x2) {
return _ref2.apply(this, arguments);
};
}();
return _getDetail.apply(this, arguments);
}
(0,_react_17_0_2_react.useEffect)(function () {
// 确保 Turn.js 和 jQuery 已加载
setisloading(true);
@ -254,7 +239,8 @@ var jsx_runtime = __webpack_require__(37712);
return list === null || list === void 0 ? void 0 : list.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
style: {
width: '100%'
width: '100%',
padding: 0
},
src: env/* default */.Z.IMG_SERVER + (item === null || item === void 0 ? void 0 : item.download_url)
}, index);
@ -355,7 +341,9 @@ var jsx_runtime = __webpack_require__(37712);
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: MonthlyPreviewmodules.flex,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
href: datalist === null || datalist === void 0 ? void 0 : datalist.download_url,
download: 'pdf',
className: MonthlyPreviewmodules.com_btn,
onClick: function onClick() {},
style: {
@ -374,7 +362,7 @@ var jsx_runtime = __webpack_require__(37712);
console.log('item', item);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: item === null || item === void 0 ? void 0 : item.title
children: item === null || item === void 0 ? void 0 : item.article_title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
marginLeft: 52,

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