|
@@ -182,6 +182,7 @@ var _home = __webpack_require__(/*! ../../api/home.js */ 21);function _interopRe
|
|
|
|
|
|
data: function data() {
|
|
|
return {
|
|
|
+ hasMore: true, // 是否有更多视频数据
|
|
|
videoList: [], // 视频列表
|
|
|
videoTotal: 0,
|
|
|
payload: {
|
|
@@ -202,7 +203,7 @@ var _home = __webpack_require__(/*! ../../api/home.js */ 21);function _interopRe
|
|
|
// 通过getApp()传参
|
|
|
getApp().globalData.videoListJumpParams = { currentPageIndex: currentPageIndex, currentVideoIndex: currentVideoIndex, videoList: videoList, source: 'search', videoTotal: this.videoTotal };
|
|
|
console.log("getApp全局数据: ", getApp().globalData);
|
|
|
- uni.redirectTo({
|
|
|
+ uni.navigateTo({
|
|
|
url: '/pages/videoPlayer/videoPlayer' });
|
|
|
|
|
|
},
|
|
@@ -246,6 +247,7 @@ var _home = __webpack_require__(/*! ../../api/home.js */ 21);function _interopRe
|
|
|
title: '没有更多数据了...',
|
|
|
icon: 'none' });
|
|
|
|
|
|
+ _this2.hasMore = false;
|
|
|
}
|
|
|
} else {
|
|
|
uni.showToast({
|
|
@@ -273,10 +275,12 @@ var _home = __webpack_require__(/*! ../../api/home.js */ 21);function _interopRe
|
|
|
|
|
|
// 页面触底的生命周期
|
|
|
onReachBottom: function onReachBottom() {
|
|
|
- uni.showLoading({
|
|
|
- title: '加载中...' });
|
|
|
+ if (this.hasMore) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中...' });
|
|
|
|
|
|
- this.getList();
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
},
|
|
|
onShow: function onShow() {
|
|
|
this.getList();
|