|
|
<template>
|
|
|
<view>
|
|
|
<view class="misslist">
|
|
|
<u-empty
|
|
|
marginTop="251"
|
|
|
mode="list"
|
|
|
text="暂无收藏"
|
|
|
v-if="!list.length"
|
|
|
>
|
|
|
</u-empty>
|
|
|
<view class="misslist" v-if="list.length">
|
|
|
<custom-waterfalls-flow :value="list" :columnSpace="1.5" :seat="2" @edit="edit" @del="del"
|
|
|
@wapperClick="wapperClick" @imageClick="wapperClick">
|
|
|
<template v-slot:default="item">
|
|
|
<view class="item">
|
|
|
<view class="title">{{item.title}}</view>
|
|
|
<view class="desc">{{item.desc}}</view>
|
|
|
<view class="title">{{item.name}}</view>
|
|
|
<view class="desc">{{item.sort.name}}</view>
|
|
|
<view class="desc flexA">
|
|
|
张三
|
|
|
{{item.seller_name}}
|
|
|
<view class="money">
|
|
|
<text style="font-size: 20rpx;">¥</text>120
|
|
|
</view>
|
...
|
...
|
@@ -17,6 +24,7 @@ |
|
|
</template>
|
|
|
</custom-waterfalls-flow>
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
|
...
|
...
|
@@ -33,43 +41,26 @@ |
|
|
}, {
|
|
|
name: '已售出'
|
|
|
}],
|
|
|
list: [{
|
|
|
image: 'https://via.placeholder.com/200x500.png/ff0000',
|
|
|
title: '比特币',
|
|
|
desc: '所属分类:1 文博收藏品'
|
|
|
}, {
|
|
|
image: 'https://via.placeholder.com/200x300.png/9400D3',
|
|
|
title: '我是标题4',
|
|
|
desc: '描述描述描述描述描述描述描述描述4'
|
|
|
},
|
|
|
{
|
|
|
image: 'https://via.placeholder.com/100x240.png/B0E0E6',
|
|
|
title: '我是标题5',
|
|
|
desc: '描述描述描述描述描述描述描述描述5'
|
|
|
},
|
|
|
{
|
|
|
image: 'https://via.placeholder.com/140x280.png/7FFFAA',
|
|
|
title: '我是标题6',
|
|
|
desc: '描述描述描述描述描述描述描述描述6'
|
|
|
},
|
|
|
{
|
|
|
image: 'https://via.placeholder.com/40x60.png/EEE8AA',
|
|
|
title: '我是标题7',
|
|
|
desc: '描述描述描述描述描述描述描述描述7'
|
|
|
}
|
|
|
],
|
|
|
list: [],
|
|
|
page:1,
|
|
|
num:10,
|
|
|
lastPage:1
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
onShow() {
|
|
|
this.page = 1
|
|
|
this.list= [ ]
|
|
|
this.myFav()
|
|
|
},
|
|
|
methods: {
|
|
|
async myFav(){
|
|
|
try {
|
|
|
const res = await myFav(this.page)
|
|
|
const res = await myFav(this.page,this.num)
|
|
|
console.log('myFav', res)
|
|
|
res.list.data.forEach(it=>{
|
|
|
it.image = it.images_preview[0]
|
|
|
})
|
|
|
this.list = this.list.concat( res.list.data)
|
|
|
this.lastPage= res.list.last_page
|
|
|
// 保存数据
|
|
|
} catch (err) {
|
...
|
...
|
@@ -84,15 +75,18 @@ |
|
|
console.log('del', e);
|
|
|
},
|
|
|
wapperClick(item) {
|
|
|
uni.navigateTo({
|
|
|
url:'/pages/index/detail?id='+item.id
|
|
|
})
|
|
|
console.log('单项点击事件', item)
|
|
|
}
|
|
|
},
|
|
|
// 触底触发
|
|
|
onReachBottom() {
|
|
|
// if(that.page >= that.lastPage) return
|
|
|
// that.page=that.page+1
|
|
|
// this.getForum()
|
|
|
this.list = this.list.concat(this.list)
|
|
|
if(this.page >= this.lastPage) return
|
|
|
this.page=this.page+1
|
|
|
this.myFav()
|
|
|
// this.list = this.list.concat(this.list)
|
|
|
},
|
|
|
}
|
|
|
</script>
|
...
|
...
|
|