fix:修改学习路径问题

This commit is contained in:
wyx
2023-02-20 18:01:44 +08:00
parent 46d6dada14
commit aee1eb58e8
5 changed files with 43 additions and 53 deletions

View File

@@ -83,7 +83,7 @@
<div class="join">
<div
v-for="(item, index) in state.dataInfo.ballotVo?.voteStemVoList"
v-for="(item, index) in state.dataInfo.voteStemDtoList"
:key="index"
style="margin-bottom: 41px"
>
@@ -190,6 +190,7 @@
import {useRequest,request} from "@/api/request";
import {
VOTE_DETAIL2,
VOTE_DETAIL3,
VOTE_DETAIL_SUBMIT
} from "@/api/api";
import dayjs from "dayjs";
@@ -231,13 +232,7 @@ let timer = setInterval(() => {
"type": btype
})
request(VOTE_DETAIL2, {
"chapterOrStageId": chapterOrStageId ? chapterOrStageId : 0,
"courseId": courseId,
"studentId": userInfo.value.id,
"targetId": infoId,
"type": btype
}).then(res=>{
request(VOTE_DETAIL3(courseId), {}).then(res=>{
console.log(res)
state.dataInfo = res.data
}).catch(err=>{
@@ -320,20 +315,27 @@ const submitVote = () => {
useRequest(VOTE_DETAIL_SUBMIT,obj,(e)=>{
console.log(e)
request(VOTE_DETAIL2, {
"chapterOrStageId": chapterOrStageId ? chapterOrStageId : 0,
"courseId": courseId,
"studentId": userInfo.value.id,
"targetId": infoId,
"type": btype,
taskId: id
}).then(res=>{
request(VOTE_DETAIL3(courseId), {}).then(res=>{
console.log(res)
ElMessage.success("投票成功")
state.dataInfo = res.data
}).catch(err=>{
console.log(err)
});
// request(VOTE_DETAIL2, {
// "chapterOrStageId": chapterOrStageId ? chapterOrStageId : 0,
// "courseId": courseId,
// "studentId": userInfo.value.id,
// "targetId": infoId,
// "type": btype,
// taskId: id
// }).then(res=>{
// console.log(res)
// ElMessage.success("投票成功")
// state.dataInfo = res.data
// }).catch(err=>{
// console.log(err)
// });
})
};
</script>