抖音小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
754 B

<template>
<view>
<text>这是我的收藏</text>
<view v-for="(item,index) in myCollection" :key="index">
<image :src="item.imgUrl"></image>
</view>
</view>
</template>
<script>
import {getCollectionList} from '@/api/myCollection.js'
export default {
data() {
return {
myCollection:[]
}
},
onLoad() {
this.getMyCollection(1)
},
methods: {
async getMyCollection(userId){
let data = {
userId : userId
}
const res = await getCollectionList(data)
if(res.data.code === 200){
this.myCollection = res.data.data
console.log(res)
}else{
uni.showModal({
content: '我的收藏加载失败!',
showCancel: false
});
}
}
}
}
</script>
<style>
</style>