Commit 2c045c6d by 胡悦

表情的zip上传文件修改和厂商名参数manufacturerName改为传品牌厂商里面的商户名merchantName

1 parent 8cebde03
......@@ -207,14 +207,14 @@ export default {
this.$set(this.ipBackgroundDefault[0], 'backgroundPath', response.data.fileUrl)
}
} },
{ backgroundName: '生日', backgroundPath: 'http://img02.glsx.com.cn/blib/BIM-190221bb091c915876fdb9.PNG', id: '', backgroundType: 'BIRTHDAY', fun: (response, file, fileLis) => {
{ backgroundName: '生日', backgroundPath: 'http://img02.glsx.com.cn/blib/BIM-190221adb64cd0885a7d48.PNG', id: '', backgroundType: 'BIRTHDAY', fun: (response, file, fileLis) => {
if (this.expressionId) { // 调用接口添加IP背景
this.mergeFixedBgInfo(this.ipBackgroundDefault[1], response.data.fileUrl)
} else {
this.$set(this.ipBackgroundDefault[1], 'backgroundPath', response.data.fileUrl)
}
} },
{ backgroundName: '晴天', backgroundPath: 'http://img01.glsx.com.cn/blib/BIM-190221b33c011d479cf428.PNG', id: '', backgroundType: 'WEATHER', fun: (response, file, fileLis) => {
{ backgroundName: '晴天', backgroundPath: 'http://img02.glsx.com.cn/blib/BIM-1902218e9dccca1551bf51.PNG', id: '', backgroundType: 'WEATHER', fun: (response, file, fileLis) => {
if (this.expressionId) { // 调用接口添加IP背景
this.mergeFixedBgInfo(this.ipBackgroundDefault[2], response.data.fileUrl)
} else {
......@@ -338,12 +338,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) {
......
......@@ -3,7 +3,7 @@
<gl-col :span="(manufactureOnly||!in_row)?24:12">
<gl-form-item label='品牌厂商:'>
<gl-select
v-model="model.manufacturerId"
v-model="model.manufacturerName"
filterable
placeholder="请选择品牌厂商"
name="manufacturerId"
......@@ -132,20 +132,20 @@
import { manufacturers, merchants, grayscaleuser } from '@/api'
import { NoticeMixin } from '@/mixins'
const manufacturer_list_back_up = [
{
manufacturer: null,
manufacturerName: '请选择品牌厂商',
merchantId: 0,
merchantName: ''
}
// {
// manufacturer: null,
// manufacturerName: '',
// merchantId: 0,
// merchantName: ''
// }
]
const merchant_list_back_up = [
{
merchantId: null,
merchantName: '请选择渠道商',
merchantStatus: 0,
merchantType: 401
}
// {
// merchantId: null,
// merchantName: '',
// merchantStatus: 0,
// merchantType: 401
// }
]
export default {
name: 'Manufacturers',
......@@ -220,10 +220,10 @@ export default {
this.$emit('update:value', __back__data__)
}
},
'model.manufacturerId': {
'model.manufacturerName': {
handler(__value) {
this.result.manufacturers = this.manufacturer_list.filter(
obj => this.model.manufacturerId === obj.manufacturer
obj => this.model.manufacturerName === obj.manufacturer
)[0]
const __back__data__ = this.$deep_clone(this.result)
this.$emit('update:value', __back__data__)
......@@ -250,6 +250,7 @@ export default {
{ label: '指定用户(灰度)', value: 'LIST' }
],
model: {
manufacturerName: '',
merchantId: '',
manufacturerId: '',
file_list: [] // 文件列表
......@@ -310,6 +311,7 @@ export default {
},
__reset() {
// 初始化
this.model.manufacturerName = null
this.model.manufacturerId = null
this.model.merchantId = null
this.result = {
......@@ -323,6 +325,7 @@ export default {
__setDefault(__default) {
this.model.merchantId = __default.merchantId
this.model.manufacturerId = __default.manufacturerId
this.model.manufacturerName = __default.manufacturerName
this.result.influenceScope = __default.influenceScope
this.model.file_list = __default.file_list
this.result.grayscaleUserList = __default.grayscaleuser
......
......@@ -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!