-
-
-
-
+
+
{
- axiosApiInstance.get(`api/navigation/newscrossroad/?id=${route.query.id}`).then(result => {
+ axiosApiInstance.get(`api/navigation/newscrossroad/?id=${route.query.id}`).then(result => {
newsFull.value=result.data.result[0]
- // console.log(result.data.result[0], 'vvvvvvvvvvvvvvv');
+
// newss.value= result.data
// if (newss.value.result[0].gallery.length > 0) {
@@ -427,10 +447,13 @@ export default {
// ]
// )
- // gallery.value = true
-
- // }
+ if (newsFull.value.gallery.length> 0) {
+ gallery.value = true
+ }
+
+
+
})
@@ -507,22 +530,40 @@ export default {
axiosApiInstance.post(`api/navigation/gallery/`, {image: idimage}).then(result => {
newsFull.value.gallery.filter(e=>e.id ==idimage)[0].likes = result.data
})
-
-
-
-
-
}
const heartIco = () => {
return galleryimges.value.likes.filter(e=>e.user==accountStore.user.login).length==1
}
+ const toggleIncrementLike = (news, scores) => {
+ axiosApiInstance.post(`api/navigation/news/`, {news: news, scores: scores}).then(result => {
+ newsFull.value.scores= result.data
+ })
+
+ }
+ const downloadimg = (idimg) => {
+
+ let link = document.createElement("a")
+
+ link.href = burl+idimg
+ link.download ='img.jpeg'
+ link.click()
+ console.log(burl, idimg,'22222222222222222');
+ link.remove()
+
+ }
-
-
+
+ // const excelOp = (ex) => {
+ // axiosApiInstance.get(`api/general_vacation/dailyroundup/?excel=${ex}`).then(result => {
+ // let link = document.createElement("a")
+ // link.href = baseURL+result.data.path
+ // link.click()
+ // link.remove()
+ // })
+ // }
return {
-
route,
newsFull,
gallery,
@@ -543,7 +584,9 @@ export default {
openImg,
dialogfoto,
galleryimges,
- indximg
+ indximg,
+ toggleIncrementLike,
+ downloadimg
}
}
@@ -557,4 +600,10 @@ export default {
color: white!important;
}
+
+.h_cards {
+
+height: 86vh;
+}
+
\ No newline at end of file