|
|
|
|
@ -1,9 +1,9 @@
|
|
|
|
|
"use strict";
|
|
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[91958],{
|
|
|
|
|
|
|
|
|
|
/***/ 43467:
|
|
|
|
|
/***/ 78169:
|
|
|
|
|
/*!*****************************************************************************!*\
|
|
|
|
|
!*** ./src/pages/Magazinejor/component/MonthlyDetail/index.tsx + 1 modules ***!
|
|
|
|
|
!*** ./src/pages/Magazinejor/component/MonthlyDetail/index.tsx + 2 modules ***!
|
|
|
|
|
\*****************************************************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
@ -45,7 +45,7 @@ var card = __webpack_require__(18889);
|
|
|
|
|
var _umi_production_exports = __webpack_require__(88271);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/MonthlyDetail/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var MonthlyDetailmodules = ({"flex_box_center":"flex_box_center___XV6rk","flex_space_between":"flex_space_between___TIck0","flex_box_vertical_center":"flex_box_vertical_center___U36lR","flex_box_center_end":"flex_box_center_end___zAwgB","flex_box_column":"flex_box_column___YiqYt","flex-col":"flex-col___bziKA","flex-row":"flex-row___MkOb2","justify-start":"justify-start___OhdDW","justify-center":"justify-center___vBwGn","justify-end":"justify-end___VbsJc","justify-evenly":"justify-evenly___XtI5b","justify-around":"justify-around___UHK4b","justify-between":"justify-between___CoGml","align-start":"align-start___SQk5k","align-center":"align-center___rOnRc","align-end":"align-end___wDDq7","Onerow":"Onerow___lxAe1","MultiLine":"MultiLine___anFa7","detailWrap":"detailWrap___WBknt","detailTop":"detailTop___Inv9X","topLeft":"topLeft___XTJ2B","imgCover":"imgCover___pCsrk","coverimg":"coverimg___C9J1k","imgDes":"imgDes___kEb1A","d1":"d1___qdeEG","d2":"d2___plF4G","label":"label___kTtCF","info":"info___EibxE","d3":"d3___YNxfS","d4":"d4___LZRvd","btn":"btn___PO7DH","topbg":"topbg___Cm5XV","detailCon":"detailCon___WVkej","my_modal":"my_modal___vwP5A","cardname":"cardname___F5pmg","flip-book":"flip-book___rYXO8","page":"page___d0VdV"});
|
|
|
|
|
/* harmony default export */ var MonthlyDetailmodules = ({"flex_box_center":"flex_box_center___XV6rk","flex_space_between":"flex_space_between___TIck0","flex_box_vertical_center":"flex_box_vertical_center___U36lR","flex_box_center_end":"flex_box_center_end___zAwgB","flex_box_column":"flex_box_column___YiqYt","flex-col":"flex-col___bziKA","flex-row":"flex-row___MkOb2","justify-start":"justify-start___OhdDW","justify-center":"justify-center___vBwGn","justify-end":"justify-end___VbsJc","justify-evenly":"justify-evenly___XtI5b","justify-around":"justify-around___UHK4b","justify-between":"justify-between___CoGml","align-start":"align-start___SQk5k","align-center":"align-center___rOnRc","align-end":"align-end___wDDq7","Onerow":"Onerow___lxAe1","MultiLine":"MultiLine___anFa7","detailWrap":"detailWrap___WBknt","detailTop":"detailTop___Inv9X","topLeft":"topLeft___XTJ2B","imgCover":"imgCover___pCsrk","coverimg":"coverimg___C9J1k","imgDes":"imgDes___kEb1A","d1":"d1___qdeEG","d2":"d2___plF4G","label":"label___kTtCF","info":"info___EibxE","d3":"d3___YNxfS","d4":"d4___LZRvd","btn":"btn___PO7DH","topbg":"topbg___Cm5XV","detailCon":"detailCon___WVkej","my_modal":"my_modal___vwP5A","cardname":"cardname___F5pmg","flip-book":"flip-book___rYXO8","page":"page___d0VdV","classnamepage":"classnamepage___QHKtn","close":"close___njENN"});
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
|
|
|
|
|
var dayjs_min = __webpack_require__(61186);
|
|
|
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
|
|
|
@ -55,8 +55,130 @@ var magazine = __webpack_require__(20103);
|
|
|
|
|
var fetch = __webpack_require__(82710);
|
|
|
|
|
// EXTERNAL MODULE: ./src/pages/Magazinejor/img/defaultpage.png
|
|
|
|
|
var defaultpage = __webpack_require__(24362);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
|
|
var env = __webpack_require__(69423);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/MonthlyDetail/Filebook.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var Filebook = (function (_ref) {
|
|
|
|
|
var id = _ref.id,
|
|
|
|
|
onClose = _ref.onClose;
|
|
|
|
|
var flipbookRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
|
|
console.log('---id', id);
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
images = _useState2[0],
|
|
|
|
|
setimages = _useState2[1];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (id) {
|
|
|
|
|
getColumn(id);
|
|
|
|
|
}
|
|
|
|
|
}, [id]);
|
|
|
|
|
var getColumn = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = 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: id,
|
|
|
|
|
limit: 2000
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
|
|
|
setimages(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function getColumn(_x) {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var divs = function divs(list) {
|
|
|
|
|
return list === null || list === void 0 ? void 0 : list.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%'
|
|
|
|
|
},
|
|
|
|
|
src: env/* default */.Z.IMG_SERVER + (item === null || item === void 0 ? void 0 : item.download_url)
|
|
|
|
|
}, index);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
// 确保 Turn.js 和 jQuery 已加载
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
if (window.$ && window.$.fn.turn) {
|
|
|
|
|
// 初始化 Turn.js
|
|
|
|
|
$(flipbookRef.current).turn({
|
|
|
|
|
width: 800,
|
|
|
|
|
height: '100%',
|
|
|
|
|
autoCenter: true
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
console.error('Turn.js 或 jQuery 未加载!');
|
|
|
|
|
}
|
|
|
|
|
}, 2000);
|
|
|
|
|
|
|
|
|
|
// 组件卸载时销毁 Turn.js
|
|
|
|
|
return function () {
|
|
|
|
|
if (flipbookRef.current) {
|
|
|
|
|
$(flipbookRef.current).turn('destroy');
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: MonthlyDetailmodules.classnamepage,
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%',
|
|
|
|
|
background: '#fff',
|
|
|
|
|
zIndex: 10,
|
|
|
|
|
overflow: 'hidden',
|
|
|
|
|
textAlign: 'center',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'center'
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: MonthlyDetailmodules.close,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
title: "\u5173\u95ED",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "",
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
onClose();
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "icon-guanbi1"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
ref: flipbookRef,
|
|
|
|
|
id: "flipbook",
|
|
|
|
|
children: divs(images)
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Magazinejor/component/MonthlyDetail/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -70,7 +192,7 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// import FlipBook from './Filebook';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Journal = function Journal() {
|
|
|
|
|
@ -126,6 +248,10 @@ var Journal = function Journal() {
|
|
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
|
|
columnList = _useState20[0],
|
|
|
|
|
setColumnList = _useState20[1];
|
|
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
|
|
id = _useState22[0],
|
|
|
|
|
setid = _useState22[1];
|
|
|
|
|
var preview = /*#__PURE__*/function () {
|
|
|
|
|
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(item) {
|
|
|
|
|
var res;
|
|
|
|
|
@ -382,7 +508,12 @@ var Journal = function Journal() {
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: MonthlyDetailmodules.detailCon,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(FlipBook, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
|
|
children: [id && /*#__PURE__*/(0,jsx_runtime.jsx)(Filebook, {
|
|
|
|
|
onClose: function onClose() {
|
|
|
|
|
setid('');
|
|
|
|
|
},
|
|
|
|
|
id: id
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
|
|
gutter: [16, 24],
|
|
|
|
|
children: columnList === null || columnList === void 0 || (_columnList$list = columnList.list) === null || _columnList$list === void 0 ? void 0 : _columnList$list.map(function (item) {
|
|
|
|
|
var _item$cover_image;
|
|
|
|
|
@ -391,6 +522,9 @@ var Journal = function Journal() {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(card/* default */.Z, {
|
|
|
|
|
className: MonthlyDetailmodules.cardname,
|
|
|
|
|
hoverable: true,
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setid(item === null || item === void 0 ? void 0 : item.id);
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
width: 260
|
|
|
|
|
},
|