mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-07 01:46:46 +08:00
feat:讨论增加是否允许评论
This commit is contained in:
@@ -221,10 +221,13 @@ const handleCreated = (editor) => {
|
||||
editorRef.value = editor; // 记录 editor 实例,重要!
|
||||
};
|
||||
|
||||
const discussSettings = ref("");
|
||||
|
||||
request(DISCUSS_LIST, {
|
||||
type,
|
||||
id,
|
||||
}).then(e=>{
|
||||
discussSettings.value = e.data.discussDtoList[0].discussSettings;
|
||||
state.info = e.data;
|
||||
getPostList(e.data.discussDtoList[0].id);
|
||||
}).catch(err=>{
|
||||
@@ -278,7 +281,7 @@ function handleCurrentChange(e, k) {
|
||||
}
|
||||
// 评论点击跳转
|
||||
function comment({ discussId: id, id: postID }) {
|
||||
router.push({ path: "discussdetail", query: { id, type, pName, sName, postID, postName:state.info.discussDtoList[0].discussName } });
|
||||
router.push({ path: "discussdetail", query: { id, type, pName, sName, postID, postName:state.info.discussDtoList[0].discussName, discussSettings:discussSettings.value } });
|
||||
}
|
||||
// 帖子点赞
|
||||
function like(d) {
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="title">
|
||||
{{ postName }}
|
||||
</div>
|
||||
<button class="btn" @click="getFocus">回复</button>
|
||||
<button v-if="discussSettings=='true'" class="btn" @click="getFocus">回复</button>
|
||||
</div>
|
||||
|
||||
<div class="line clearfix">
|
||||
@@ -97,7 +97,7 @@
|
||||
</div>
|
||||
|
||||
<div class="bascinfor">
|
||||
<div class="inputone">
|
||||
<div v-if="discussSettings=='true'" class="inputone">
|
||||
<el-input
|
||||
ref="refInput"
|
||||
v-model="disComment.content"
|
||||
@@ -333,7 +333,7 @@ const returnclick = () => {
|
||||
};
|
||||
|
||||
const {
|
||||
query: { id, discussSubmitId, type, pName, sName, postID, postName },
|
||||
query: { id, discussSubmitId, type, pName, sName, postID, postName, discussSettings },
|
||||
} = useRoute();
|
||||
|
||||
// 编辑器实例,必须用 shallowRef
|
||||
|
||||
Reference in New Issue
Block a user