Commit a761938a by cwq0219
2 parents dd6c1d63 2c045c6d
......@@ -429,12 +429,12 @@ export default {
// },
// 限制用户上传的表情包文件格式和大小
beforeUpload_expression(file) {
const fileType = ['application/x-zip-compressed']
const isFileType = fileType.includes(file.type)
const isSize = file.size / 1024 / 1024 < 1
// const fileType = ['zip']
const isFileType = file.type.includes('zip')
// const isSize = file.size / 1024 / 1024 < 1
!isFileType && this.$message.error('上传表情包文件只能是 zip 格式!')
!isSize && this.$message.error('上传表情包文件大小不能超过1MB')
return isFileType && isSize
// !isSize && this.$message.error('上传表情包文件大小不能超过1MB')
return isFileType
},
// 表情包上传成功
success_expression(res) {
......
......@@ -345,6 +345,8 @@ export default {
})
this.eventBus.$on('edit_event_data', data => {
this.title = data ? '编辑活动' : '新增活动'
this.hasGift = false
this.hasDynamicEffect = false
let checked_gift = {}
this.eventBus.$emit('reset') // 广播 ---- 清空 组件 数据
if (!data) {
......@@ -357,6 +359,7 @@ export default {
this.editForm = __clone
console.log(this.editForm)
const {
manufacturerName,
manufacturerId,
merchantId,
influenceScope,
......@@ -367,6 +370,7 @@ export default {
} = __clone
this.default_value = {
// 设置组件默认值
manufacturerName,
manufacturerId,
merchantId,
influenceScope,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!