🎨 update login logic
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div class="comment">
|
||||
<AFlex :vertical="false">
|
||||
<AFlex :vertical="true">
|
||||
<AAvatar :size="50" class="comment-avatar" shape="circle" :src="user.user.userInfo.avatar"/>
|
||||
<AAvatar :size="50" class="comment-avatar" shape="circle" :src="user.user.avatar"/>
|
||||
</AFlex>
|
||||
<AFlex :vertical="true" class="comment-content">
|
||||
<ATextarea :rows="4" class="comment-text" @focus="onFocusHandler"
|
||||
@@ -163,7 +163,6 @@ async function commentSubmit(point: any) {
|
||||
return `<img width="30px" height="30px" loading="lazy" src="/emoji/qq/gif/${p1}" alt="emoji ${p1}" />`;
|
||||
});
|
||||
const commentParams: object = {
|
||||
user_id: user.user.uid,
|
||||
topic_id: topicId.value,
|
||||
content: contentWithEmoji,
|
||||
images: comment.imageList,
|
||||
@@ -177,8 +176,8 @@ async function commentSubmit(point: any) {
|
||||
user_id: user.user.uid,
|
||||
content: result.data.content,
|
||||
images: comment.imageList,
|
||||
nickname: user.user.userInfo.nickname,
|
||||
avatar: user.user.userInfo.avatar,
|
||||
nickname: user.user.nickname,
|
||||
avatar: user.user.avatar,
|
||||
id: result.data.id,
|
||||
created_time: result.data.created_time,
|
||||
browser: result.data.browser,
|
||||
|
@@ -180,7 +180,7 @@ import UserInfoCard from "@/components/CommentReply/src/UserInfoCard/UserInfoCar
|
||||
const {t} = useI18n();
|
||||
const router = useRouter();
|
||||
const comment = useStore().comment;
|
||||
const user = useStore().user;
|
||||
|
||||
|
||||
const topicId = ref<string>("123");
|
||||
|
||||
@@ -190,7 +190,6 @@ const topicId = ref<string>("123");
|
||||
*/
|
||||
async function getCommentList(page: number = 1, size: number = 5, hot: boolean = true) {
|
||||
const params = {
|
||||
user_id: user.user.uid,
|
||||
topic_id: topicId.value,
|
||||
page: page,
|
||||
size: size,
|
||||
@@ -247,7 +246,6 @@ async function getReplyList(reply_id: number, page: number = 1, size: number = 5
|
||||
page: page,
|
||||
size: size,
|
||||
comment_id: reply_id,
|
||||
user_id: user.user.uid,
|
||||
};
|
||||
await comment.getReplyList(params);
|
||||
}
|
||||
@@ -261,7 +259,6 @@ const commentLikeThrottled = useThrottleFn(commentLike, 1000);
|
||||
async function commentLike(item: any) {
|
||||
const params: any = {
|
||||
comment_id: item.id,
|
||||
user_id: user.user.uid,
|
||||
topic_id: topicId.value,
|
||||
};
|
||||
const res: boolean = await comment.commentLike(params);
|
||||
@@ -280,7 +277,6 @@ const cancelCommentLikeThrottled = useThrottleFn(cancelCommentLike, 1000);
|
||||
async function cancelCommentLike(item: any) {
|
||||
const params: any = {
|
||||
comment_id: item.id,
|
||||
user_id: user.user.uid,
|
||||
topic_id: topicId.value,
|
||||
};
|
||||
const res: boolean = await comment.cancelCommentLike(params);
|
||||
|
@@ -170,14 +170,12 @@ async function replySubmit(point: any) {
|
||||
images: any;
|
||||
reply_id: number;
|
||||
reply_user: string;
|
||||
user_id: any;
|
||||
author: any;
|
||||
topic_id: string;
|
||||
content: any;
|
||||
point: [number, number];
|
||||
key: any;
|
||||
} = {
|
||||
user_id: user.user.uid,
|
||||
topic_id: topicId.value,
|
||||
content: contentWithEmoji,
|
||||
images: comment.imageList,
|
||||
@@ -203,8 +201,8 @@ async function replySubmit(point: any) {
|
||||
likes: result.data.likes,
|
||||
reply_count: result.data.reply_count,
|
||||
reply_user: result.data.reply_user,
|
||||
nickname: user.user.userInfo.nickname,
|
||||
avatar: user.user.userInfo.avatar,
|
||||
nickname: user.user.nickname,
|
||||
avatar: user.user.avatar,
|
||||
is_liked: false,
|
||||
reply_username: props.item.nickname,
|
||||
};
|
||||
|
@@ -150,7 +150,6 @@ import UserInfoCard from "@/components/CommentReply/src/UserInfoCard/UserInfoCar
|
||||
const {t} = useI18n();
|
||||
|
||||
const comment = useStore().comment;
|
||||
const user = useStore().user;
|
||||
const topicId = ref<string>("123");
|
||||
const props = defineProps({
|
||||
item: {
|
||||
@@ -198,7 +197,6 @@ const commentLikeThrottled = useThrottleFn(commentLike, 1000);
|
||||
async function commentLike(item: any) {
|
||||
const params: any = {
|
||||
comment_id: item.id,
|
||||
user_id: user.user.uid,
|
||||
topic_id: topicId.value,
|
||||
};
|
||||
const res: boolean = await comment.commentLike(params);
|
||||
@@ -217,7 +215,6 @@ const cancelCommentLikeThrottled = useThrottleFn(cancelCommentLike, 1000);
|
||||
async function cancelCommentLike(item: any) {
|
||||
const params: any = {
|
||||
comment_id: item.id,
|
||||
user_id: user.user.uid,
|
||||
topic_id: topicId.value,
|
||||
};
|
||||
const res: boolean = await comment.cancelCommentLike(params);
|
||||
@@ -243,7 +240,6 @@ async function getReplyList(page: number, pageSize: number) {
|
||||
page: page,
|
||||
size: pageSize,
|
||||
comment_id: props.item.id,
|
||||
user_id: user.user.uid,
|
||||
};
|
||||
await comment.getReplyList(params);
|
||||
}
|
||||
|
@@ -178,7 +178,6 @@ async function replyReplySubmit(point: any) {
|
||||
return `<img width="30px" height="30px" loading="lazy" src="/emoji/qq/gif/${p1}" alt="emoji ${p1}" />`;
|
||||
});
|
||||
const replyParams: ReplyCommentParams = {
|
||||
user_id: user.user.uid,
|
||||
topic_id: topicId.value,
|
||||
content: contentWithEmoji,
|
||||
images: comment.imageList,
|
||||
@@ -205,8 +204,8 @@ async function replyReplySubmit(point: any) {
|
||||
likes: result.data.likes,
|
||||
reply_count: result.data.reply_count,
|
||||
reply_user: result.data.reply_user,
|
||||
nickname: user.user.userInfo.nickname,
|
||||
avatar: user.user.userInfo.avatar,
|
||||
nickname: user.user.nickname,
|
||||
avatar: user.user.avatar,
|
||||
is_liked: false,
|
||||
reply_username: props.item.nickname,
|
||||
reply_to: result.data.reply_to,
|
||||
|
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<AFlex :vertical="false" class="user-info-card-name" style="">
|
||||
<AFlex :vertical="true" justify="flex-start">
|
||||
<AAvatar :size="48" :src="users.user.userInfo.avatar" class="user-info-card-avatar"/>
|
||||
<AAvatar :size="48" :src="users.user.avatar" class="user-info-card-avatar"/>
|
||||
</AFlex>
|
||||
<AFlex :vertical="true" justify="flex-start" class="user-info-card-content-container">
|
||||
<AFlex :vertical="false" align="center">
|
||||
|
@@ -15,6 +15,7 @@
|
||||
margin-left: 10px;
|
||||
|
||||
.user-info-card-name-text {
|
||||
color: var(--text-color);
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
@@ -40,6 +40,10 @@ const showContent = computed(() => {
|
||||
borderRadius: '8px',
|
||||
textAlign: 'start',
|
||||
transform: `translate(${props.offsetX}px, 0)`,
|
||||
backgroundColor: 'var(--background-color)',
|
||||
color: 'var(--text-color)',
|
||||
border: '1px solid var(--text-color)',
|
||||
boxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)',
|
||||
...tooltipStyle
|
||||
}"
|
||||
:transition-duration="200"
|
||||
|
Reference in New Issue
Block a user