|
@@ -7,7 +7,6 @@ import {
|
|
|
getLikeNote
|
|
|
} from '~/api/video'
|
|
|
import reachBottom from '~/mixins/reachBottom'
|
|
|
-let that = this
|
|
|
Component({
|
|
|
behaviors: [reachBottom],
|
|
|
properties: {
|
|
@@ -88,9 +87,19 @@ Component({
|
|
|
})
|
|
|
},
|
|
|
loadMore() {
|
|
|
- console.log(this);
|
|
|
if (this.data.type == 'like') {
|
|
|
- this.getData(this.getLikeNotes, {
|
|
|
+ this.getData((data) => {
|
|
|
+ return new Promise(async (reslove) => {
|
|
|
+ let res = await getLikeNotes(data)
|
|
|
+ if (this.data.firstData) {
|
|
|
+ res.list = res.list.filter(item => {
|
|
|
+ return item.id != this.data.firstData.id
|
|
|
+ })
|
|
|
+ res.list.unshift(this.data.firstData)
|
|
|
+ }
|
|
|
+ reslove(res)
|
|
|
+ })
|
|
|
+ }, {
|
|
|
userReadId: this.data.columnId,
|
|
|
})
|
|
|
} else {
|
|
@@ -99,20 +108,6 @@ Component({
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- getLikeNotes(data) {
|
|
|
- console.log(that);
|
|
|
- return new Promise(async (reslove) => {
|
|
|
- let res = await getLikeNotes(data)
|
|
|
- if (this.data.firstData) {
|
|
|
- res.list = res.list.filter(item => {
|
|
|
- return item.id != this.data.firstData.id
|
|
|
- })
|
|
|
- res.list.unshift(this.data.firstData)
|
|
|
- }
|
|
|
- console.log(res);
|
|
|
- reslove(res)
|
|
|
- })
|
|
|
- },
|
|
|
bindKeyInput(e) {
|
|
|
this.setData({
|
|
|
detailDesc: e.detail.value
|