|
@@ -9,10 +9,10 @@
|
|
|
<span key="comment-basic-like">
|
|
<span key="comment-basic-like">
|
|
|
<a-tooltip title="点赞">
|
|
<a-tooltip title="点赞">
|
|
|
<template v-if="item.isLike == 1">
|
|
<template v-if="item.isLike == 1">
|
|
|
- <HeartOutlined :style="{ color: '#fa6c8d' }" @click="like(item)" />
|
|
|
|
|
|
|
+ <HeartOutlined :style="{ color: '#fa6c8d' }" @click="like(item,0)" />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
- <HeartOutlined @click="like(item)" />
|
|
|
|
|
|
|
+ <HeartOutlined @click="like(item,1)" />
|
|
|
</template>
|
|
</template>
|
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
|
<span style="padding-left: 8px; cursor: auto">
|
|
<span style="padding-left: 8px; cursor: auto">
|
|
@@ -92,7 +92,7 @@
|
|
|
if (!val) return ''
|
|
if (!val) return ''
|
|
|
return parseTime(val, '{y}-{m}-{d} {h}:{i}:{s}')
|
|
return parseTime(val, '{y}-{m}-{d} {h}:{i}:{s}')
|
|
|
}
|
|
}
|
|
|
- const like = (item) => {
|
|
|
|
|
|
|
+ const like = (item,l) => {
|
|
|
forumApi
|
|
forumApi
|
|
|
.postlikeSubmit(
|
|
.postlikeSubmit(
|
|
|
{
|
|
{
|
|
@@ -102,7 +102,7 @@
|
|
|
item.isLike
|
|
item.isLike
|
|
|
)
|
|
)
|
|
|
.then((data) => {
|
|
.then((data) => {
|
|
|
- item.isLike = !item.isLike
|
|
|
|
|
|
|
+ item.isLike = l
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
const showDeleteConfirm = (item) => {
|
|
const showDeleteConfirm = (item) => {
|