test
parent
8c37bca675
commit
8044edca44
|
@ -256,11 +256,16 @@ FluArea {
|
||||||
iconSource: content_page.isFavorite ? FluentIcons.FavoriteStarFill : FluentIcons.FavoriteStar
|
iconSource: content_page.isFavorite ? FluentIcons.FavoriteStarFill : FluentIcons.FavoriteStar
|
||||||
onClicked: {
|
onClicked: {
|
||||||
content_page.isFavorite = !content_page.isFavorite
|
content_page.isFavorite = !content_page.isFavorite
|
||||||
|
console.log(content_page.isFavorite)
|
||||||
content_page.favoriteCount += (content_page.isFavorite ? 1 : -1)
|
content_page.favoriteCount += (content_page.isFavorite ? 1 : -1)
|
||||||
Request.put("knowledge/" + knowledgeFileId + "/star",
|
Request.put("knowledge/" + knowledgeFileId + "/star",
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
"active": content_page.isFavorite
|
"active": content_page.isFavorite
|
||||||
}))
|
}), response => {
|
||||||
|
console.log(response)
|
||||||
|
}, response => {
|
||||||
|
console.log(response)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FluText {
|
FluText {
|
||||||
|
|
Loading…
Reference in New Issue