mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-09 19:06:48 +08:00
fix: 解决提交作业重复提交问题
This commit is contained in:
@@ -321,10 +321,10 @@ const postAdd = () => {
|
||||
return ElMessage.warning("评论标题为空");
|
||||
}
|
||||
loading.value = ElLoading.service({
|
||||
lock: true,
|
||||
text: "Loading",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
});
|
||||
lock: true,
|
||||
text: "Loading",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
});
|
||||
console.log('用户信息', userInfo.value)
|
||||
let obj = {
|
||||
"collectionNum": 0,
|
||||
|
||||
@@ -456,8 +456,10 @@ import FileTypeImg from "@/components/FileTypeImg.vue";
|
||||
import { useRoute } from "vue-router/dist/vue-router";
|
||||
import { ElMessage } from "element-plus";
|
||||
import {useTaskPage} from "@/api/useCommon";
|
||||
import {ElLoading} from "element-plus";
|
||||
//import AlertSuccess from "@/components/alert/AlertSuccess.vue";
|
||||
|
||||
const loading = ref(false);
|
||||
const fileList = ref([]);
|
||||
const fielPath = ref(import.meta.env.VITE_FILE_PATH);
|
||||
const uploadRef = ref();
|
||||
@@ -530,6 +532,12 @@ const handleClick = () => {
|
||||
return ElMessage.warning("请输入作业内容");
|
||||
}
|
||||
}
|
||||
|
||||
loading.value = ElLoading.service({
|
||||
lock: true,
|
||||
text: "Loading",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
});
|
||||
request(TASK_WORK_COMMIT, {
|
||||
projectOrRouterLogo: type,
|
||||
workUploadContent: sbValue.value.content,
|
||||
@@ -545,6 +553,11 @@ const handleClick = () => {
|
||||
fileList.value = [];
|
||||
remove(0);
|
||||
clearFiles();
|
||||
loading.value.close();
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
ElMessage.error("提交失败");
|
||||
loading.value.close()
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user