加入点击发布 点赞 评论等打开弹窗

This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-06-23 16:36:53 +08:00
parent 5b96c49b44
commit 67d4082297
85 changed files with 705 additions and 573 deletions

View File

@@ -382,6 +382,11 @@ const getCommentList = () => {
// 评论点赞
const commentLike = (index, i) => {
if (realname.value == 0 && userInfoWin.value.uin > 0) {
openAttest();
return;
}
if (isNeedLogin.value) {
goLogin();
return;
@@ -409,8 +414,15 @@ const commentLike = (index, i) => {
});
};
// 打开 回答-评论 的子评论
const openAnswerCommentsChild = (index, i) => {
if (realname.value == 0 && userInfoWin.value.uin > 0) {
openAttest();
return;
}
if (isNeedLogin.value) {
goLogin();
return;
@@ -423,6 +435,11 @@ const openAnswerCommentsChild = (index, i) => {
// 关闭 回答-评论 的子评论 isempty 是否需要清空输入框 默认需要清空
const closeAnswerCommentsChild = () => {
if (realname.value == 0 && userInfoWin.value.uin > 0) {
openAttest();
return;
}
commentList.value.forEach((ele) => {
ele["childState"] = false;
if (ele["child"] && ele["child"].length != 0) ele["child"].forEach((el) => (el["childState"] = false));
@@ -433,8 +450,16 @@ const closeAnswerCommentsChild = () => {
let commentInputTop = ref("");
let commentInput = ref("");
let openAttest = inject("openAttest");
const realname = inject("realname");
// 提交回答-评论
const submitAnswerComments = (content, index, i) => {
if (realname.value == 0 && userInfoWin.value.uin > 0) {
openAttest();
return;
}
if (isNeedLogin.value) {
goLogin();
return;