|
|
@@ -6,40 +6,41 @@
|
|
|
<div style="width: 100%">
|
|
|
<div style="display: flex; flex-direction: column; margin-bottom: 0px">
|
|
|
<span style="display: block; font-size: 14px; font-weight: bold; margin-bottom: 0px">{{
|
|
|
- props.item.name
|
|
|
+ props.item.userName
|
|
|
}}</span>
|
|
|
- <span style="display: block; font-size: 12px">{{ props.item.talk }}</span>
|
|
|
+ <span style="display: block; font-size: 12px">{{ props.item.commentName }}</span>
|
|
|
</div>
|
|
|
<div style="width: 100%; display: flex; justify-content: space-between">
|
|
|
<div>
|
|
|
- <span style="font-size: 10px">1天前</span>
|
|
|
+ <span style="font-size: 10px">{{ props.item.commentTime }}</span>
|
|
|
</div>
|
|
|
<div style="display: flex">
|
|
|
<div>
|
|
|
- <MessageOutlined @click="handerMessage" />
|
|
|
- <span style="margin-left: 5px">10</span>
|
|
|
+ <MessageOutlined style="cursor: pointer" @click="handerMessage" />
|
|
|
+ <span style="margin-left: 5px">{{ props.item.childSize }}</span>
|
|
|
</div>
|
|
|
<div style="margin-left: 15px">
|
|
|
- <LikeOutlined @click="handerfollw" />
|
|
|
- <span style="margin-left: 5px">10</span>
|
|
|
+ <!-- <LikeFilled /> -->
|
|
|
+ <LikeOutlined style="cursor: pointer" @click="handerfollw" />
|
|
|
+ <span style="margin-left: 5px">{{ props.item.giveNum }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-show="props.item.callBackTalk.length > 0" v-for="(item, index) in props.item.callBackTalk" :key="index">
|
|
|
+ <div v-show="props.item.child.length > 0" v-for="(item, index) in props.item.child" :key="index">
|
|
|
<div style="display: flex; margin-left: 50px; margin-right: 0px">
|
|
|
<div style="width: 40px; height: 40px; background: #1e90ff; border-radius: 50%; margin-right: 10px"></div>
|
|
|
<div style="width: 100%">
|
|
|
<div style="display: flex; flex-direction: column; margin-bottom: 0px">
|
|
|
<span style="display: block; font-size: 14px; font-weight: bold; margin-bottom: 5px">{{
|
|
|
- item.name
|
|
|
+ item.userName
|
|
|
}}</span>
|
|
|
- <span style="display: block; font-size: 12px">{{ item.talk }}</span>
|
|
|
+ <span style="display: block; font-size: 12px">{{ item.commentName }}</span>
|
|
|
</div>
|
|
|
<div style="width: 100%; display: flex; justify-content: space-between">
|
|
|
<div>
|
|
|
- <span style="font-size: 10px">1天前</span>
|
|
|
+ <span style="font-size: 10px">{{ item.commentTime }}</span>
|
|
|
</div>
|
|
|
<div style="display: flex">
|
|
|
<!-- <div>
|
|
|
@@ -47,8 +48,9 @@
|
|
|
<span style="margin-left: 5px">10</span>
|
|
|
</div> -->
|
|
|
<div style="margin-left: 15px">
|
|
|
- <LikeOutlined @click="handerfollw" />
|
|
|
- <span style="margin-left: 5px">10</span>
|
|
|
+ <!-- <LikeFilled /> -->
|
|
|
+ <LikeOutlined style="cursor: pointer" @click="handerfollwChild(item)" />
|
|
|
+ <span style="margin-left: 5px">{{ item.giveNum }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -58,9 +60,9 @@
|
|
|
|
|
|
<div v-if="tallTag">
|
|
|
<div>
|
|
|
- <a-textarea placeholder="" :rows="4" style="margin-top: 5px" />
|
|
|
+ <a-textarea placeholder="" v-model:value="talk" :rows="4" style="margin-top: 5px" />
|
|
|
<div style="display: flex; justify-content: flex-end; margin-top: 10px">
|
|
|
- <a-button style="width: 100px" @click="handerPublish">发布</a-button>
|
|
|
+ <a-button style="width: 100px" @click="handerPublish">回复</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -72,6 +74,7 @@
|
|
|
import { ref } from 'vue'
|
|
|
import TabSwitcher from './TabSwitcher.vue'
|
|
|
import EventBus from '@/utils/EventBus'
|
|
|
+ import { addViewCount, detail, add, cancel, queryList, pageComment, addComment, giveComment } from '@/api/portal'
|
|
|
const emit = defineEmits(['selectTab'])
|
|
|
|
|
|
// id: 1,
|
|
|
@@ -83,11 +86,11 @@
|
|
|
item: {
|
|
|
type: Object,
|
|
|
default: () => {}
|
|
|
+ },
|
|
|
+ id: {
|
|
|
+ type: String,
|
|
|
+ default: () => ''
|
|
|
}
|
|
|
- // name: {
|
|
|
- // type: String,
|
|
|
- // default: () => ''
|
|
|
- // },
|
|
|
// talk: {
|
|
|
// type: String,
|
|
|
// default: () => ''
|
|
|
@@ -103,6 +106,7 @@
|
|
|
})
|
|
|
const listUnpublishedView = ref(null)
|
|
|
const tallTag = ref(false)
|
|
|
+ const talk = ref('')
|
|
|
const handerMessage = (form) => {
|
|
|
console.log('查询内容', form)
|
|
|
tallTag.value == true ? (tallTag.value = false) : (tallTag.value = true)
|
|
|
@@ -117,15 +121,25 @@
|
|
|
console.log('item有变化吗', val)
|
|
|
}
|
|
|
)
|
|
|
+
|
|
|
+ const handerfollw = async () => {
|
|
|
+ await giveComment({ id: props.item.id })
|
|
|
+ EventBus.emit('onGetPageComment')
|
|
|
+ }
|
|
|
+ const handerfollwChild = async (item) => {
|
|
|
+ await giveComment({ id: item.id })
|
|
|
+ EventBus.emit('onGetPageComment')
|
|
|
+ }
|
|
|
const handerPublish = () => {
|
|
|
tallTag.value = false
|
|
|
- emit('publish')
|
|
|
+ emit('publish', { resourceId: props.id, id: props.item.id, talk: talk.value })
|
|
|
|
|
|
//....
|
|
|
// listUnpublishedView.value.setData(tableData.value)
|
|
|
}
|
|
|
const handleCloseInput = (data, tag) => {
|
|
|
if (props.item.id != tag) {
|
|
|
+ talk.value = ''
|
|
|
tallTag.value = false
|
|
|
}
|
|
|
}
|