Решение - разные сеилизаторы

This commit is contained in:
iriska-gri committed 2023-09-12 12:58:46 +03:00
1 parent 57c9bdc9b2
commit 5c96958d1c
6 files changed
+55 -23

No files matched your search

+15 -11
View File
@@ -51,6 +51,7 @@
</v-container>
</v-card-text>
<v-card-actions class="pt-0">
<small v-if="average < 5 || comment.length > 0" class="pl-5">
Вы оценили сайт на <span class="font-weight-black">{{average}}</span> {{myLabel()}}
@@ -112,7 +113,7 @@ export default {
.then(data => {
t_userComment.value = data.data.results
})
}
onMounted(() => {
@@ -173,18 +174,21 @@ export default {
}
function proba() {
console.log(t_userComment.value, 't_userComment.value');
f_userComment()
// console.log(t_userComment.value, 't_userComment.value');
// console.log(ratingStatus.value.decFeed, 'ratingStatus.value.decFeed');
// const feedObj = {}
const feedObj = {}
// feedObj.comment = comment.value
// feedObj.ratingstatus = ratingStatus.value.decFeed
// if (t_userComment.value.length==0) {
// axiosApiInstance.post(`api/feedback/userComment/`, feedObj)
// }
// else {
// axiosApiInstance.put(`api/feedback/userCommentUp/${t_userComment.value[0].id}/`, feedObj)
// }
feedObj.comment = comment.value
feedObj.ratingstatus = ratingStatus.value.decFeed
if (t_userComment.value.length==0) {
console.log('111111111111111111');
axiosApiInstance.post(`api/feedback/userComment/`, feedObj)
}
else {
axiosApiInstance.put(`api/feedback/userCommentUp/${t_userComment.value[0].id}/`, feedObj)
}
console.log(t_userComment.value);
}
return {t_baseCriteria, tab_userComment, comment, average, feedAll, feedUp, menusCloses, myLabel, proba}