Commit 766f28f2 authored by hanfeng's avatar hanfeng

Merge remote-tracking branch 'origin/base-modify' into base-modify-hf

parents 44405c90 06bec217
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
v-if="$utils.isString(form.videoPath) && !$utils.isEmpty(form.videoPath) && !imgFlag" v-if="$utils.isString(form.videoPath) && !$utils.isEmpty(form.videoPath) && !imgFlag"
:src="form.videoPath" :src="form.videoPath"
style="width:300px;max-height:300px;" style="width:300px;max-height:300px;"
/> --> />-->
<!-- <i <!-- <i
v-else-if="!imgFlag" v-else-if="!imgFlag"
class="el-icon-plus avatar-uploader-icon" class="el-icon-plus avatar-uploader-icon"
...@@ -168,11 +168,14 @@ export default { ...@@ -168,11 +168,14 @@ export default {
} }
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
const zip = file.type === 'application/zip' var index = file.name.lastIndexOf('.')
if (!zip) { var ext = file.name.substr(index + 1)
console.log(ext)
if (ext != 'zip') {
this.$message.error('上传压缩包只能是 zip 格式!') this.$message.error('上传压缩包只能是 zip 格式!')
return false
} }
return zip return true
}, },
videoUpload(file) { videoUpload(file) {
const isJPG = file.type === 'video/mp4' const isJPG = file.type === 'video/mp4'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment