mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-24 02:02:53 +08:00
修改bug3.0
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import {mapActions, mapGetters} from "vuex";
|
||||
import {getCertificationProcess, getTeacherInfo, setOfflineTutoring, treeList} from "@/api/modules/lecturer"
|
||||
import processStatus from '@/components/processStatus.vue';
|
||||
import axios from "axios";
|
||||
export default {
|
||||
name: "FirstDraft",
|
||||
computed: {
|
||||
@@ -146,6 +147,14 @@ export default {
|
||||
message: '上传失败',
|
||||
type: 'error'
|
||||
});
|
||||
},
|
||||
beforeUpload(file) {
|
||||
axios.defaults.timeout = 30000;
|
||||
const isLt2M = file.size / 1024 / 1024 <= 500;
|
||||
if (!isLt2M) {
|
||||
this.$message.error('文件大小超出500M,请重新上传');
|
||||
}
|
||||
return isLt2M;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -202,6 +211,7 @@ export default {
|
||||
action="/activityApi/certification/uploadCourseware"
|
||||
accept=".ppt,.pptx,.pdf"
|
||||
:on-success="handlSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:on-error="handlError"
|
||||
:limit="1"
|
||||
:on-remove="handRemove"
|
||||
|
||||
Reference in New Issue
Block a user