feat:增加讨论是否允许评论限制

This commit is contained in:
wyx
2023-03-24 14:33:04 +08:00
parent 9f42702d52
commit 52e75aca0d
2 changed files with 4 additions and 2 deletions

View File

@@ -37,7 +37,7 @@
</div> </div>
<div class="restore"> <div class="restore">
<div class="reshead"> <div v-if="discussSettings=='true'" class="reshead">
<div class="headn"> <div class="headn">
<div class="pl">评论</div> <div class="pl">评论</div>
<div class="ts">{{ hfPage?.total }}</div> <div class="ts">{{ hfPage?.total }}</div>

View File

@@ -169,6 +169,7 @@ const closeLoading = () => {
loading.value.close(); loading.value.close();
}; };
//获取讨论详情 //获取讨论详情
const discussSettings = ref("");
const { const {
query: { id, type, infoId, chapterOrStageId, id: taskId }, query: { id, type, infoId, chapterOrStageId, id: taskId },
} = useRoute(); } = useRoute();
@@ -197,6 +198,7 @@ request(DISCUSS_LIST, {
path: "/notpath", path: "/notpath",
}); });
} }
discussSettings.value = e.data.discussDtoList[0].discussSettings;
state.info = e.data; state.info = e.data;
console.log("讨论详情", state.info); console.log("讨论详情", state.info);
state.discussId = e.data.discussDtoList[0].id; state.discussId = e.data.discussDtoList[0].id;
@@ -278,7 +280,7 @@ const goDetails = (item) => {
type, type,
postID: item.id, postID: item.id,
postName: state.info.discussDtoList[0].discussName, postName: state.info.discussDtoList[0].discussName,
discussSettings: state.info.discussDtoList[0].discussSettings, discussSettings: discussSettings.value
}, },
}); });
}; };