mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-04 17:43:09 +08:00
打包
This commit is contained in:
@@ -50,6 +50,7 @@ const handleCollect = async (index: number): Promise<void> => {
|
||||
try {
|
||||
const articleId: number = collectData.value[index].articleId
|
||||
await cancelCollect({ articleId })
|
||||
uni.$u.toast('已取消收藏')
|
||||
paging.value.reload()
|
||||
} catch (err) {
|
||||
//TODO handle the exception
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
<view class="panel-btn flex items-center px-[34rpx]" @click="handleAddCollect(newsData.id)">
|
||||
<u-icon
|
||||
:name="newsData.collect ? 'star-fill' : 'star'"
|
||||
size="34"
|
||||
:color="newsData.collect ? '#4173ff' : '#333'"
|
||||
size="40"
|
||||
:color="newsData.collect ? '#F7BA47' : '#333'"
|
||||
></u-icon>
|
||||
<text class="ml-[10rpx]">收藏</text>
|
||||
</view>
|
||||
@@ -55,7 +55,7 @@ const handleAddCollect = async (articleId: number) => {
|
||||
try {
|
||||
if (newsData.value.collect) {
|
||||
await cancelCollect({ articleId })
|
||||
uni.$u.toast('取消收藏成功')
|
||||
uni.$u.toast('已取消收藏')
|
||||
} else {
|
||||
await addCollect({ articleId })
|
||||
uni.$u.toast('收藏成功')
|
||||
|
||||
Reference in New Issue
Block a user