diff --git a/p__News__Detail__index.async.js b/p__News__Detail__index.async.js index 620b11c35c..937367bd76 100644 --- a/p__News__Detail__index.async.js +++ b/p__News__Detail__index.async.js @@ -983,6 +983,7 @@ var jsx_runtime = __webpack_require__(37712); + var IndexPage = function IndexPage(_ref) { var _data$news_event_tags; var homePage = _ref.homePage, @@ -1218,63 +1219,65 @@ var IndexPage = function IndexPage(_ref) { operations('revoke_public', '撤销公开'); }, children: "\u64A4\u9500\u516C\u5F00" - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { - className: Detailmodules.ehover, - style: { - marginRight: 10 - }, - onClick: function onClick() { - _umi_production_exports.history.push("/news/".concat(params.id, "/edit")); - }, - children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + }), ((0,authority/* isRoleSuperAdmin */.ES)() || (data === null || data === void 0 ? void 0 : data.is_creator)) && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, { + children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", { + className: Detailmodules.ehover, style: { - marginRight: 5 + marginRight: 10 }, - className: "iconfont icon-bianji-moren " - }), "\u7F16\u8F91"] - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { - className: Detailmodules.dhover, - onClick: function onClick() { - modal/* default */.Z.confirm({ - title: '提示', - icon: null, - centered: true, - content: "\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u300A".concat(data === null || data === void 0 ? void 0 : data.title, "\u300B\uFF1F\u5220\u9664\u540E\uFF0C\u5C06\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\u3002"), - onOk: function () { - var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() { - var res; - return regeneratorRuntime_default()().wrap(function _callee5$(_context5) { - while (1) switch (_context5.prev = _context5.next) { - case 0: - _context5.next = 2; - return (0,fetch/* default */.ZP)("/api/news_events/".concat(params.id, ".json"), { - method: 'DELETE' - }); - case 2: - res = _context5.sent; - if (res.status === 0) { - message/* default */.ZP.info('删除成功'); - _umi_production_exports.history.back(); - } - case 4: - case "end": - return _context5.stop(); - } - }, _callee5); - })); - function onOk() { - return _onOk3.apply(this, arguments); - } - return onOk; - }() - }); - }, - children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", { - style: { - marginRight: 5 + onClick: function onClick() { + _umi_production_exports.history.push("/news/".concat(params.id, "/edit")); }, - className: "iconfont icon-shanchutimu " - }), "\u5220\u9664"] + children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + style: { + marginRight: 5 + }, + className: "iconfont icon-bianji-moren " + }), "\u7F16\u8F91"] + }), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { + className: Detailmodules.dhover, + onClick: function onClick() { + modal/* default */.Z.confirm({ + title: '提示', + icon: null, + centered: true, + content: "\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u300A".concat(data === null || data === void 0 ? void 0 : data.title, "\u300B\uFF1F\u5220\u9664\u540E\uFF0C\u5C06\u65E0\u6CD5\u6062\u590D\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C\u3002"), + onOk: function () { + var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() { + var res; + return regeneratorRuntime_default()().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return (0,fetch/* default */.ZP)("/api/news_events/".concat(params.id, ".json"), { + method: 'DELETE' + }); + case 2: + res = _context5.sent; + if (res.status === 0) { + message/* default */.ZP.info('删除成功'); + _umi_production_exports.history.back(); + } + case 4: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + function onOk() { + return _onOk3.apply(this, arguments); + } + return onOk; + }() + }); + }, + children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", { + style: { + marginRight: 5 + }, + className: "iconfont icon-shanchutimu " + }), "\u5220\u9664"] + })] })] })] }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { diff --git a/p__News__index.async.js b/p__News__index.async.js index 058822c682..01cfd70f5a 100644 --- a/p__News__index.async.js +++ b/p__News__index.async.js @@ -333,7 +333,7 @@ var IndexPage = function IndexPage(_ref) { fontWeight: 600 }, children: "\u65B0\u95FB\u52A8\u6001" - }), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { + }), (0,authority/* isSuperAdmins */.Ny)() && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { onClick: function onClick() { _umi_production_exports.history.push("/news/add"); },