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.
NewEduCoderBuild/p__Search__index.async.js

601 lines
38 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[2501],{
/***/ 65081:
/*!***********************************************!*\
!*** ./src/assets/images/icons/lockclose.svg ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* unused harmony export ReactComponent */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
const SvgLockclose = (props) => /* @__PURE__ */ React.createElement("svg", __spreadValues({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024", style: {
enableBackground: "new 0 0 1024 1024"
}, xmlSpace: "preserve", width: 60, height: 80 }, props), /* @__PURE__ */ React.createElement("path", { fill: "#fff", d: "M749.4 373.9H710v-78.8c0-108.7-88.2-197-197-197-108.7 0-197 88.2-197 197v78.8h-39.4c-43.5 0-78.8 35.3-78.8 78.8v393.9c0 43.5 35.3 78.8 78.8 78.8h472.7c43.5 0 78.8-35.3 78.8-78.8V452.7c.1-43.5-35.2-78.8-78.7-78.8zM513 728.5c-43.5 0-78.8-35.3-78.8-78.8s35.3-78.8 78.8-78.8 78.8 35.3 78.8 78.8-35.3 78.8-78.8 78.8zm122.1-354.6H390.9v-78.8c0-67.4 54.8-122.1 122.1-122.1 67.4 0 122.1 54.8 122.1 122.1v78.8zm0 0" }));
/* harmony default export */ __webpack_exports__.Z = ("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEwMjQgMTAyNCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjYwIiBoZWlnaHQ9IjgwIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNNzQ5LjQgMzczLjlINzEwdi03OC44YzAtMTA4LjctODguMi0xOTctMTk3LTE5Ny0xMDguNyAwLTE5NyA4OC4yLTE5NyAxOTd2NzguOGgtMzkuNGMtNDMuNSAwLTc4LjggMzUuMy03OC44IDc4Ljh2MzkzLjljMCA0My41IDM1LjMgNzguOCA3OC44IDc4LjhoNDcyLjdjNDMuNSAwIDc4LjgtMzUuMyA3OC44LTc4LjhWNDUyLjdjLjEtNDMuNS0zNS4yLTc4LjgtNzguNy03OC44ek01MTMgNzI4LjVjLTQzLjUgMC03OC44LTM1LjMtNzguOC03OC44czM1LjMtNzguOCA3OC44LTc4LjggNzguOCAzNS4zIDc4LjggNzguOC0zNS4zIDc4LjgtNzguOCA3OC44em0xMjIuMS0zNTQuNkgzOTAuOXYtNzguOGMwLTY3LjQgNTQuOC0xMjIuMSAxMjIuMS0xMjIuMSA2Ny40IDAgMTIyLjEgNTQuOCAxMjIuMSAxMjIuMXY3OC44em0wIDAiLz48L3N2Zz4=");
/***/ }),
/***/ 18343:
/*!******************************************************!*\
!*** ./src/components/Spinner/index.tsx + 1 modules ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ Spinner; }
});
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
var _umi_production_exports = __webpack_require__(23852);
;// CONCATENATED MODULE: ./src/components/Spinner/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Spinnermodules = ({"ldsRing":"ldsRing___mpBZC","idsRingWrapper":"idsRingWrapper___Of9_n","ldsring":"ldsring___o0w2t"});
;// CONCATENATED MODULE: ./src/components/Spinner/index.tsx
/* provided dependency */ var React = __webpack_require__(/*! react */ 59301);
/* harmony default export */ var Spinner = (({ message, className, children, style = {} }) => {
return /* @__PURE__ */ React.createElement("div", { className: `custom-spinner ${Spinnermodules.idsRingWrapper} ${className}` }, /* @__PURE__ */ React.createElement("div", { className: Spinnermodules.ldsRing }, /* @__PURE__ */ React.createElement("div", null), /* @__PURE__ */ React.createElement("div", null), /* @__PURE__ */ React.createElement("div", null), /* @__PURE__ */ React.createElement("div", null)), message ? /* @__PURE__ */ React.createElement("p", { style }, message) : null, children, /* @__PURE__ */ React.createElement(_umi_production_exports.Outlet, null));
});
/***/ }),
/***/ 69566:
/*!************************************************!*\
!*** ./src/pages/Search/index.tsx + 4 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 */ pages_Search; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(64841);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(20008);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
var col = __webpack_require__(43604);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(24905);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(36697);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(6848);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tag/index.js + 5 modules
var tag = __webpack_require__(12563);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/SearchOutlined.js + 1 modules
var SearchOutlined = __webpack_require__(54462);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
var _umi_production_exports = __webpack_require__(23852);
;// CONCATENATED MODULE: ./src/pages/Search/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Searchmodules = ({"flex_box_center":"flex_box_center___HEr9e","flex_space_between":"flex_space_between____iKBP","flex_box_vertical_center":"flex_box_vertical_center___OEtzz","flex_box_center_end":"flex_box_center_end___B6rgq","flex_box_column":"flex_box_column___QNsfK","search-container":"search-container___RW2SM","btn-search":"btn-search___YrTXV","navs-container":"navs-container___vuvs0","navs":"navs___FjRDm","active":"active___FwSXe","search-result-container":"search-result-container___yKXfF","search-panel":"search-panel___OJsfs","search-course-item":"search-course-item___K21lH","lock-search-course-item":"lock-search-course-item___Yy132","desc":"desc___OBHVW","title":"title___OG0X8","mt20":"mt20___etArC","detail":"detail___qf02i","info":"info___ZWG6X","sum":"sum___kgJ8Y","label-red":"label-red___mk7qt","search-footer":"search-footer___H2H20","search-result-body":"search-result-body___xkFWj","tip":"tip___UcZlD","authorname":"authorname___nsmz0","tooltip-content":"tooltip-content___oGakU"});
;// CONCATENATED MODULE: ./src/pages/Search/bg.jpg
var bg_namespaceObject = __webpack_require__.p + "static/bg.c9d9c3ca.jpg";
// EXTERNAL MODULE: ./src/assets/images/icons/lockclose.svg
var lockclose = __webpack_require__(65081);
// EXTERNAL MODULE: ./src/components/Spinner/index.tsx + 1 modules
var Spinner = __webpack_require__(18343);
// EXTERNAL MODULE: ./src/service/global.ts
var global = __webpack_require__(66421);
;// CONCATENATED MODULE: ./src/pages/Search/components/ShixunFilter.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var ShixunFiltermodules = ({"flex_box_center":"flex_box_center___nD1UL","flex_space_between":"flex_space_between___YXIX3","flex_box_vertical_center":"flex_box_vertical_center___ILTuw","flex_box_center_end":"flex_box_center_end___shXFV","flex_box_column":"flex_box_column___MeD_p","wrp":"wrp___wu6nh","menu":"menu___bXfOC","actived":"actived___F7x5z","actived2":"actived2___HgeYt","subTag":"subTag___Mv0Xf","search":"search___k56jn"});
;// CONCATENATED MODULE: ./src/pages/Search/components/ShixunFilter.tsx
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
const ShixunsListPage = (_a) => {
var _b = _a, {
shixunsList,
dispatch,
location,
history: history2,
onChange
} = _b, props = __objRest(_b, [
"shixunsList",
"dispatch",
"location",
"history",
"onChange"
]);
const [query, setQuery] = (0,_react_17_0_2_react.useState)({ diff: 0 });
(0,_react_17_0_2_react.useEffect)(() => {
dispatch({
type: "shixunsList/getMenus",
payload: {}
});
}, [shixunsList.name]);
const difficulty = [
{ name: "\u5168\u90E8", id: 0 },
{ name: "\u521D\u7EA7", id: 1 },
{ name: "\u4E2D\u7EA7", id: 2 },
{ name: "\u4E2D\u9AD8\u7EA7", id: 3 },
{ name: "\u9AD8\u7EA7", id: 4 }
];
const dataType = [
{ name: "\u6700\u65B0", id: "new" },
{ name: "\u6700\u70ED", id: "hot" }
];
const menuChange = (tag_level, sub_discipline_id, discipline_id) => {
setQuery({
tag_level,
sub_discipline_id,
discipline_id,
diff: query.diff
});
onChange({
tag_level,
sub_discipline_id,
discipline_id
});
};
return /* @__PURE__ */ _react_17_0_2_react.createElement("section", null, /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { className: ShixunFiltermodules.wrp }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "edu-container" }, /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: ShixunFiltermodules.menu }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "mr10" }, "\u65B9\u5411\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement(
"li",
{
className: !query.discipline_id ? ShixunFiltermodules.actived : "",
onClick: () => {
menuChange(null, null, null);
}
},
/* @__PURE__ */ _react_17_0_2_react.createElement("strong", null, "\u5168\u90E8")
), shixunsList.menus && shixunsList.menus.map(function(v, k) {
return /* @__PURE__ */ _react_17_0_2_react.createElement(
"li",
{
key: k,
className: query.discipline_id == v.id ? ShixunFiltermodules.actived : ""
},
/* @__PURE__ */ _react_17_0_2_react.createElement(
"strong",
{
onClick: () => {
menuChange(1, null, v.id);
}
},
v.name
),
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, v.sub_repertoires.map(function(val, key) {
return /* @__PURE__ */ _react_17_0_2_react.createElement("div", { key, className: "mt5" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
"div",
{
className: query.sub_discipline_id == val.id && query.tag_level == 2 ? `${ShixunFiltermodules.actived2} ${ShixunFiltermodules.subTag}` : ShixunFiltermodules.subTag,
onClick: () => {
menuChange(2, val.id, v.id);
}
},
val.name
), /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: "mt5" }, val.tags && val.tags.map(function(value, index) {
return /* @__PURE__ */ _react_17_0_2_react.createElement(
"li",
{
key: index,
className: query.sub_discipline_id == value.id && query.tag_level == 3 ? ShixunFiltermodules.actived2 : "",
onClick: () => {
menuChange(3, value.id, v.id);
}
},
value.name
);
})));
}))
);
})), /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: ShixunFiltermodules.menu }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "mr10" }, "\u7B5B\u9009\uFF1A"), difficulty.map(function(v, k) {
return /* @__PURE__ */ _react_17_0_2_react.createElement(
"li",
{
key: k,
className: query.diff === v.id ? ShixunFiltermodules.actived : "",
onClick: () => {
query.diff = v.id;
setQuery(__spreadValues({}, query));
onChange(__spreadValues({}, query));
}
},
/* @__PURE__ */ _react_17_0_2_react.createElement("strong", null, v.name)
);
})))));
};
/* harmony default export */ var ShixunFilter = ((0,_umi_production_exports.connect)(
({ shixunsList }) => ({
shixunsList
})
)(ShixunsListPage));
;// CONCATENATED MODULE: ./src/pages/Search/index.tsx
var Search_defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var Search_getOwnPropSymbols = Object.getOwnPropertySymbols;
var Search_hasOwnProp = Object.prototype.hasOwnProperty;
var Search_propIsEnum = Object.prototype.propertyIsEnumerable;
var Search_defNormalProp = (obj, key, value) => key in obj ? Search_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var Search_spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (Search_hasOwnProp.call(b, prop))
Search_defNormalProp(a, prop, b[prop]);
if (Search_getOwnPropSymbols)
for (var prop of Search_getOwnPropSymbols(b)) {
if (Search_propIsEnum.call(b, prop))
Search_defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const Search = input["default"].Search;
const Navs = [
{ id: "subject", title: "\u5B9E\u8DF5\u8BFE\u7A0B" },
{ id: "shixun", title: "\u5B9E\u8DF5\u9879\u76EE" },
{ id: "course", title: "\u6559\u5B66\u8BFE\u5802" }
// { id: 'memo', title: '交流问答' },
];
var Types = /* @__PURE__ */ ((Types2) => {
Types2[Types2["GET_LIST"] = 0] = "GET_LIST";
Types2[Types2["CHANGE_PAGE"] = 1] = "CHANGE_PAGE";
Types2[Types2["CHANGE_KEYWORD"] = 2] = "CHANGE_KEYWORD";
Types2[Types2["CHANGE_TYPE"] = 3] = "CHANGE_TYPE";
Types2[Types2["CHANGE_All"] = 4] = "CHANGE_All";
Types2[Types2["SET_LOADING"] = 5] = "SET_LOADING";
return Types2;
})(Types || {});
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = encodeURI(window.location.search).substr(1).match(reg);
if (r != null)
return unescape(r[2]).replace(/\+/g, "%2B");
return null;
}
function reducer(state, action) {
switch (action.type) {
case 0 /* GET_LIST */:
return Search_spreadValues(Search_spreadValues({}, state), action.payload);
case 1 /* CHANGE_PAGE */:
return __spreadProps(Search_spreadValues({}, state), { page: action.payload });
case 2 /* CHANGE_KEYWORD */:
return Search_spreadValues(Search_spreadValues({}, state), action.payload);
case 3 /* CHANGE_TYPE */:
return Search_spreadValues(Search_spreadValues({}, state), action.payload);
case 4 /* CHANGE_All */:
return Search_spreadValues(Search_spreadValues({}, state), action.payload);
case 5 /* SET_LOADING */:
return __spreadProps(Search_spreadValues({}, state), { loading: action.payload });
default:
throw new Error();
}
}
/* harmony default export */ var pages_Search = (() => {
const [searchParams] = (0,_umi_production_exports.useSearchParams)();
const value = searchParams.get("value");
const tabs = searchParams.get("tabs");
const initialState = {
keyword: "",
page: 1,
list: [],
type: tabs || "subject",
order_by: null,
sort_by: null,
can_copy: null,
loading: false,
count: 0,
searchIndex: 1
};
const [shixunQuery, setShixunQuery] = (0,_react_17_0_2_react.useState)({});
const [state, dispatch] = (0,_react_17_0_2_react.useReducer)(reducer, __spreadProps(Search_spreadValues({}, initialState), { keyword: value }));
const { keyword, page, list, type, count, loading, order_by, sort_by, can_copy, searchIndex } = state;
(0,_react_17_0_2_react.useEffect)(() => {
state.type = tabs || "subject";
dispatch({
type: 2 /* CHANGE_KEYWORD */,
payload: {
keyword: getQueryString("value"),
page: 1,
searchIndex: searchIndex + 1
}
});
}, [value, tabs]);
const childPanel = {
subject: /* @__PURE__ */ _react_17_0_2_react.createElement(SubjectPanel, { data: list }),
memo: /* @__PURE__ */ _react_17_0_2_react.createElement(MemoPanel, { data: list }),
shixun: /* @__PURE__ */ _react_17_0_2_react.createElement(ShiXunPanel, { data: list }),
course: /* @__PURE__ */ _react_17_0_2_react.createElement(CoursePanel, { data: list })
};
const getData = () => {
let didCancel = false;
function init() {
return __async(this, null, function* () {
dispatch({
type: 5 /* SET_LOADING */,
payload: true
});
if (keyword) {
(0,global/* addSearchRecord */.tk)({ name: keyword, copywriting: keyword, position: state.type });
}
const response = yield (0,fetch/* get */.U2)(`search.json`, Search_spreadValues({
keyword: encodeURIComponent(keyword),
page,
type,
order_by,
can_copy,
sort_by
}, shixunQuery));
const { results, count: count2 } = response;
if (!didCancel) {
dispatch({
type: 0 /* GET_LIST */,
payload: {
count: count2,
list: results,
loading: false
}
});
}
});
}
if (!didCancel) {
init();
}
return () => {
didCancel = true;
};
};
(0,_react_17_0_2_react.useEffect)(() => {
getData();
}, [page, type, shixunQuery, order_by, sort_by, can_copy, searchIndex]);
function onChangeKeyword(value2) {
dispatch({
type: 2 /* CHANGE_KEYWORD */,
payload: {
keyword: value2,
page: 1
}
});
}
function onChangeType(e) {
dispatch({
type: 3 /* CHANGE_TYPE */,
payload: {
type: e.target.id,
page: 1
}
});
}
function onPageChange(value2) {
dispatch({
type: 1 /* CHANGE_PAGE */,
payload: value2
});
}
function onChangeAll(val) {
dispatch({
type: 4 /* CHANGE_All */,
payload: __spreadProps(Search_spreadValues(Search_spreadValues({}, state), val), { page: 1 })
});
}
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules["search-container"] }, /* @__PURE__ */ _react_17_0_2_react.createElement("img", { src: bg_namespaceObject, alt: "bg" }), /* @__PURE__ */ _react_17_0_2_react.createElement(
Search,
{
className: Searchmodules["btn-search"],
value: keyword,
enterButton: /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, /* @__PURE__ */ _react_17_0_2_react.createElement(SearchOutlined/* default */.Z, { style: { fontSize: 18, marginRight: 10 } }), " \u641C\u7D22"),
onChange: (e) => {
onChangeKeyword(e.target.value);
},
onSearch: getData
}
)), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules["navs-container"] }, /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: Searchmodules["navs"] }, Navs.map((item) => /* @__PURE__ */ _react_17_0_2_react.createElement("li", { key: item.id }, /* @__PURE__ */ _react_17_0_2_react.createElement(
"a",
{
id: item.id,
className: item.id === type ? Searchmodules.active : "",
onClick: onChangeType
},
item.title
))))), type === "shixun" && /* @__PURE__ */ _react_17_0_2_react.createElement(ShixunFilter, { onChange: (p) => {
onChangeAll({});
setShixunQuery(Search_spreadValues({}, p));
} }), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules["search-result-container"] }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules["search-result-body"] }, loading && /* @__PURE__ */ _react_17_0_2_react.createElement(Spinner/* default */.Z, { message: "\u6B63\u5728\u52AA\u529B\u52A0\u8F7D\u6570\u636E\u4E2D..." }), /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { align: "middle" }, type === "shixun" && /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { flex: "1" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
"span",
{
className: "current ml10",
onClick: () => {
onChangeAll({
sort_by: "myshixuns_count",
order_by: order_by === null ? "desc" : order_by === "asc" ? null : "asc"
});
}
},
/* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: `${sort_by === "myshixuns_count" && !!order_by && "c-light-primary"} font14` }, "\u70ED\u5EA6"),
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: `edu-sorter current ${sort_by === "myshixuns_count" && order_by}` }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "iconfont icon-sanjiaoxing-up" }), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "iconfont icon-sanjiaoxing-down" }))
), /* @__PURE__ */ _react_17_0_2_react.createElement(
"span",
{
className: "current ml40",
onClick: () => {
onChangeAll({
sort_by: "averge_star",
order_by: order_by === null ? "desc" : order_by === "asc" ? null : "asc"
});
}
},
/* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: `${sort_by === "averge_star" && !!order_by && "c-light-primary"} font14` }, "\u8BC4\u5206"),
/* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: `edu-sorter current ${sort_by === "averge_star" && order_by}` }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "iconfont icon-sanjiaoxing-up" }), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "iconfont icon-sanjiaoxing-down" }))
), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "ml100" }, /* @__PURE__ */ _react_17_0_2_react.createElement(es_checkbox["default"], { onClick: (e) => {
onChangeAll({
can_copy: e.target.checked ? true : null
});
} }, "\u5141\u8BB8\u590D\u5236"))), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("p", { className: Searchmodules.tip }, "\u5171\u627E\u5230\u76F8\u5173\u7ED3\u679C", /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, " ", count, " "), "\u4E2A"))), childPanel[type])), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules["search-footer"] }, /* @__PURE__ */ _react_17_0_2_react.createElement(
pagination/* default */.Z,
{
showQuickJumper: true,
current: page,
onChange: onPageChange,
pageSize: 20,
showSizeChanger: false,
hideOnSinglePage: true,
total: count
}
)));
});
function Desc({ data }) {
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, data ? /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules.desc }, data == null ? void 0 : data.map((value) => /* @__PURE__ */ _react_17_0_2_react.createElement(
"span",
{
key: value,
dangerouslySetInnerHTML: { __html: value }
}
))) : /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules.desc }));
}
function MemoPanel({ data }) {
return /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: Searchmodules["search-panel"] }, data == null ? void 0 : data.map((item) => {
var _a, _b, _c;
return /* @__PURE__ */ _react_17_0_2_react.createElement("li", { key: item.id }, /* @__PURE__ */ _react_17_0_2_react.createElement(_umi_production_exports.Link, { target: "_blank", to: `/forums/${item.id}` }, /* @__PURE__ */ _react_17_0_2_react.createElement(
"div",
{
className: Searchmodules.title,
dangerouslySetInnerHTML: { __html: item.title }
}
), /* @__PURE__ */ _react_17_0_2_react.createElement(Desc, { data: item.content.content }), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules.detail }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules.sum }, ((_a = item == null ? void 0 : item.content) == null ? void 0 : _a.author_name) ? /* @__PURE__ */ _react_17_0_2_react.createElement("aside", { dangerouslySetInnerHTML: { __html: (_c = (_b = item == null ? void 0 : item.content) == null ? void 0 : _b.author_name) == null ? void 0 : _c[0] } }) : /* @__PURE__ */ _react_17_0_2_react.createElement("aside", null, item.author_name), /* @__PURE__ */ _react_17_0_2_react.createElement("aside", null, "\u8BBF\u95EE\u4EBA\u6570 \xA0", item.visits_count)))));
}));
}
function CoursePanel({ data }) {
return /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: Searchmodules["search-panel"] }, data == null ? void 0 : data.map((item) => {
var _a, _b, _c, _d, _e, _f;
return /* @__PURE__ */ _react_17_0_2_react.createElement("li", { key: item.id, className: Searchmodules["search-course-item"] }, !item.is_accessible && /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules["lock-search-course-item"] }, /* @__PURE__ */ _react_17_0_2_react.createElement("img", { src: lockclose/* default */.Z }), "\u975E\u6210\u5458\u4E0D\u80FD\u8BBF\u95EE"), /* @__PURE__ */ _react_17_0_2_react.createElement(_umi_production_exports.Link, { target: "_blank", to: `${item == null ? void 0 : item.first_category_url}` }, /* @__PURE__ */ _react_17_0_2_react.createElement(
"div",
{
className: Searchmodules.title,
dangerouslySetInnerHTML: { __html: item.title }
}
), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: `${Searchmodules["detail"]} mt20` }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules.sum }, ((_a = item == null ? void 0 : item.content) == null ? void 0 : _a.member_user_names) ? /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { overlayClassName: Searchmodules["tooltip-content"], title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { dangerouslySetInnerHTML: { __html: (_b = item == null ? void 0 : item.content) == null ? void 0 : _b.member_user_names } })) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname, dangerouslySetInnerHTML: { __html: (_c = item == null ? void 0 : item.content) == null ? void 0 : _c.member_user_names } })) : (item == null ? void 0 : item.member_user_names) && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, item.member_user_names)) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname }, item.member_user_names)), ((_d = item == null ? void 0 : item.content) == null ? void 0 : _d.author_school_name) ? /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { overlayClassName: Searchmodules["tooltip-content"], title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { dangerouslySetInnerHTML: { __html: (_e = item == null ? void 0 : item.content) == null ? void 0 : _e.author_school_name } })) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname, dangerouslySetInnerHTML: { __html: (_f = item == null ? void 0 : item.content) == null ? void 0 : _f.author_school_name } })) : (item == null ? void 0 : item.author_school_name) && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, item.author_school_name)) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname }, item.author_school_name)), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u6210\u5458\u6570 \xA0", item.members_count)))));
}));
}
function SubjectPanel({ data }) {
return /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: Searchmodules["search-panel"] }, data == null ? void 0 : data.map((item) => {
var _a, _b, _c, _d, _e, _f;
return /* @__PURE__ */ _react_17_0_2_react.createElement("li", { key: item.id }, /* @__PURE__ */ _react_17_0_2_react.createElement(_umi_production_exports.Link, { target: "_blank", to: `/paths/${item.identifier}` }, /* @__PURE__ */ _react_17_0_2_react.createElement(
"div",
{
className: Searchmodules.title,
dangerouslySetInnerHTML: { __html: item.title }
}
), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: `${Searchmodules["detail"]} mt20` }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules.sum, style: { display: "flex", justifyContent: "space-between" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, ((_a = item == null ? void 0 : item.content) == null ? void 0 : _a.member_user_names) ? /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { overlayClassName: Searchmodules["tooltip-content"], title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { dangerouslySetInnerHTML: { __html: (_b = item == null ? void 0 : item.content) == null ? void 0 : _b.member_user_names } })) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname, dangerouslySetInnerHTML: { __html: (_c = item == null ? void 0 : item.content) == null ? void 0 : _c.member_user_names } })) : (item == null ? void 0 : item.member_user_names) && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, item.member_user_names)) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname }, item.member_user_names)), ((_d = item == null ? void 0 : item.content) == null ? void 0 : _d.author_school_name) ? /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { overlayClassName: Searchmodules["tooltip-content"], title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { dangerouslySetInnerHTML: { __html: (_e = item == null ? void 0 : item.content) == null ? void 0 : _e.author_school_name } })) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname, dangerouslySetInnerHTML: { __html: (_f = item == null ? void 0 : item.content) == null ? void 0 : _f.author_school_name } })) : (item == null ? void 0 : item.author_school_name) && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, item.author_school_name)) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname }, item.author_school_name))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "mr30" }, "\u6848\u4F8B\u6570 \xA0", item.shixuns_count), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u5B66\u4E60\u4EBA\u6570 \xA0", item.myshixuns_count))))));
}));
}
function ShiXunPanel({ data }) {
return /* @__PURE__ */ _react_17_0_2_react.createElement("ul", { className: Searchmodules["search-panel"] }, data == null ? void 0 : data.map((item) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
return /* @__PURE__ */ _react_17_0_2_react.createElement("li", { key: item.id }, /* @__PURE__ */ _react_17_0_2_react.createElement(_umi_production_exports.Link, { target: "_blank", to: `/shixuns/${item.identifier}/challenges ` }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "flex-container" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
"div",
{
className: Searchmodules.title,
dangerouslySetInnerHTML: { __html: item.title }
}
), item.is_jupyter ? /* @__PURE__ */ _react_17_0_2_react.createElement(tag["default"], { color: "red", className: "ml10" }, "Jupyter") : null, item.can_copy && /* @__PURE__ */ _react_17_0_2_react.createElement(tag["default"], { color: "green", className: "ml10" }, "\u5141\u8BB8\u590D\u5236")), /* @__PURE__ */ _react_17_0_2_react.createElement(Desc, { data: item.content.description }), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules.detail }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules.info }, !item.content.challenge_names ? null : /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, (_b = (_a = item == null ? void 0 : item.content) == null ? void 0 : _a.challenge_names) == null ? void 0 : _b.map((value) => /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "flex-container", key: value }, /* @__PURE__ */ _react_17_0_2_react.createElement(
"span",
{
dangerouslySetInnerHTML: { __html: value }
}
)))), !item.content.tag_names ? null : /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, (_d = (_c = item == null ? void 0 : item.content) == null ? void 0 : _c.tag_names) == null ? void 0 : _d.map((value) => /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "flex-container", key: value }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u5173\u5361\u6807\u7B7E \xA0"), /* @__PURE__ */ _react_17_0_2_react.createElement(
"span",
{
dangerouslySetInnerHTML: { __html: value }
}
))))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: Searchmodules.sum, style: { display: "flex", justifyContent: "space-between" } }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, ((_e = item == null ? void 0 : item.content) == null ? void 0 : _e.member_user_names) ? /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { overlayClassName: Searchmodules["tooltip-content"], title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { dangerouslySetInnerHTML: { __html: (_f = item == null ? void 0 : item.content) == null ? void 0 : _f.member_user_names } })) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname, dangerouslySetInnerHTML: { __html: (_g = item == null ? void 0 : item.content) == null ? void 0 : _g.member_user_names } })) : (item == null ? void 0 : item.member_user_names) && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, item.member_user_names)) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname }, item.member_user_names)), ((_h = item == null ? void 0 : item.content) == null ? void 0 : _h.author_school_name) ? /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { overlayClassName: Searchmodules["tooltip-content"], title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { dangerouslySetInnerHTML: { __html: (_i = item == null ? void 0 : item.content) == null ? void 0 : _i.author_school_name } })) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname, dangerouslySetInnerHTML: { __html: (_j = item == null ? void 0 : item.content) == null ? void 0 : _j.author_school_name } })) : (item == null ? void 0 : item.author_school_name) && /* @__PURE__ */ _react_17_0_2_react.createElement(tooltip/* default */.Z, { title: /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, item.author_school_name)) }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: Searchmodules.authorname }, item.author_school_name))), /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "mr30" }, "\u4EFB\u52A1 \xA0", item.challenges_count), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "mr30" }, "\u5B66\u4E60\u4EBA\u6570 \xA0", item.study_count), /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u8BC4\u5206 \xA0", item.star))))));
}));
}
/***/ })
}]);