Лайки на главной странице
This commit is contained in:
1 parent
480863117b
commit
859fc665c8
1 file changed
+17
-17
@@ -734,24 +734,26 @@ export default {
|
|||||||
axiosApiInstance.post(`api/navigation/gallery/`, {image: idimage}).then(result => {
|
axiosApiInstance.post(`api/navigation/gallery/`, {image: idimage}).then(result => {
|
||||||
galleryimges.value.likes= result.data
|
galleryimges.value.likes= result.data
|
||||||
})
|
})
|
||||||
// if (galleryimges.value.likes.filter(e=>e.user==accountStore.user.login).length==1) {
|
|
||||||
// heart.value = true
|
|
||||||
// }
|
|
||||||
console.log(galleryimges.value, '===========================================');
|
|
||||||
|
|
||||||
|
console.log(newss.value.result, '===========================================');
|
||||||
|
|
||||||
|
|
||||||
// let mark = likes.filter(e=>e.user==accountStore.user.login)
|
|
||||||
// if (mark.length > 0) {
|
|
||||||
// console.log(mark, 'likes>0');
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// console.log('0');
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const toggleLikeAll = (idimage) => {
|
||||||
|
|
||||||
|
axiosApiInstance.post(`api/navigation/gallery/`, {image: idimage}).then(result => {
|
||||||
|
newss.value.result[0].gallery[idimage-1].likes = result.data
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
console.log(newss.value.result[0].gallery[idimage]
|
||||||
|
, '===========================================')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
const heartIco = () => {
|
const heartIco = () => {
|
||||||
return galleryimges.value.likes.filter(e=>e.user==accountStore.user.login).length==1
|
return galleryimges.value.likes.filter(e=>e.user==accountStore.user.login).length==1
|
||||||
}
|
}
|
||||||
@@ -761,9 +763,7 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const toggleLikeAll = (id) => {
|
|
||||||
console.log(id, '----------------------');
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
newss,
|
newss,
|
||||||
@@ -794,8 +794,8 @@ export default {
|
|||||||
indximg,
|
indximg,
|
||||||
toggleLike,
|
toggleLike,
|
||||||
heartIco,
|
heartIco,
|
||||||
toggleLikeAll,
|
heartIcoAll,
|
||||||
heartIcoAll
|
toggleLikeAll
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user