mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 03:16:47 +08:00
fix:修改讨论参数问题
This commit is contained in:
@@ -224,85 +224,23 @@ const handleCreated = (editor) => {
|
|||||||
editorRef.value = editor; // 记录 editor 实例,重要!
|
editorRef.value = editor; // 记录 editor 实例,重要!
|
||||||
};
|
};
|
||||||
|
|
||||||
useRequest(DISCUSS_LIST, param.value, (e)=>{
|
request(DISCUSS_LIST, {
|
||||||
console.log('我是获取的讨论详情数据', e)
|
type:type==1?2:1,
|
||||||
|
id,
|
||||||
|
}).then(e=>{
|
||||||
|
console.log('112233---->',e)
|
||||||
state.info = e.data;
|
state.info = e.data;
|
||||||
// 获取该讨论下面的帖子
|
// 获取该讨论下面的帖子
|
||||||
console.log('我是查询讨论下帖子的参数',{
|
console.log('我是查询讨论下帖子的参数',{
|
||||||
"discussId": e.data.discussDtoList[0].discussId,
|
"discussId": e.data.discussDtoList[0].discussId,
|
||||||
"pageNo": state.pageNo,
|
"pageNo": state.pageNo,
|
||||||
"pageSize": state.pageSize,
|
"pageSize": state.pageSize,
|
||||||
"searchType": state.searchType
|
"searchType": state.searchType
|
||||||
})
|
})
|
||||||
useRequest(
|
getPostList(e.data.discussDtoList[0].discussId);
|
||||||
QueryDiscussSubmitDetailByDiscussId,
|
}).catch(err=>{
|
||||||
{
|
console.log(err)
|
||||||
"discussId": e.data.discussDtoList[0].discussId,
|
})
|
||||||
"pageNo": state.pageNo,
|
|
||||||
"pageSize": state.pageSize,
|
|
||||||
"searchType": state.searchType
|
|
||||||
},
|
|
||||||
(e)=>{
|
|
||||||
console.log('我是当前讨论下的帖子',e)
|
|
||||||
state.postList = e.data.rows;
|
|
||||||
state.total = e.data.total;
|
|
||||||
|
|
||||||
// 添加一条假的数据 供测试使用
|
|
||||||
state.postList =[
|
|
||||||
{
|
|
||||||
"createTime": "",
|
|
||||||
"createUser": 0,
|
|
||||||
"discussCollectionCount": "234",
|
|
||||||
"discussId": "",
|
|
||||||
"discussLikeCount": "3576",
|
|
||||||
"discussReviewCount": "12353",
|
|
||||||
"discussSubmitContent": "帖子的内容----帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容帖子的内容",
|
|
||||||
"discussSubmitId": "",
|
|
||||||
"discussSubmitPictureAddress": "",
|
|
||||||
"discussSubmitTitle": "我是一个用来测试的帖子标题",
|
|
||||||
"stuId": "",
|
|
||||||
"stuName": "",
|
|
||||||
"updateTime": "",
|
|
||||||
"updateUser": 0,
|
|
||||||
|
|
||||||
"submitReviewVoList": [
|
|
||||||
{
|
|
||||||
"createTime": "",
|
|
||||||
"createUser": 0,
|
|
||||||
"discussLikeCount": "",
|
|
||||||
"discussReviewContent": "",
|
|
||||||
"discussReviewFlag": "",
|
|
||||||
"discussReviewId": "",
|
|
||||||
"discussReviewPictureAddress": "",
|
|
||||||
"discussSubmitId": "",
|
|
||||||
"stuId": "",
|
|
||||||
"stuName": "",
|
|
||||||
"submitReplyVoList": [
|
|
||||||
{
|
|
||||||
"createTime": "",
|
|
||||||
"createUser": 0,
|
|
||||||
"discussReplyId": 0,
|
|
||||||
"discussReviewId": "",
|
|
||||||
"replyContent": "",
|
|
||||||
"replyFlag": "",
|
|
||||||
"replyPictureAddress": "",
|
|
||||||
"reviewStuId": "",
|
|
||||||
"reviewStuName": "",
|
|
||||||
"stuId": "",
|
|
||||||
"stuName": "",
|
|
||||||
"updateTime": "",
|
|
||||||
"updateUser": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"updateTime": "",
|
|
||||||
"updateUser": 0
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
state.total = 100;
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
// 获取帖子
|
// 获取帖子
|
||||||
function getPostList(discussId) {
|
function getPostList(discussId) {
|
||||||
@@ -313,15 +251,14 @@ function getPostList(discussId) {
|
|||||||
"searchType": state.searchType
|
"searchType": state.searchType
|
||||||
})
|
})
|
||||||
|
|
||||||
useRequest(
|
request(
|
||||||
QueryDiscussSubmitDetailByDiscussId,
|
QueryDiscussSubmitDetailByDiscussId,
|
||||||
{
|
{
|
||||||
"discussId": discussId,
|
"discussId": discussId,
|
||||||
"pageNo": state.pageNo,
|
"pageNo": state.pageNo,
|
||||||
"pageSize": state.pageSize,
|
"pageSize": state.pageSize,
|
||||||
"searchType": state.searchType
|
"searchType": state.searchType
|
||||||
},
|
}).then(e=>{
|
||||||
(e)=>{
|
|
||||||
console.log('我是当前讨论下的帖子',e)
|
console.log('我是当前讨论下的帖子',e)
|
||||||
state.postList = e.data.rows;
|
state.postList = e.data.rows;
|
||||||
state.total = e.data.total;
|
state.total = e.data.total;
|
||||||
@@ -380,22 +317,24 @@ function getPostList(discussId) {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
state.total = 100;
|
state.total = 100;
|
||||||
|
}).catch(err=>{
|
||||||
|
console.log(err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 最新
|
// 最新
|
||||||
function nowPost(id) {
|
function nowPost(discussId) {
|
||||||
state.searchType = 1;
|
state.searchType = 1;
|
||||||
state.pageNo = 1;
|
state.pageNo = 1;
|
||||||
state.currentPage = 1;
|
state.currentPage = 1;
|
||||||
getPostList(id);
|
getPostList(discussId);
|
||||||
}
|
}
|
||||||
// 最热
|
// 最热
|
||||||
function hotPost() {
|
function hotPost(discussId) {
|
||||||
state.searchType = 2;
|
state.searchType = 2;
|
||||||
state.pageNo = 1;
|
state.pageNo = 1;
|
||||||
state.currentPage = 1;
|
state.currentPage = 1;
|
||||||
getPostList(id);
|
getPostList(discussId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 分页
|
// 分页
|
||||||
|
|||||||
Reference in New Issue
Block a user