You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1255 lines
55 KiB
1255 lines
55 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[35729],{
|
|
|
|
/***/ 11475:
|
|
/*!******************************************************************************************!*\
|
|
!*** ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules ***!
|
|
\******************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ icons_ExclamationCircleOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/ExclamationCircleOutlined.js
|
|
// This icon file is generated automatically.
|
|
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
|
|
/* harmony default export */ var asn_ExclamationCircleOutlined = (ExclamationCircleOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
var AntdIcon = __webpack_require__(74643);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/ExclamationCircleOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var ExclamationCircleOutlined_ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_ExclamationCircleOutlined
|
|
}));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var icons_ExclamationCircleOutlined = (/*#__PURE__*/react.forwardRef(ExclamationCircleOutlined_ExclamationCircleOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 99611:
|
|
/*!****************************************************************************!*\
|
|
!*** ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***!
|
|
\****************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ icons_EyeOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/EyeOutlined.js
|
|
// This icon file is generated automatically.
|
|
var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" };
|
|
/* harmony default export */ var asn_EyeOutlined = (EyeOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
var AntdIcon = __webpack_require__(74643);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) {
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_EyeOutlined
|
|
}));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var icons_EyeOutlined = (/*#__PURE__*/react.forwardRef(EyeOutlined_EyeOutlined));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 48559:
|
|
/*!**********************************************!*\
|
|
!*** ./src/components/AsyncButton/index.tsx ***!
|
|
\**********************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "Z": function() { return /* binding */ AsyncButton; }
|
|
/* harmony export */ });
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js */ 17061);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/asyncToGenerator.js */ 17156);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js */ 70215);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 71577);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 67294);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["children"];
|
|
|
|
|
|
|
|
var AsyncButton = function AsyncButton(_ref) {
|
|
var children = _ref.children,
|
|
props = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default()(_ref, _excluded);
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
|
|
btnLoading = _useState2[0],
|
|
setBtnLoading = _useState2[1];
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, {
|
|
loading: btnLoading,
|
|
onClick: /*#__PURE__*/function () {
|
|
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(e) {
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.prev = 0;
|
|
setBtnLoading(true);
|
|
_context.next = 4;
|
|
return props.onClick(e);
|
|
case 4:
|
|
setBtnLoading(false);
|
|
_context.next = 11;
|
|
break;
|
|
case 7:
|
|
_context.prev = 7;
|
|
_context.t0 = _context["catch"](0);
|
|
console.error(_context.t0);
|
|
setBtnLoading(false);
|
|
case 11:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee, null, [[0, 7]]);
|
|
}));
|
|
return function (_x) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}(),
|
|
children: children
|
|
}));
|
|
};
|
|
|
|
/***/ }),
|
|
|
|
/***/ 68996:
|
|
/*!**********************************************!*\
|
|
!*** ./src/pages/Help/Index.tsx + 3 modules ***!
|
|
\**********************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ Index; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(27424);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(70215);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(84519);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/form/index.js + 17 modules
|
|
var es_form = __webpack_require__(25159);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 4 modules
|
|
var message = __webpack_require__(2453);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
var row = __webpack_require__(71230);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
|
|
var col = __webpack_require__(15746);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/menu/index.js + 11 modules
|
|
var menu = __webpack_require__(68508);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(21687);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
var es_button = __webpack_require__(71577);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 39 modules
|
|
var modal = __webpack_require__(72423);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(79531);
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
|
|
var markdown_editor = __webpack_require__(55373);
|
|
// EXTERNAL MODULE: ./src/components/AsyncButton/index.tsx
|
|
var AsyncButton = __webpack_require__(48559);
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
var RenderHtml = __webpack_require__(12768);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(59758);
|
|
;// CONCATENATED MODULE: ./src/pages/Help/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Helpmodules = ({"flex_box_center":"flex_box_center___W5itf","flex_space_between":"flex_space_between___gui6v","flex_box_vertical_center":"flex_box_vertical_center___pD9t3","flex_box_center_end":"flex_box_center_end___ocOJP","flex_box_column":"flex_box_column___KhV4h","content":"content____xM73","title":"title___Q0EMb","menu":"menu___dbMGX","contcats":"contcats___uNFhe","cooperatives":"cooperatives___EVJ5n","imgWrp":"imgWrp___wcdFr","btns":"btns___gQP5Z","confirm":"confirm___Igsxy","cancel":"cancel___EPAJA"});
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 5 modules
|
|
var es_radio = __webpack_require__(78045);
|
|
// EXTERNAL MODULE: ./src/utils/verifyLogin.tsx + 2 modules
|
|
var verifyLogin = __webpack_require__(7303);
|
|
;// CONCATENATED MODULE: ./src/pages/Help/Feedback/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Feedbackmodules = ({"wrap":"wrap___AsKly","link":"link___CnaN3"});
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(29427);
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
;// CONCATENATED MODULE: ./src/pages/Help/Feedback/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["user", "globalSetting", "loading", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TextArea = input/* default.TextArea */.Z.TextArea;
|
|
var Feedback = function Feedback(_ref) {
|
|
var user = _ref.user,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var _Form$useForm = es_form/* default.useForm */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
(0,react.useEffect)(function () {
|
|
var _user$userInfo;
|
|
if (!(0,util/* isUnOrNull */.W)((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login)) {
|
|
(0,verifyLogin/* handleVerifyLogin */.o1)(dispatch);
|
|
}
|
|
}, [user.userInfo.login]);
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
|
|
var res, _user$userInfo2;
|
|
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/helps/feedback.json", {
|
|
method: "post",
|
|
body: objectSpread2_default()({}, values)
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
_umi_production_exports.history.push("/messages/".concat((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login, "/message_detail?target_ids=1"));
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function handleFinish(_x) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: "".concat(Feedbackmodules.wrap, " bg-white pl30 pr30 pt30"),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "c-grey-999 line26",
|
|
children: ["\u60F3\u5BF9\u6211\u4EEC\u7684\u5E73\u53F0\u63D0\u4F9B\u529F\u80FD\u5EFA\u8BAE\uFF1F", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u53D1\u73B0\u7F51\u9875\u4E2D\u7684\u95EE\u9898\u6216bug\u60F3\u544A\u8BC9\u6211\u4EEC\uFF1F", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u671F\u671B\u4E0E\u6211\u4EEC\u5C55\u5F00\u5408\u4F5C\uFF1F", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5728\u8FD9\u91CC\u628A\u4F60\u60F3\u8BF4\u7684\u4E00\u5207\u544A\u8BC9\u6211\u4EEC\u5427\uFF1F"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "c-red-ee4 mt20 mb20",
|
|
children: ["* ", /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/help/help_center",
|
|
className: "".concat(Feedbackmodules.link, " c-red-ee4"),
|
|
children: "\u770B\u770B\u5E2E\u52A9\u4E2D\u5FC3\u662F\u5426\u6709\u4F60\u60F3\u8981\u7684\u7B54\u6848"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
layout: "vertical",
|
|
form: form,
|
|
onFinish: handleFinish,
|
|
initialValues: {
|
|
question_kind: "登录注册"
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
label: "\u95EE\u9898\u5206\u7C7B\uFF1A",
|
|
name: "question_kind",
|
|
rules: [{
|
|
required: true,
|
|
message: '不能为空'
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
value: "\u767B\u5F55\u6CE8\u518C",
|
|
children: "\u767B\u5F55\u6CE8\u518C"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
value: "\u4FE1\u606F\u8BA4\u8BC1",
|
|
children: "\u4FE1\u606F\u8BA4\u8BC1"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
value: "\u5B9E\u8BAD\u7F16\u7A0B",
|
|
children: "\u5B9E\u8BAD\u7F16\u7A0B"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
value: "\u5B9E\u8BAD\u8BFE\u7A0B",
|
|
children: "\u5B9E\u8BAD\u8BFE\u7A0B"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
value: "\u8BFE\u5802",
|
|
children: "\u8BFE\u5802"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
value: "\u5176\u5B83",
|
|
children: "\u5176\u5B83"
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
label: "\u95EE\u9898\u9875\u9762\u7F51\u5740\uFF1A",
|
|
name: "url",
|
|
rules: [{
|
|
required: true,
|
|
message: '不能为空'
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
placeholder: "\u53CD\u9988\u5E73\u53F0\u95EE\u9898\uFF0C\u8BF7\u540C\u65F6\u586B\u5199\u5BF9\u5E94\u7684\u95EE\u9898\u9875\u9762\u94FE\u63A5\uFF0C\u4EE5\u4FBF\u5E73\u53F0\u80FD\u591F\u53CA\u65F6\u8DDF\u8E2A\u89E3\u51B3\uFF0C\u8C22\u8C22"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
label: "\u95EE\u9898\u63CF\u8FF0\uFF1A",
|
|
name: "description",
|
|
rules: [{
|
|
required: true,
|
|
message: '不能为空'
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
rows: 4,
|
|
placeholder: "\u53CD\u9988\u5E73\u53F0\u95EE\u9898\uFF0C\u8BF7\u540C\u65F6\u586B\u5199\u5BF9\u5E94\u7684\u95EE\u9898\u9875\u9762\u94FE\u63A5\uFF0C\u4EE5\u4FBF\u5E73\u53F0\u80FD\u591F\u53CA\u65F6\u8DDF\u8E2A\u89E3\u51B3\uFF0C\u8C22\u8C22"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
type: "primary",
|
|
htmlType: "submit",
|
|
children: "\u63D0\u4EA4"
|
|
})
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Help_Feedback = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
var user = _ref3.user,
|
|
loading = _ref3.loading,
|
|
globalSetting = _ref3.globalSetting;
|
|
return {
|
|
user: user,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.index
|
|
};
|
|
})(Feedback));
|
|
;// CONCATENATED MODULE: ./src/pages/Help/Index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
var Index_excluded = ["user", "globalSetting", "loading", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var UserPage = function UserPage(_ref) {
|
|
var _MenuArr$filter3, _MenuArr$filter4, _MenuArr$filter5, _user$userInfo, _data$contacts, _user$userInfo3, _data$data;
|
|
var user = _ref.user,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
props = objectWithoutProperties_default()(_ref, Index_excluded);
|
|
var _useState = (0,react.useState)({
|
|
content: "",
|
|
message: "",
|
|
status: 0,
|
|
contacts: [],
|
|
address: "",
|
|
data: []
|
|
}),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
data = _useState2[0],
|
|
setData = _useState2[1];
|
|
var _useState3 = (0,react.useState)(true),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
isLoading = _useState4[0],
|
|
setIsLoading = _useState4[1];
|
|
var _Form$useForm = es_form/* default.useForm */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
var _useState5 = (0,react.useState)(null),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
mddata = _useState6[0],
|
|
setmdData = _useState6[1];
|
|
var _useState7 = (0,react.useState)(0),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
contacttype = _useState8[0],
|
|
setcontactType = _useState8[1];
|
|
var _useState9 = (0,react.useState)(false),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
isedit = _useState10[0],
|
|
setisedit = _useState10[1];
|
|
var _useState11 = (0,react.useState)(false),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
isedit1 = _useState12[0],
|
|
setisedit1 = _useState12[1];
|
|
var _useState13 = (0,react.useState)(mddata === null || mddata === void 0 ? void 0 : mddata.content),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
defaultcontent = _useState14[0],
|
|
setDefaultcontent = _useState14[1];
|
|
var MenuArr = [{
|
|
name: "关于我们",
|
|
key: "about_us",
|
|
id: "about",
|
|
editable: true
|
|
}, {
|
|
name: "加入我们",
|
|
key: "join_us",
|
|
id: "join_us",
|
|
editable: true
|
|
}, {
|
|
name: "联系我们",
|
|
key: "contact_us",
|
|
id: "contact"
|
|
}, {
|
|
name: "合作伙伴",
|
|
key: "cooperatives",
|
|
id: "cooperatives"
|
|
}, {
|
|
name: "服务协议",
|
|
key: "agreement",
|
|
id: "agreement",
|
|
editable: true
|
|
}, {
|
|
name: "帮助中心",
|
|
key: "help_center",
|
|
id: "help_center",
|
|
editable: true
|
|
}, {
|
|
name: "意见反馈",
|
|
key: "feedback",
|
|
id: "feedback"
|
|
}].filter(function (item) {
|
|
var _globalSetting$settin;
|
|
if (globalSetting !== null && globalSetting !== void 0 && (_globalSetting$settin = globalSetting.setting) !== null && _globalSetting$settin !== void 0 && _globalSetting$settin.is_local) return item.name !== '关于我们';else return true;
|
|
});
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var _MenuArr$filter, _MenuArr$filter$, _MenuArr$filter2, _MenuArr$filter2$;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
if (!(location.pathname.indexOf("/feedback") === -1)) {
|
|
_context.next = 6;
|
|
break;
|
|
}
|
|
_context.t0 = setData;
|
|
_context.next = 4;
|
|
return (0,fetch/* default */.ZP)("/api/helps/".concat((_MenuArr$filter = MenuArr.filter(function (item) {
|
|
return item.key === params["id"];
|
|
})) === null || _MenuArr$filter === void 0 ? void 0 : (_MenuArr$filter$ = _MenuArr$filter[0]) === null || _MenuArr$filter$ === void 0 ? void 0 : _MenuArr$filter$["id"], ".json"), {
|
|
method: "get"
|
|
});
|
|
case 4:
|
|
_context.t1 = _context.sent;
|
|
(0, _context.t0)(_context.t1);
|
|
case 6:
|
|
setIsLoading(false);
|
|
(0,util/* setDocumentTitle */.Dk)((_MenuArr$filter2 = MenuArr.filter(function (item) {
|
|
return item.key === params.id;
|
|
})) === null || _MenuArr$filter2 === void 0 ? void 0 : (_MenuArr$filter2$ = _MenuArr$filter2[0]) === null || _MenuArr$filter2$ === void 0 ? void 0 : _MenuArr$filter2$['name']);
|
|
case 8:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function getData() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
//修改内容回调接口
|
|
function updateItem() {
|
|
return _updateItem.apply(this, arguments);
|
|
}
|
|
function _updateItem() {
|
|
_updateItem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
_context4.next = 2;
|
|
return (0,fetch/* default */.ZP)('/api/helps/update_content.json', {
|
|
method: 'put',
|
|
body: {
|
|
type: params.id,
|
|
content: defaultcontent
|
|
}
|
|
});
|
|
case 2:
|
|
res = _context4.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default.info */.ZP.info('提交成功');
|
|
setisedit(false);
|
|
setIsLoading(true);
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return _updateItem.apply(this, arguments);
|
|
}
|
|
(0,react.useEffect)(function () {
|
|
setIsLoading(true);
|
|
getData();
|
|
}, [params.id]);
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "edu-container mt30",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
gutter: [20, 20],
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z, {
|
|
className: Helpmodules.menu,
|
|
style: {
|
|
width: 174
|
|
},
|
|
defaultSelectedKeys: [(_MenuArr$filter3 = MenuArr.filter(function (item) {
|
|
return item.key === params.id;
|
|
})) === null || _MenuArr$filter3 === void 0 ? void 0 : _MenuArr$filter3[0]['key']],
|
|
mode: "inline",
|
|
children: MenuArr.map(function (item, key) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default.Item */.Z.Item, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
to: "/help/".concat(item.key),
|
|
onClick: function onClick() {
|
|
setisedit(false);
|
|
setmdData(null);
|
|
},
|
|
children: item.name
|
|
})
|
|
}, item.key);
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("h1", {
|
|
className: Helpmodules.title,
|
|
children: [(_MenuArr$filter4 = MenuArr.filter(function (item) {
|
|
return item.key === params.id;
|
|
})) === null || _MenuArr$filter4 === void 0 ? void 0 : _MenuArr$filter4[0]['name'], ((_MenuArr$filter5 = MenuArr.filter(function (item) {
|
|
return item.key === params.id;
|
|
})) === null || _MenuArr$filter5 === void 0 ? void 0 : _MenuArr$filter5[0]['editable']) && (user === null || user === void 0 ? void 0 : (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.role) === 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
style: {
|
|
"float": 'right',
|
|
color: '#165DFF'
|
|
},
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
setisedit(true);
|
|
_context2.next = 3;
|
|
return (0,fetch/* default */.ZP)('/api/helps/edit_content.json', {
|
|
params: {
|
|
type: params.id
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context2.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
setmdData(res);
|
|
console.log(res);
|
|
}
|
|
case 5:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
})),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-bianji10 font14",
|
|
style: {
|
|
color: '#165DFF'
|
|
}
|
|
}), " \u7F16\u8F91"]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "minH500",
|
|
children: params.id === "feedback" ? /*#__PURE__*/(0,jsx_runtime.jsx)(Help_Feedback, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton/* default */.Z, {
|
|
loading: isLoading,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: [Helpmodules.content, "bg-white pl30 pr30 pt30"].join(' '),
|
|
children: [isedit ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
|
|
defaultValue: mddata === null || mddata === void 0 ? void 0 : mddata.content,
|
|
onChange: function onChange(e) {
|
|
return setDefaultcontent(e);
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Helpmodules.btns,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
className: Helpmodules.cancel,
|
|
onClick: function onClick() {
|
|
return setisedit(false);
|
|
},
|
|
children: "\u53D6\u6D88"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
|
|
className: Helpmodules.confirm,
|
|
type: "primary",
|
|
onClick: updateItem,
|
|
children: "\u4FDD\u5B58\u66F4\u6539"
|
|
})]
|
|
})]
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
value: data.content || ''
|
|
})
|
|
}), (_data$contacts = data.contacts) === null || _data$contacts === void 0 ? void 0 : _data$contacts.map(function (item, key) {
|
|
var _user$userInfo2;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
className: Helpmodules.contcats,
|
|
children: [(user === null || user === void 0 ? void 0 : (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.role) === 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
style: {
|
|
"float": 'right',
|
|
color: '#165DFF'
|
|
},
|
|
onClick: function onClick() {
|
|
setisedit1(true);
|
|
setcontactType(key + 1);
|
|
form.setFieldsValue({
|
|
name: item.name,
|
|
qq: item.qq,
|
|
mail: item.mail
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-bianji10 font14",
|
|
style: {
|
|
color: '#165DFF'
|
|
}
|
|
}), " \u7F16\u8F91"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
children: item.type
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u8054\u7CFB\u4EBA:"
|
|
}), item.name]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "QQ:"
|
|
}), item.qq]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "Email:"
|
|
}), item.mail]
|
|
})]
|
|
}, key);
|
|
}), data.address && /*#__PURE__*/(0,jsx_runtime.jsxs)("ul", {
|
|
className: Helpmodules.contcats,
|
|
children: [(user === null || user === void 0 ? void 0 : (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.role) === 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
style: {
|
|
"float": 'right',
|
|
color: '#165DFF'
|
|
},
|
|
onClick: function onClick() {
|
|
setisedit1(true);
|
|
setcontactType(4);
|
|
form.setFieldsValue({
|
|
address: data.address
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-bianji10 font14",
|
|
style: {
|
|
color: '#165DFF'
|
|
}
|
|
}), " \u7F16\u8F91"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
children: "\u516C\u53F8\u5730\u5740"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
children: data.address
|
|
})]
|
|
}), (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.map(function (item, key) {
|
|
var _item$values;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Helpmodules.cooperatives,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h1", {
|
|
children: item.name
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
gutter: [10, 20],
|
|
children: (_item$values = item.values) === null || _item$values === void 0 ? void 0 : _item$values.map(function (v, k) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
span: 6,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Helpmodules.imgWrp,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
src: env/* default.IMG_SERVER */.Z.IMG_SERVER + v.img
|
|
})
|
|
})
|
|
});
|
|
})
|
|
})]
|
|
});
|
|
})]
|
|
})
|
|
})
|
|
})]
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
centered: true,
|
|
title: "\u7F16\u8F91",
|
|
open: isedit1,
|
|
okText: "\u786E\u5B9A",
|
|
cancelText: "\u53D6\u6D88",
|
|
destroyOnClose: true,
|
|
onCancel: function onCancel() {
|
|
setisedit1(false);
|
|
},
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
var formValue, res;
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
_context3.t0 = (objectSpread2_default());
|
|
_context3.t1 = {};
|
|
_context3.next = 4;
|
|
return form.validateFields();
|
|
case 4:
|
|
_context3.t2 = _context3.sent;
|
|
formValue = (0, _context3.t0)(_context3.t1, _context3.t2);
|
|
_context3.next = 8;
|
|
return (0,fetch/* default */.ZP)("/api/helps/update_contact.json", {
|
|
method: 'put',
|
|
body: objectSpread2_default()(objectSpread2_default()({}, formValue), {}, {
|
|
type: contacttype
|
|
})
|
|
});
|
|
case 8:
|
|
res = _context3.sent;
|
|
if (res.status === 0) {
|
|
message/* default.success */.ZP.success('修改成功');
|
|
getData();
|
|
setisedit1(false);
|
|
}
|
|
case 10:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
})),
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
form: form,
|
|
labelAlign: "right",
|
|
labelCol: {
|
|
span: 4
|
|
},
|
|
scrollToFirstError: true,
|
|
children: [contacttype !== 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
label: "\u8054\u7CFB\u4EBA",
|
|
name: "name",
|
|
placeholder: "\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
maxLength: 60,
|
|
size: "large",
|
|
style: {
|
|
height: 40,
|
|
marginTop: '-4px'
|
|
}
|
|
})
|
|
}), contacttype !== 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
label: "QQ",
|
|
name: "qq",
|
|
placeholder: "\u8BF7\u8F93\u5165QQ",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
maxLength: 60,
|
|
size: "large",
|
|
style: {
|
|
height: 40,
|
|
marginTop: '-4px'
|
|
}
|
|
})
|
|
}), contacttype !== 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
label: "Email",
|
|
name: "mail",
|
|
placeholder: "\u8BF7\u8F93\u5165Email",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
maxLength: 60,
|
|
size: "large",
|
|
style: {
|
|
height: 40,
|
|
marginTop: '-4px'
|
|
}
|
|
})
|
|
}), contacttype === 4 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
|
|
label: "\u516C\u53F8\u5730\u5740",
|
|
name: "address",
|
|
placeholder: "\u8BF7\u8F93\u5165\u516C\u53F8\u5730\u5740",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
maxLength: 60,
|
|
size: "large",
|
|
style: {
|
|
height: 40,
|
|
marginTop: '-4px'
|
|
}
|
|
})
|
|
})]
|
|
})
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Index = ((0,_umi_production_exports.connect)(function (_ref5) {
|
|
var user = _ref5.user,
|
|
loading = _ref5.loading,
|
|
globalSetting = _ref5.globalSetting;
|
|
return {
|
|
user: user,
|
|
globalSetting: globalSetting,
|
|
loading: loading.models.index
|
|
};
|
|
})(UserPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 79531:
|
|
/*!*********************************************************!*\
|
|
!*** ./node_modules/antd/es/input/index.js + 5 modules ***!
|
|
\*********************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"Z": function() { return /* binding */ input; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
var classnames = __webpack_require__(94184);
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(67294);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js
|
|
var context = __webpack_require__(53124);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/form/context.js
|
|
var form_context = __webpack_require__(65223);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js
|
|
var style = __webpack_require__(47673);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Group.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Group = props => {
|
|
const {
|
|
getPrefixCls,
|
|
direction
|
|
} = (0,react.useContext)(context/* ConfigContext */.E_);
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
className
|
|
} = props;
|
|
const prefixCls = getPrefixCls('input-group', customizePrefixCls);
|
|
const inputPrefixCls = getPrefixCls('input');
|
|
const [wrapSSR, hashId] = (0,style/* default */.ZP)(inputPrefixCls);
|
|
const cls = classnames_default()(prefixCls, {
|
|
[`${prefixCls}-lg`]: props.size === 'large',
|
|
[`${prefixCls}-sm`]: props.size === 'small',
|
|
[`${prefixCls}-compact`]: props.compact,
|
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
}, hashId, className);
|
|
const formItemContext = (0,react.useContext)(form_context/* FormItemInputContext */.aM);
|
|
const groupFormItemContext = (0,react.useMemo)(() => Object.assign(Object.assign({}, formItemContext), {
|
|
isFormItemInput: false
|
|
}), [formItemContext]);
|
|
if (false) {}
|
|
return wrapSSR( /*#__PURE__*/react.createElement("span", {
|
|
className: cls,
|
|
style: props.style,
|
|
onMouseEnter: props.onMouseEnter,
|
|
onMouseLeave: props.onMouseLeave,
|
|
onFocus: props.onFocus,
|
|
onBlur: props.onBlur
|
|
}, /*#__PURE__*/react.createElement(form_context/* FormItemInputContext.Provider */.aM.Provider, {
|
|
value: groupFormItemContext
|
|
}, props.children)));
|
|
};
|
|
/* harmony default export */ var input_Group = (Group);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/Input.js + 1 modules
|
|
var Input = __webpack_require__(82586);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(87462);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons-svg/es/asn/EyeInvisibleOutlined.js
|
|
// This icon file is generated automatically.
|
|
var EyeInvisibleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" } }, { "tag": "path", "attrs": { "d": "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" } }] }, "name": "eye-invisible", "theme": "outlined" };
|
|
/* harmony default export */ var asn_EyeInvisibleOutlined = (EyeInvisibleOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/components/AntdIcon.js + 8 modules
|
|
var AntdIcon = __webpack_require__(74643);
|
|
;// CONCATENATED MODULE: ./node_modules/@ant-design/icons/es/icons/EyeInvisibleOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var EyeInvisibleOutlined_EyeInvisibleOutlined = function EyeInvisibleOutlined(props, ref) {
|
|
return /*#__PURE__*/react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_EyeInvisibleOutlined
|
|
}));
|
|
};
|
|
if (false) {}
|
|
/* harmony default export */ var icons_EyeInvisibleOutlined = (/*#__PURE__*/react.forwardRef(EyeInvisibleOutlined_EyeInvisibleOutlined));
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/EyeOutlined.js + 1 modules
|
|
var EyeOutlined = __webpack_require__(99611);
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/omit.js
|
|
var omit = __webpack_require__(10366);
|
|
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-util/es/ref.js
|
|
var es_ref = __webpack_require__(17799);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/hooks/useRemovePasswordTimeout.js
|
|
var useRemovePasswordTimeout = __webpack_require__(72922);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Password.js
|
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const defaultIconRender = visible => visible ? /*#__PURE__*/react.createElement(EyeOutlined/* default */.Z, null) : /*#__PURE__*/react.createElement(icons_EyeInvisibleOutlined, null);
|
|
const ActionMap = {
|
|
click: 'onClick',
|
|
hover: 'onMouseOver'
|
|
};
|
|
const Password = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
const {
|
|
visibilityToggle = true
|
|
} = props;
|
|
const visibilityControlled = typeof visibilityToggle === 'object' && visibilityToggle.visible !== undefined;
|
|
const [visible, setVisible] = (0,react.useState)(() => visibilityControlled ? visibilityToggle.visible : false);
|
|
const inputRef = (0,react.useRef)(null);
|
|
react.useEffect(() => {
|
|
if (visibilityControlled) {
|
|
setVisible(visibilityToggle.visible);
|
|
}
|
|
}, [visibilityControlled, visibilityToggle]);
|
|
// Remove Password value
|
|
const removePasswordTimeout = (0,useRemovePasswordTimeout/* default */.Z)(inputRef);
|
|
const onVisibleChange = () => {
|
|
const {
|
|
disabled
|
|
} = props;
|
|
if (disabled) {
|
|
return;
|
|
}
|
|
if (visible) {
|
|
removePasswordTimeout();
|
|
}
|
|
setVisible(prevState => {
|
|
var _a;
|
|
const newState = !prevState;
|
|
if (typeof visibilityToggle === 'object') {
|
|
(_a = visibilityToggle.onVisibleChange) === null || _a === void 0 ? void 0 : _a.call(visibilityToggle, newState);
|
|
}
|
|
return newState;
|
|
});
|
|
};
|
|
const getIcon = prefixCls => {
|
|
const {
|
|
action = 'click',
|
|
iconRender = defaultIconRender
|
|
} = props;
|
|
const iconTrigger = ActionMap[action] || '';
|
|
const icon = iconRender(visible);
|
|
const iconProps = {
|
|
[iconTrigger]: onVisibleChange,
|
|
className: `${prefixCls}-icon`,
|
|
key: 'passwordIcon',
|
|
onMouseDown: e => {
|
|
// Prevent focused state lost
|
|
// https://github.com/ant-design/ant-design/issues/15173
|
|
e.preventDefault();
|
|
},
|
|
onMouseUp: e => {
|
|
// Prevent caret position change
|
|
// https://github.com/ant-design/ant-design/issues/23524
|
|
e.preventDefault();
|
|
}
|
|
};
|
|
return /*#__PURE__*/react.cloneElement( /*#__PURE__*/react.isValidElement(icon) ? icon : /*#__PURE__*/react.createElement("span", null, icon), iconProps);
|
|
};
|
|
const {
|
|
className,
|
|
prefixCls: customizePrefixCls,
|
|
inputPrefixCls: customizeInputPrefixCls,
|
|
size
|
|
} = props,
|
|
restProps = __rest(props, ["className", "prefixCls", "inputPrefixCls", "size"]);
|
|
const {
|
|
getPrefixCls
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
|
const prefixCls = getPrefixCls('input-password', customizePrefixCls);
|
|
const suffixIcon = visibilityToggle && getIcon(prefixCls);
|
|
const inputClassName = classnames_default()(prefixCls, className, {
|
|
[`${prefixCls}-${size}`]: !!size
|
|
});
|
|
const omittedProps = Object.assign(Object.assign({}, (0,omit/* default */.Z)(restProps, ['suffix', 'iconRender', 'visibilityToggle'])), {
|
|
type: visible ? 'text' : 'password',
|
|
className: inputClassName,
|
|
prefixCls: inputPrefixCls,
|
|
suffix: suffixIcon
|
|
});
|
|
if (size) {
|
|
omittedProps.size = size;
|
|
}
|
|
return /*#__PURE__*/react.createElement(Input/* default */.Z, Object.assign({
|
|
ref: (0,es_ref/* composeRef */.sQ)(ref, inputRef)
|
|
}, omittedProps));
|
|
});
|
|
if (false) {}
|
|
/* harmony default export */ var input_Password = (Password);
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
|
|
var SearchOutlined = __webpack_require__(68795);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
|
|
var reactNode = __webpack_require__(96159);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
var es_button = __webpack_require__(71577);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/hooks/useSize.js
|
|
var useSize = __webpack_require__(98675);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/space/Compact.js
|
|
var Compact = __webpack_require__(4173);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/input/Search.js
|
|
var Search_rest = undefined && undefined.__rest || function (s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Search = /*#__PURE__*/react.forwardRef((props, ref) => {
|
|
const {
|
|
prefixCls: customizePrefixCls,
|
|
inputPrefixCls: customizeInputPrefixCls,
|
|
className,
|
|
size: customizeSize,
|
|
suffix,
|
|
enterButton = false,
|
|
addonAfter,
|
|
loading,
|
|
disabled,
|
|
onSearch: customOnSearch,
|
|
onChange: customOnChange,
|
|
onCompositionStart,
|
|
onCompositionEnd
|
|
} = props,
|
|
restProps = Search_rest(props, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
|
|
const {
|
|
getPrefixCls,
|
|
direction
|
|
} = react.useContext(context/* ConfigContext */.E_);
|
|
const composedRef = react.useRef(false);
|
|
const prefixCls = getPrefixCls('input-search', customizePrefixCls);
|
|
const inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
|
|
const {
|
|
compactSize
|
|
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
|
|
const size = (0,useSize/* default */.Z)(ctx => {
|
|
var _a;
|
|
return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : ctx;
|
|
});
|
|
const inputRef = react.useRef(null);
|
|
const onChange = e => {
|
|
if (e && e.target && e.type === 'click' && customOnSearch) {
|
|
customOnSearch(e.target.value, e);
|
|
}
|
|
if (customOnChange) {
|
|
customOnChange(e);
|
|
}
|
|
};
|
|
const onMouseDown = e => {
|
|
var _a;
|
|
if (document.activeElement === ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input)) {
|
|
e.preventDefault();
|
|
}
|
|
};
|
|
const onSearch = e => {
|
|
var _a, _b;
|
|
if (customOnSearch) {
|
|
customOnSearch((_b = (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.input) === null || _b === void 0 ? void 0 : _b.value, e);
|
|
}
|
|
};
|
|
const onPressEnter = e => {
|
|
if (composedRef.current || loading) {
|
|
return;
|
|
}
|
|
onSearch(e);
|
|
};
|
|
const searchIcon = typeof enterButton === 'boolean' ? /*#__PURE__*/react.createElement(SearchOutlined/* default */.Z, null) : null;
|
|
const btnClassName = `${prefixCls}-button`;
|
|
let button;
|
|
const enterButtonAsElement = enterButton || {};
|
|
const isAntdButton = enterButtonAsElement.type && enterButtonAsElement.type.__ANT_BUTTON === true;
|
|
if (isAntdButton || enterButtonAsElement.type === 'button') {
|
|
button = (0,reactNode/* cloneElement */.Tm)(enterButtonAsElement, Object.assign({
|
|
onMouseDown,
|
|
onClick: e => {
|
|
var _a, _b;
|
|
(_b = (_a = enterButtonAsElement === null || enterButtonAsElement === void 0 ? void 0 : enterButtonAsElement.props) === null || _a === void 0 ? void 0 : _a.onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
onSearch(e);
|
|
},
|
|
key: 'enterButton'
|
|
}, isAntdButton ? {
|
|
className: btnClassName,
|
|
size
|
|
} : {}));
|
|
} else {
|
|
button = /*#__PURE__*/react.createElement(es_button/* default */.ZP, {
|
|
className: btnClassName,
|
|
type: enterButton ? 'primary' : undefined,
|
|
size: size,
|
|
disabled: disabled,
|
|
key: "enterButton",
|
|
onMouseDown: onMouseDown,
|
|
onClick: onSearch,
|
|
loading: loading,
|
|
icon: searchIcon
|
|
}, enterButton);
|
|
}
|
|
if (addonAfter) {
|
|
button = [button, (0,reactNode/* cloneElement */.Tm)(addonAfter, {
|
|
key: 'addonAfter'
|
|
})];
|
|
}
|
|
const cls = classnames_default()(prefixCls, {
|
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
[`${prefixCls}-${size}`]: !!size,
|
|
[`${prefixCls}-with-button`]: !!enterButton
|
|
}, className);
|
|
const handleOnCompositionStart = e => {
|
|
composedRef.current = true;
|
|
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e);
|
|
};
|
|
const handleOnCompositionEnd = e => {
|
|
composedRef.current = false;
|
|
onCompositionEnd === null || onCompositionEnd === void 0 ? void 0 : onCompositionEnd(e);
|
|
};
|
|
return /*#__PURE__*/react.createElement(Input/* default */.Z, Object.assign({
|
|
ref: (0,es_ref/* composeRef */.sQ)(inputRef, ref),
|
|
onPressEnter: onPressEnter
|
|
}, restProps, {
|
|
size: size,
|
|
onCompositionStart: handleOnCompositionStart,
|
|
onCompositionEnd: handleOnCompositionEnd,
|
|
prefixCls: inputPrefixCls,
|
|
addonAfter: button,
|
|
suffix: suffix,
|
|
onChange: onChange,
|
|
className: cls,
|
|
disabled: disabled
|
|
}));
|
|
});
|
|
if (false) {}
|
|
/* harmony default export */ var input_Search = (Search);
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/TextArea.js
|
|
var TextArea = __webpack_require__(96330);
|
|
;// CONCATENATED MODULE: ./node_modules/antd/es/input/index.js
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const input_Input = Input/* default */.Z;
|
|
if (false) {}
|
|
input_Input.Group = input_Group;
|
|
input_Input.Search = input_Search;
|
|
input_Input.TextArea = TextArea/* default */.Z;
|
|
input_Input.Password = input_Password;
|
|
/* harmony default export */ var input = (input_Input);
|
|
|
|
/***/ })
|
|
|
|
}]); |