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