diff --git a/src/components/UserInfo/index.vue b/src/components/UserInfo/index.vue new file mode 100644 index 0000000..0d65ff7 --- /dev/null +++ b/src/components/UserInfo/index.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/src/views/rating/pk/comment/components/CommentReplyList.vue b/src/views/rating/pk/comment/components/CommentReplyList.vue index 07a68d7..358f224 100644 --- a/src/views/rating/pk/comment/components/CommentReplyList.vue +++ b/src/views/rating/pk/comment/components/CommentReplyList.vue @@ -27,25 +27,7 @@ @@ -78,9 +60,11 @@ import { getCommentList, toggleEnable } from '@/api/rating/pk' import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' + import UserInfo from '@/components/UserInfo' export default { name: 'CommentReplyList', + components: { UserInfo }, data() { return { title: '回复列表', @@ -188,46 +172,4 @@ .meta-item i { margin-right: 4px; } - - .user-info-cell { - display: flex; - align-items: center; - } - - .user-avatar, - .user-avatar-placeholder { - width: 32px; - height: 32px; - border-radius: 50%; - margin-right: 8px; - flex-shrink: 0; - } - - .user-avatar-placeholder { - background-color: #f0f2f5; - display: flex; - align-items: center; - justify-content: center; - color: #909399; - font-size: 16px; - } - - .user-details { - display: flex; - flex-direction: column; - overflow: hidden; - } - - .user-nickname { - font-weight: bold; - color: #303133; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - .user-id { - font-size: 12px; - color: #909399; - } diff --git a/src/views/rating/pk/comment/index.vue b/src/views/rating/pk/comment/index.vue index 56fbc3d..ec1113f 100644 --- a/src/views/rating/pk/comment/index.vue +++ b/src/views/rating/pk/comment/index.vue @@ -79,26 +79,7 @@ @@ -135,13 +116,14 @@ import { getCommentList, toggleEnable, getList as getPkList } from '@/api/rating/pk' import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' + import UserInfo from '@/components/UserInfo' import PkCommentEdit from './components/PkCommentEdit' import PkCommentLikeEdit from './components/PkCommentLikeEdit' import CommentReplyList from './components/CommentReplyList' export default { name: 'PkComment', - components: { PkCommentEdit, PkCommentLikeEdit, CommentReplyList }, + components: { PkCommentEdit, PkCommentLikeEdit, CommentReplyList, UserInfo }, directives: { loadmore: { bind(el, binding) { @@ -330,47 +312,4 @@ font-weight: bold; color: #303133; } - - .user-info-cell { - display: flex; - align-items: center; - } - - .user-avatar, - .user-avatar-placeholder { - width: 40px; - height: 40px; - border-radius: 50%; - margin-right: 12px; - flex-shrink: 0; - } - - .user-avatar-placeholder { - background-color: #f0f2f5; - display: flex; - align-items: center; - justify-content: center; - color: #909399; - font-size: 20px; - } - - .user-details { - display: flex; - flex-direction: column; - overflow: hidden; - } - - .user-nickname { - font-weight: bold; - color: #303133; - margin-bottom: 4px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - .user-id { - font-size: 12px; - color: #909399; - } diff --git a/src/views/rating/pk/list/components/PkParticipantList.vue b/src/views/rating/pk/list/components/PkParticipantList.vue index 826f8fa..91c8109 100644 --- a/src/views/rating/pk/list/components/PkParticipantList.vue +++ b/src/views/rating/pk/list/components/PkParticipantList.vue @@ -3,14 +3,7 @@ @@ -30,9 +23,11 @@ - - diff --git a/src/views/rating/topic/index.vue b/src/views/rating/topic/index.vue index 6565fe5..f51b2c0 100644 --- a/src/views/rating/topic/index.vue +++ b/src/views/rating/topic/index.vue @@ -1,10 +1,10 @@ - + @@ -125,10 +125,11 @@ import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' import TopicEdit from './components/TopicEdit' + import UserInfo from '@/components/UserInfo' export default { name: 'RatingTopicIndex', - components: { TopicEdit }, + components: { TopicEdit, UserInfo }, data() { return { list: [], @@ -145,6 +146,9 @@ } }, created() { + if (this.$route.query.topicId) { + this.queryForm.keyword = this.$route.query.topicId + } this.fetchData() }, methods: { diff --git a/src/views/rating/topicCommentRecord/index.vue b/src/views/rating/topicCommentRecord/index.vue index b8385f7..c6b2d11 100644 --- a/src/views/rating/topicCommentRecord/index.vue +++ b/src/views/rating/topicCommentRecord/index.vue @@ -130,26 +130,7 @@ @@ -182,12 +163,13 @@ import { getList as getItemList } from '@/api/rating/topicItem' import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' + import UserInfo from '@/components/UserInfo' import RecordCommentEdit from './components/RecordCommentEdit' import RecordCommentLikeEdit from './components/RecordCommentLikeEdit' export default { name: 'RatingTopicCommentIndex', - components: { RecordCommentEdit, RecordCommentLikeEdit }, + components: { RecordCommentEdit, RecordCommentLikeEdit, UserInfo }, directives: { loadmore: { bind(el, binding) { @@ -420,45 +402,6 @@ margin-right: 4px; } - /* 用户信息列样式 */ - .user-info-cell { - display: flex; - align-items: center; - } - .user-avatar, - .user-avatar-placeholder { - width: 40px; - height: 40px; - border-radius: 50%; - margin-right: 12px; - flex-shrink: 0; - } - .user-avatar-placeholder { - background-color: #f0f2f5; - display: flex; - align-items: center; - justify-content: center; - color: #909399; - font-size: 20px; - } - .user-details { - display: flex; - flex-direction: column; - overflow: hidden; - } - .user-nickname { - font-weight: bold; - color: #303133; - margin-bottom: 4px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - .user-id { - font-size: 12px; - color: #909399; - } - /* 评价目标列样式 */ .target-info-cell { display: flex; diff --git a/src/views/rating/topicItem/index.vue b/src/views/rating/topicItem/index.vue index 32ce313..f8b89ba 100644 --- a/src/views/rating/topicItem/index.vue +++ b/src/views/rating/topicItem/index.vue @@ -61,6 +61,13 @@ + + + +