|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<text @click="getMyCollection()">这是我的收藏</text> |
|
|
|
<text>这是我的收藏</text> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -13,23 +13,24 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
//this.getMyCollection() |
|
|
|
this.getMyCollection(1) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getMyCollection(){ |
|
|
|
|
|
|
|
getMyCollection(userId){ |
|
|
|
let data = { |
|
|
|
"userId" : 1 |
|
|
|
} |
|
|
|
const res = getCollectionList(data) |
|
|
|
if(res.data.code === 200){ |
|
|
|
//this.banner = res.data.data |
|
|
|
console.log('结果为:',res) |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
content: '我的收藏加载失败!', |
|
|
|
showCancel: false |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
const res = getCollectionList(data); |
|
|
|
// if(res.data.code === 200){ |
|
|
|
// //this.banner = res.data.data |
|
|
|
// console.log('结果为:',res) |
|
|
|
// }else{ |
|
|
|
// uni.showModal({ |
|
|
|
// content: '我的收藏加载失败!', |
|
|
|
// showCancel: false |
|
|
|
// }); |
|
|
|
// } |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|