|
@@ -101,8 +101,15 @@ export default {
|
|
|
onPullDownRefresh() {
|
|
|
setTimeout(() => {
|
|
|
this.listParams.pageNum = 1;
|
|
|
- this.qbwd = [];
|
|
|
- let result = this.getList(this.listParams.flag,'刷新')
|
|
|
+ listWx({
|
|
|
+ type:11,
|
|
|
+ isTop:1
|
|
|
+ }).then(e => {
|
|
|
+ this.topList = e.data
|
|
|
+ this.qbwd = this.topList
|
|
|
+ console.log(this.listParams.flag)
|
|
|
+ this.getList(this.listParams.flag)
|
|
|
+ })
|
|
|
},500)
|
|
|
},
|
|
|
onReachBottom(){
|
|
@@ -140,14 +147,14 @@ export default {
|
|
|
// 取消点赞
|
|
|
likeServer({
|
|
|
id:e.id,
|
|
|
- type:12
|
|
|
+ type:11
|
|
|
})
|
|
|
let deleteIdx = this.favoriteList.findIndex((v => v == e.id))
|
|
|
this.favoriteList.splice(deleteIdx,1)
|
|
|
} else {
|
|
|
likeServer({
|
|
|
id:e.id,
|
|
|
- type:12
|
|
|
+ type:11
|
|
|
})
|
|
|
this.favoriteList.push(e.id)
|
|
|
}
|
|
@@ -156,18 +163,20 @@ export default {
|
|
|
this.listParams.titleName = ''
|
|
|
},
|
|
|
search(){
|
|
|
+ this.listParams.pageNum = 1
|
|
|
this.listParams.titleName = this.searchValue
|
|
|
+ this.qbwd = this.topList
|
|
|
this.getList()
|
|
|
},
|
|
|
getList(val = null,toastVal = '加载'){
|
|
|
- this.listParams.flag = val || ''
|
|
|
- this.qbwd = this.topList
|
|
|
+ if(val){
|
|
|
+ this.listParams.flag = val
|
|
|
+ this.listParams.pageNum = 1
|
|
|
+ this.qbwd = this.topList
|
|
|
+ }
|
|
|
listWxs(this.listParams).then(res => {
|
|
|
this.qbwd = [...this.qbwd,...res.rows]
|
|
|
this.total = res.total
|
|
|
- uni.showToast({
|
|
|
- title:`${toastVal}成功`
|
|
|
- })
|
|
|
})
|
|
|
},
|
|
|
goDetails(e) {
|