|
@@ -212,7 +212,10 @@ var _home = __webpack_require__(/*! ../../api/home.js */ 21);function _interopRe
|
|
|
switchVaild: function switchVaild() {
|
|
|
switch (this.source) {
|
|
|
case "myLike":
|
|
|
- this.getVideoList(_home.reqGetMyLikeList);}
|
|
|
+ this.getVideoList(_home.reqGetMyLikeList);
|
|
|
+ break;
|
|
|
+ case "search":
|
|
|
+ this.getVideoList(_home.reqGetSearchList);}
|
|
|
|
|
|
},
|
|
|
|
|
@@ -362,8 +365,7 @@ var _home = __webpack_require__(/*! ../../api/home.js */ 21);function _interopRe
|
|
|
var videoIndex = e.target.current;
|
|
|
if (videoIndex < this.currentIndex) {
|
|
|
// pre operation
|
|
|
- console.log("上滑操作...");
|
|
|
- if (videoIndex === 0) {
|
|
|
+ if (videoIndex === 0 && this.prePageIndex > 0) {
|
|
|
// 第一个视频
|
|
|
this.videoParams.pageIndex = this.prePageIndex;
|
|
|
this.switchVaild();
|
|
@@ -371,7 +373,6 @@ var _home = __webpack_require__(/*! ../../api/home.js */ 21);function _interopRe
|
|
|
|
|
|
} else if (videoIndex > this.currentIndex) {
|
|
|
// next operation
|
|
|
- console.log("下滑操作...");
|
|
|
if (videoIndex === this.videoList.length - 1) {
|
|
|
// 最后一个视频
|
|
|
this.videoParams.pageIndex = this.nextPageIndex;
|
|
@@ -398,9 +399,9 @@ var _home = __webpack_require__(/*! ../../api/home.js */ 21);function _interopRe
|
|
|
this.prePageIndex = videoListJumpParams.currentPageIndex - 1;
|
|
|
this.nextPageIndex = videoListJumpParams.currentPageIndex + 1;
|
|
|
this.currentVideoIndex = videoListJumpParams.currentVideoIndex;
|
|
|
- console.log("prePageIndex: ", this.prePageIndex);
|
|
|
- console.log("nextPageIndex: ", this.nextPageIndex);
|
|
|
- console.log("currentVideoIndex: ", this.currentVideoIndex);
|
|
|
+ /* console.log("prePageIndex: ", this.prePageIndex)
|
|
|
+ console.log("nextPageIndex: ", this.nextPageIndex)
|
|
|
+ console.log("currentVideoIndex: ", this.currentVideoIndex) */
|
|
|
this.videoTotal = videoListJumpParams.videoTotal;
|
|
|
this.videoList = videoListJumpParams.videoList.map(function (item) {
|
|
|
return _objectSpread({},
|