@x-edu/live-player 0.0.37 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/XEduLivePlayer.common.js +161 -48
- package/package.json +1 -1
|
@@ -2764,12 +2764,14 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
2764
2764
|
|
|
2765
2765
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
|
|
2766
2766
|
// Module
|
|
2767
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".index-module_container_y\\+him{max-width:1300px;margin:0 auto;padding:24px 24px 0 24px;width:956px}.index-module_container_y\\+him .fish-tabs-nav{margin-bottom:24px}.index-module_container_y\\+him .fish-tabs-nav:before{display:none}.index-module_container_y\\+him .fish-tabs-ink-bar{display:none}.index-module_container_y\\+him .fish-tabs-tab+.fish-tabs-tab{margin-left:0}.index-module_container_y\\+him .fish-tabs-tab{padding:9px 20px}.index-module_container_y\\+him .fish-tabs-tab-btn{font-size:14px;line-height:14px;color:#666}.index-module_container_y\\+him .fish-tabs-tab-active{border-radius:16px;background:var(--f-3-f-7-ff,#f3f7ff)}.index-module_container_y\\+him .fish-tabs-tab-active .fish-tabs-tab-btn{color:#1e62ec}.index-module_container_y\\+him.index-module_mobile_fjd59{width:100%;padding:12px 12px 0 12px}.index-module_list_KQnlU{min-height:500px}", ""]);
|
|
2767
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".index-module_container_y\\+him{max-width:1300px;margin:0 auto;padding:24px 24px 0 24px;width:956px}.index-module_container_y\\+him .fish-tabs-nav{margin-bottom:24px}.index-module_container_y\\+him .fish-tabs-nav:before{display:none}.index-module_container_y\\+him .fish-tabs-ink-bar{display:none}.index-module_container_y\\+him .fish-tabs-tab+.fish-tabs-tab{margin-left:0}.index-module_container_y\\+him .fish-tabs-tab{padding:9px 20px}.index-module_container_y\\+him .fish-tabs-tab-btn{font-size:14px;line-height:14px;color:#666}.index-module_container_y\\+him .fish-tabs-tab-active{border-radius:16px;background:var(--f-3-f-7-ff,#f3f7ff)}.index-module_container_y\\+him .fish-tabs-tab-active .fish-tabs-tab-btn{color:#1e62ec}.index-module_container_y\\+him.index-module_mobile_fjd59{width:100%;padding:12px 12px 0 12px}.index-module_list_KQnlU{min-height:500px}.index-module_mobileLoadMore_43-yu{text-align:center;color:#999;font-size:12px;line-height:18px;padding:12px 0 24px 0}.index-module_padList_YQpXl{display:flex;flex-wrap:wrap;gap:24px}.index-module_padList_YQpXl>*{flex:0 0 calc(33.33333% - 16px);box-sizing:border-box}", ""]);
|
|
2768
2768
|
// Exports
|
|
2769
2769
|
___CSS_LOADER_EXPORT___.locals = {
|
|
2770
2770
|
"container": "index-module_container_y+him",
|
|
2771
2771
|
"mobile": "index-module_mobile_fjd59",
|
|
2772
|
-
"list": "index-module_list_KQnlU"
|
|
2772
|
+
"list": "index-module_list_KQnlU",
|
|
2773
|
+
"mobileLoadMore": "index-module_mobileLoadMore_43-yu",
|
|
2774
|
+
"padList": "index-module_padList_YQpXl"
|
|
2773
2775
|
};
|
|
2774
2776
|
/* harmony default export */ __webpack_exports__["Z"] = (___CSS_LOADER_EXPORT___);
|
|
2775
2777
|
|
|
@@ -26771,18 +26773,20 @@ var config = {
|
|
|
26771
26773
|
/* harmony export */ "GF": function() { return /* binding */ isInWX; },
|
|
26772
26774
|
/* harmony export */ "uJ": function() { return /* binding */ xElectron; },
|
|
26773
26775
|
/* harmony export */ "IC": function() { return /* binding */ isInElectron; },
|
|
26774
|
-
/* harmony export */ "Df": function() { return /* binding */ isInMobile; }
|
|
26776
|
+
/* harmony export */ "Df": function() { return /* binding */ isInMobile; },
|
|
26777
|
+
/* harmony export */ "Td": function() { return /* binding */ isPadMode; }
|
|
26775
26778
|
/* harmony export */ });
|
|
26776
|
-
/* unused harmony
|
|
26779
|
+
/* unused harmony exports inIpad, isHarmonyOS, isHarmonyOSTablet, isHdDevice, detectDeviceType, detectDeviceTypes, isDeviceTablet */
|
|
26777
26780
|
var ua = window.navigator.userAgent.toLowerCase();
|
|
26778
26781
|
function isInWX() {
|
|
26779
26782
|
return ua.indexOf('micromessenger') > -1;
|
|
26780
26783
|
} // 判断是否在electron环境中
|
|
26781
26784
|
|
|
26782
|
-
var
|
|
26783
|
-
|
|
26785
|
+
var global = window.rawWindow || window;
|
|
26786
|
+
var xElectron = global.xElectron;
|
|
26787
|
+
|
|
26788
|
+
var isInElectron = !!xElectron; // export const isInElectron = true
|
|
26784
26789
|
|
|
26785
|
-
var isInElectron = !!xElectron;
|
|
26786
26790
|
function inIpad() {
|
|
26787
26791
|
var _window$navigator;
|
|
26788
26792
|
|
|
@@ -26797,6 +26801,68 @@ function inIpad() {
|
|
|
26797
26801
|
function isInMobile() {
|
|
26798
26802
|
return inIpad() || window.navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
|
|
26799
26803
|
}
|
|
26804
|
+
function isHarmonyOS() {
|
|
26805
|
+
return /arkweb/.test(ua) || /framecubeapp/.test(ua);
|
|
26806
|
+
} // 是否是鸿蒙平板
|
|
26807
|
+
|
|
26808
|
+
function isHarmonyOSTablet() {
|
|
26809
|
+
var screenWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.screen.width;
|
|
26810
|
+
return isHarmonyOS() && screenWidth >= 768;
|
|
26811
|
+
} // 是否是平板
|
|
26812
|
+
|
|
26813
|
+
var isHdDevice = function isHdDevice() {
|
|
26814
|
+
var userAgent = navigator.userAgent.toLowerCase();
|
|
26815
|
+
return /.hd./.test(userAgent);
|
|
26816
|
+
}; // 为了提高准确性,可以结合多种方法来检测设备类型。
|
|
26817
|
+
|
|
26818
|
+
function detectDeviceType() {
|
|
26819
|
+
var userAgent = navigator.userAgent.toLowerCase();
|
|
26820
|
+
console.log('userAgent_________', userAgent);
|
|
26821
|
+
var isHd = isHdDevice();
|
|
26822
|
+
var isTabletUA = /ipad|tablet|playbook|silk/.test(userAgent) && !/mobile/.test(userAgent);
|
|
26823
|
+
var isMobileUA = /iphone|android|windows phone|ipod|blackberry|iemobile|opera mini/.test(userAgent);
|
|
26824
|
+
var screenWidth = window.screen.width;
|
|
26825
|
+
var screenHeight = window.screen.height;
|
|
26826
|
+
console.log('screenWidth_____', screenWidth);
|
|
26827
|
+
console.log('screenHeight________', screenHeight);
|
|
26828
|
+
var isTabletSize = screenWidth >= 768 && screenWidth <= 1024 && screenHeight >= 768 && screenHeight <= 1024;
|
|
26829
|
+
var isMobileSize = window.innerWidth <= 800 && window.innerHeight <= 600;
|
|
26830
|
+
var touchPoints = navigator.maxTouchPoints || 0;
|
|
26831
|
+
|
|
26832
|
+
if (isHd || isTabletUA || isTabletSize && touchPoints > 2) {
|
|
26833
|
+
return 'tablet';
|
|
26834
|
+
} else if (isMobileUA || isMobileSize && touchPoints <= 2) {
|
|
26835
|
+
return 'mobile';
|
|
26836
|
+
} else if (inIpad()) {
|
|
26837
|
+
return 'tablet';
|
|
26838
|
+
} else {
|
|
26839
|
+
return 'other';
|
|
26840
|
+
}
|
|
26841
|
+
} // 设备类型
|
|
26842
|
+
|
|
26843
|
+
var detectDeviceTypes = {
|
|
26844
|
+
tablet: 'tablet',
|
|
26845
|
+
// 平板
|
|
26846
|
+
mobile: 'mobile',
|
|
26847
|
+
// 手机
|
|
26848
|
+
other: 'other' // 其他
|
|
26849
|
+
|
|
26850
|
+
}; // 是否是平板
|
|
26851
|
+
|
|
26852
|
+
function isDeviceTablet() {
|
|
26853
|
+
var device = detectDeviceType();
|
|
26854
|
+
console.log('device____________', device);
|
|
26855
|
+
return device === detectDeviceTypes.tablet;
|
|
26856
|
+
}
|
|
26857
|
+
function isPadMode() {
|
|
26858
|
+
var width = window.innerWidth;
|
|
26859
|
+
var padMode = isHarmonyOSTablet(width) || isDeviceTablet(); // 如果不在 app 中,宽度>=768时,也显示平板样式
|
|
26860
|
+
// if (!SMARTCAN && width >= 768) {
|
|
26861
|
+
// padMode = true
|
|
26862
|
+
// }
|
|
26863
|
+
|
|
26864
|
+
return padMode;
|
|
26865
|
+
}
|
|
26800
26866
|
|
|
26801
26867
|
/***/ }),
|
|
26802
26868
|
|
|
@@ -27213,7 +27279,7 @@ module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAFgCAYAAABn
|
|
|
27213
27279
|
/***/ (function(module) {
|
|
27214
27280
|
|
|
27215
27281
|
"use strict";
|
|
27216
|
-
module.exports = JSON.parse('{"_args":[["axios@0.21.4","
|
|
27282
|
+
module.exports = JSON.parse('{"_args":[["axios@0.21.4","/Users/githoniel/Desktop/git/x-edu-live-player"]],"_from":"axios@0.21.4","_id":"axios@0.21.4","_inBundle":false,"_integrity":"sha1-xnuQ3AVo5cHPKwuFjEO6KOLtpXU=","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.4","name":"axios","escapedName":"axios","rawSpec":"0.21.4","saveSpec":null,"fetchSpec":"0.21.4"},"_requiredBy":["/","/@gem-mine/request"],"_resolved":"http://registry.npm.sdp.nd/axios/download/axios-0.21.4.tgz","_spec":"0.21.4","_where":"/Users/githoniel/Desktop/git/x-edu-live-player","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.14.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"homepage":"https://axios-http.com","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.4"}');
|
|
27217
27283
|
|
|
27218
27284
|
/***/ })
|
|
27219
27285
|
|
|
@@ -61808,17 +61874,7 @@ function ListItem(_ref) {
|
|
|
61808
61874
|
alt: ""
|
|
61809
61875
|
}), formatLikesCount(liveExt.like_count || 0))), /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement("div", {
|
|
61810
61876
|
className: list_ListItem_index_module.mobileAction
|
|
61811
|
-
}
|
|
61812
|
-
data: data,
|
|
61813
|
-
subscription: subscription,
|
|
61814
|
-
onActionDetailClick: handleDetailClick,
|
|
61815
|
-
handleLogin: handleLogin,
|
|
61816
|
-
isLogin: isLogin,
|
|
61817
|
-
onSubscribe: onSubscribe,
|
|
61818
|
-
setIsSubscribe: setIsSubscribe,
|
|
61819
|
-
status: status,
|
|
61820
|
-
isMobile: true
|
|
61821
|
-
}))));
|
|
61877
|
+
})));
|
|
61822
61878
|
}
|
|
61823
61879
|
|
|
61824
61880
|
return /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement("div", {
|
|
@@ -61912,6 +61968,14 @@ function list_defineProperty(obj, key, value) { if (key in obj) { Object.defineP
|
|
|
61912
61968
|
|
|
61913
61969
|
|
|
61914
61970
|
|
|
61971
|
+
function list_toConsumableArray(arr) { return list_arrayWithoutHoles(arr) || list_iterableToArray(arr) || list_unsupportedIterableToArray(arr) || list_nonIterableSpread(); }
|
|
61972
|
+
|
|
61973
|
+
function list_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
61974
|
+
|
|
61975
|
+
function list_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
61976
|
+
|
|
61977
|
+
function list_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return list_arrayLikeToArray(arr); }
|
|
61978
|
+
|
|
61915
61979
|
function list_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
61916
61980
|
|
|
61917
61981
|
function list_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { list_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { list_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -61928,6 +61992,7 @@ function list_iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeo
|
|
|
61928
61992
|
|
|
61929
61993
|
function list_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
61930
61994
|
|
|
61995
|
+
/* eslint-disable no-nested-ternary */
|
|
61931
61996
|
|
|
61932
61997
|
|
|
61933
61998
|
|
|
@@ -61975,6 +62040,9 @@ function PublicLiveList(_ref) {
|
|
|
61975
62040
|
window._propSdpAppId = propSdpAppId;
|
|
61976
62041
|
}
|
|
61977
62042
|
|
|
62043
|
+
var isMobile = (0,util_env/* isInMobile */.Df)();
|
|
62044
|
+
var isPad = (0,util_env/* isPadMode */.Td)();
|
|
62045
|
+
|
|
61978
62046
|
var _useState = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)([]),
|
|
61979
62047
|
_useState2 = list_slicedToArray(_useState, 2),
|
|
61980
62048
|
list = _useState2[0],
|
|
@@ -61990,29 +62058,36 @@ function PublicLiveList(_ref) {
|
|
|
61990
62058
|
loading = _useState6[0],
|
|
61991
62059
|
setLoading = _useState6[1];
|
|
61992
62060
|
|
|
61993
|
-
var _useState7 = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)(
|
|
62061
|
+
var _useState7 = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)(false),
|
|
61994
62062
|
_useState8 = list_slicedToArray(_useState7, 2),
|
|
61995
|
-
|
|
61996
|
-
|
|
62063
|
+
loadingMore = _useState8[0],
|
|
62064
|
+
setLoadingMore = _useState8[1];
|
|
61997
62065
|
|
|
61998
|
-
var _useState9 = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)(
|
|
62066
|
+
var _useState9 = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)(1),
|
|
61999
62067
|
_useState10 = list_slicedToArray(_useState9, 2),
|
|
62000
|
-
|
|
62001
|
-
|
|
62068
|
+
page = _useState10[0],
|
|
62069
|
+
setPage = _useState10[1];
|
|
62002
62070
|
|
|
62003
|
-
var _useState11 = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)(
|
|
62071
|
+
var _useState11 = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)('all'),
|
|
62004
62072
|
_useState12 = list_slicedToArray(_useState11, 2),
|
|
62005
|
-
|
|
62006
|
-
|
|
62073
|
+
status = _useState12[0],
|
|
62074
|
+
setStatus = _useState12[1];
|
|
62007
62075
|
|
|
62008
|
-
var _useState13 = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)(
|
|
62076
|
+
var _useState13 = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)([]),
|
|
62009
62077
|
_useState14 = list_slicedToArray(_useState13, 2),
|
|
62010
|
-
|
|
62011
|
-
|
|
62078
|
+
subscription = _useState14[0],
|
|
62079
|
+
setSubscription = _useState14[1];
|
|
62080
|
+
|
|
62081
|
+
var _useState15 = (0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useState)(false),
|
|
62082
|
+
_useState16 = list_slicedToArray(_useState15, 2),
|
|
62083
|
+
isLogin = _useState16[0],
|
|
62084
|
+
setIsLogin = _useState16[1];
|
|
62012
62085
|
|
|
62013
62086
|
var handleTabChange = function handleTabChange(value) {
|
|
62014
62087
|
setStatus(value);
|
|
62015
62088
|
setPage(1);
|
|
62089
|
+
setList([]);
|
|
62090
|
+
setTotal(0);
|
|
62016
62091
|
};
|
|
62017
62092
|
|
|
62018
62093
|
var handlePageChange = function handlePageChange(value) {
|
|
@@ -62027,13 +62102,21 @@ function PublicLiveList(_ref) {
|
|
|
62027
62102
|
|
|
62028
62103
|
function _getList() {
|
|
62029
62104
|
_getList = list_asyncToGenerator( /*#__PURE__*/regenerator_default().mark(function _callee() {
|
|
62030
|
-
var data, items, count, curIsLogin, curSubscription;
|
|
62105
|
+
var isFirstPage, data, items, count, curIsLogin, curSubscription;
|
|
62031
62106
|
return regenerator_default().wrap(function _callee$(_context) {
|
|
62032
62107
|
while (1) {
|
|
62033
62108
|
switch (_context.prev = _context.next) {
|
|
62034
62109
|
case 0:
|
|
62035
|
-
|
|
62036
|
-
|
|
62110
|
+
isFirstPage = page === 1;
|
|
62111
|
+
|
|
62112
|
+
if (isFirstPage) {
|
|
62113
|
+
setLoading(true);
|
|
62114
|
+
setLoadingMore(false);
|
|
62115
|
+
} else {
|
|
62116
|
+
setLoadingMore(true);
|
|
62117
|
+
}
|
|
62118
|
+
|
|
62119
|
+
_context.next = 4;
|
|
62037
62120
|
return OpenLiveSearchFront({
|
|
62038
62121
|
status: status,
|
|
62039
62122
|
scopeType: scopeType,
|
|
@@ -62042,38 +62125,46 @@ function PublicLiveList(_ref) {
|
|
|
62042
62125
|
limit: PageSize
|
|
62043
62126
|
});
|
|
62044
62127
|
|
|
62045
|
-
case
|
|
62128
|
+
case 4:
|
|
62046
62129
|
data = _context.sent;
|
|
62047
62130
|
items = data.items, count = data.count;
|
|
62048
62131
|
|
|
62049
62132
|
if (!uc) {
|
|
62050
|
-
_context.next =
|
|
62133
|
+
_context.next = 16;
|
|
62051
62134
|
break;
|
|
62052
62135
|
}
|
|
62053
62136
|
|
|
62054
|
-
_context.next =
|
|
62137
|
+
_context.next = 9;
|
|
62055
62138
|
return uc.isLogin();
|
|
62056
62139
|
|
|
62057
|
-
case
|
|
62140
|
+
case 9:
|
|
62058
62141
|
curIsLogin = _context.sent;
|
|
62059
62142
|
|
|
62060
62143
|
if (!curIsLogin) {
|
|
62061
|
-
_context.next =
|
|
62144
|
+
_context.next = 16;
|
|
62062
62145
|
break;
|
|
62063
62146
|
}
|
|
62064
62147
|
|
|
62065
|
-
_context.next =
|
|
62148
|
+
_context.next = 13;
|
|
62066
62149
|
return getSubscription();
|
|
62067
62150
|
|
|
62068
|
-
case
|
|
62151
|
+
case 13:
|
|
62069
62152
|
curSubscription = _context.sent;
|
|
62070
62153
|
setSubscription(curSubscription);
|
|
62071
62154
|
setIsLogin(true);
|
|
62072
62155
|
|
|
62073
|
-
case
|
|
62074
|
-
|
|
62156
|
+
case 16:
|
|
62157
|
+
if (isMobile && page > 1) {
|
|
62158
|
+
setList(function (prev) {
|
|
62159
|
+
return [].concat(list_toConsumableArray(prev), list_toConsumableArray(items || []));
|
|
62160
|
+
});
|
|
62161
|
+
} else {
|
|
62162
|
+
setList(items || []);
|
|
62163
|
+
}
|
|
62164
|
+
|
|
62075
62165
|
setTotal(count || 0);
|
|
62076
|
-
setLoading(false);
|
|
62166
|
+
setLoading(false);
|
|
62167
|
+
setLoadingMore(false); // setList([
|
|
62077
62168
|
// {
|
|
62078
62169
|
// live_id: 'ac56674a-81cc-4401-8895-ccf1896fcfa0',
|
|
62079
62170
|
// live_name: '推进整本书阅读课程化建设,打造书香教室111111',
|
|
@@ -62154,7 +62245,7 @@ function PublicLiveList(_ref) {
|
|
|
62154
62245
|
// setTotal(1)
|
|
62155
62246
|
// setLoading(false)
|
|
62156
62247
|
|
|
62157
|
-
case
|
|
62248
|
+
case 20:
|
|
62158
62249
|
case "end":
|
|
62159
62250
|
return _context.stop();
|
|
62160
62251
|
}
|
|
@@ -62167,7 +62258,27 @@ function PublicLiveList(_ref) {
|
|
|
62167
62258
|
getList();
|
|
62168
62259
|
}, [page, status, refreshPage]);
|
|
62169
62260
|
var themeName = (0,cjs/* getXEduThemeName */.gV)();
|
|
62170
|
-
var
|
|
62261
|
+
var hasMore = list.length < total;
|
|
62262
|
+
(0,external_commonjs_react_commonjs2_react_root_React_namespaceObject.useEffect)(function () {
|
|
62263
|
+
if (!isMobile) return undefined;
|
|
62264
|
+
|
|
62265
|
+
var handleScroll = function handleScroll() {
|
|
62266
|
+
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
|
62267
|
+
var viewportHeight = window.innerHeight || document.documentElement.clientHeight;
|
|
62268
|
+
var docHeight = document.documentElement.scrollHeight;
|
|
62269
|
+
|
|
62270
|
+
if (docHeight - (scrollTop + viewportHeight) < 120 && !loading && !loadingMore && hasMore) {
|
|
62271
|
+
setPage(function (prev) {
|
|
62272
|
+
return prev + 1;
|
|
62273
|
+
});
|
|
62274
|
+
}
|
|
62275
|
+
};
|
|
62276
|
+
|
|
62277
|
+
window.addEventListener('scroll', handleScroll);
|
|
62278
|
+
return function () {
|
|
62279
|
+
window.removeEventListener('scroll', handleScroll);
|
|
62280
|
+
};
|
|
62281
|
+
}, [isMobile, loading, loadingMore, hasMore]);
|
|
62171
62282
|
return /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement("div", {
|
|
62172
62283
|
className: classnames_default()(containerClassName, src_list_index_module.container, themeName, list_defineProperty({}, src_list_index_module.mobile, isMobile))
|
|
62173
62284
|
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement(tabs, {
|
|
@@ -62181,7 +62292,7 @@ function PublicLiveList(_ref) {
|
|
|
62181
62292
|
loading: loading,
|
|
62182
62293
|
delay: 500
|
|
62183
62294
|
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement("div", {
|
|
62184
|
-
className: src_list_index_module.list
|
|
62295
|
+
className: classnames_default()(src_list_index_module.list, list_defineProperty({}, src_list_index_module.padList, isPad))
|
|
62185
62296
|
}, loading ? null : /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement((external_commonjs_react_commonjs2_react_root_React_default()).Fragment, null, !loading && list.length ? /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement((external_commonjs_react_commonjs2_react_root_React_default()).Fragment, null, list.map(function (listItem) {
|
|
62186
62297
|
return /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement(ListItem, {
|
|
62187
62298
|
themeName: themeName,
|
|
@@ -62194,7 +62305,9 @@ function PublicLiveList(_ref) {
|
|
|
62194
62305
|
isLogin: isLogin,
|
|
62195
62306
|
onSubscribe: onSubscribe
|
|
62196
62307
|
});
|
|
62197
|
-
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement(
|
|
62308
|
+
}), isMobile ? /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement("div", {
|
|
62309
|
+
className: src_list_index_module.mobileLoadMore
|
|
62310
|
+
}, loadingMore ? '加载中...' : hasMore ? '下拉加载更多' : '没有更多了') : /*#__PURE__*/external_commonjs_react_commonjs2_react_root_React_default().createElement(component_Pagination_Pagination, {
|
|
62198
62311
|
total: total,
|
|
62199
62312
|
pageSize: PageSize,
|
|
62200
62313
|
current: page,
|