Commit 2c045c6d by 胡悦

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

1 parent 8cebde03
...@@ -207,14 +207,14 @@ export default { ...@@ -207,14 +207,14 @@ export default {
this.$set(this.ipBackgroundDefault[0], 'backgroundPath', response.data.fileUrl) 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背景 if (this.expressionId) { // 调用接口添加IP背景
this.mergeFixedBgInfo(this.ipBackgroundDefault[1], response.data.fileUrl) this.mergeFixedBgInfo(this.ipBackgroundDefault[1], response.data.fileUrl)
} else { } else {
this.$set(this.ipBackgroundDefault[1], 'backgroundPath', response.data.fileUrl) 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背景 if (this.expressionId) { // 调用接口添加IP背景
this.mergeFixedBgInfo(this.ipBackgroundDefault[2], response.data.fileUrl) this.mergeFixedBgInfo(this.ipBackgroundDefault[2], response.data.fileUrl)
} else { } else {
...@@ -338,12 +338,12 @@ export default { ...@@ -338,12 +338,12 @@ export default {
// }, // },
// 限制用户上传的表情包文件格式和大小 // 限制用户上传的表情包文件格式和大小
beforeUpload_expression(file) { beforeUpload_expression(file) {
const fileType = ['application/x-zip-compressed'] // const fileType = ['zip']
const isFileType = fileType.includes(file.type) const isFileType = file.type.includes('zip')
const isSize = file.size / 1024 / 1024 < 1 // const isSize = file.size / 1024 / 1024 < 1
!isFileType && this.$message.error('上传表情包文件只能是 zip 格式!') !isFileType && this.$message.error('上传表情包文件只能是 zip 格式!')
!isSize && this.$message.error('上传表情包文件大小不能超过1MB') // !isSize && this.$message.error('上传表情包文件大小不能超过1MB')
return isFileType && isSize return isFileType
}, },
// 表情包上传成功 // 表情包上传成功
success_expression(res) { success_expression(res) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<gl-col :span="(manufactureOnly||!in_row)?24:12"> <gl-col :span="(manufactureOnly||!in_row)?24:12">
<gl-form-item label='品牌厂商:'> <gl-form-item label='品牌厂商:'>
<gl-select <gl-select
v-model="model.manufacturerId" v-model="model.manufacturerName"
filterable filterable
placeholder="请选择品牌厂商" placeholder="请选择品牌厂商"
name="manufacturerId" name="manufacturerId"
...@@ -132,20 +132,20 @@ ...@@ -132,20 +132,20 @@
import { manufacturers, merchants, grayscaleuser } from '@/api' import { manufacturers, merchants, grayscaleuser } from '@/api'
import { NoticeMixin } from '@/mixins' import { NoticeMixin } from '@/mixins'
const manufacturer_list_back_up = [ const manufacturer_list_back_up = [
{ // {
manufacturer: null, // manufacturer: null,
manufacturerName: '请选择品牌厂商', // manufacturerName: '',
merchantId: 0, // merchantId: 0,
merchantName: '' // merchantName: ''
} // }
] ]
const merchant_list_back_up = [ const merchant_list_back_up = [
{ // {
merchantId: null, // merchantId: null,
merchantName: '请选择渠道商', // merchantName: '',
merchantStatus: 0, // merchantStatus: 0,
merchantType: 401 // merchantType: 401
} // }
] ]
export default { export default {
name: 'Manufacturers', name: 'Manufacturers',
...@@ -220,10 +220,10 @@ export default { ...@@ -220,10 +220,10 @@ export default {
this.$emit('update:value', __back__data__) this.$emit('update:value', __back__data__)
} }
}, },
'model.manufacturerId': { 'model.manufacturerName': {
handler(__value) { handler(__value) {
this.result.manufacturers = this.manufacturer_list.filter( this.result.manufacturers = this.manufacturer_list.filter(
obj => this.model.manufacturerId === obj.manufacturer obj => this.model.manufacturerName === obj.manufacturer
)[0] )[0]
const __back__data__ = this.$deep_clone(this.result) const __back__data__ = this.$deep_clone(this.result)
this.$emit('update:value', __back__data__) this.$emit('update:value', __back__data__)
...@@ -250,6 +250,7 @@ export default { ...@@ -250,6 +250,7 @@ export default {
{ label: '指定用户(灰度)', value: 'LIST' } { label: '指定用户(灰度)', value: 'LIST' }
], ],
model: { model: {
manufacturerName: '',
merchantId: '', merchantId: '',
manufacturerId: '', manufacturerId: '',
file_list: [] // 文件列表 file_list: [] // 文件列表
...@@ -310,6 +311,7 @@ export default { ...@@ -310,6 +311,7 @@ export default {
}, },
__reset() { __reset() {
// 初始化 // 初始化
this.model.manufacturerName = null
this.model.manufacturerId = null this.model.manufacturerId = null
this.model.merchantId = null this.model.merchantId = null
this.result = { this.result = {
...@@ -323,6 +325,7 @@ export default { ...@@ -323,6 +325,7 @@ export default {
__setDefault(__default) { __setDefault(__default) {
this.model.merchantId = __default.merchantId this.model.merchantId = __default.merchantId
this.model.manufacturerId = __default.manufacturerId this.model.manufacturerId = __default.manufacturerId
this.model.manufacturerName = __default.manufacturerName
this.result.influenceScope = __default.influenceScope this.result.influenceScope = __default.influenceScope
this.model.file_list = __default.file_list this.model.file_list = __default.file_list
this.result.grayscaleUserList = __default.grayscaleuser this.result.grayscaleUserList = __default.grayscaleuser
......
...@@ -345,6 +345,8 @@ export default { ...@@ -345,6 +345,8 @@ export default {
}) })
this.eventBus.$on('edit_event_data', data => { this.eventBus.$on('edit_event_data', data => {
this.title = data ? '编辑活动' : '新增活动' this.title = data ? '编辑活动' : '新增活动'
this.hasGift = false
this.hasDynamicEffect = false
let checked_gift = {} let checked_gift = {}
this.eventBus.$emit('reset') // 广播 ---- 清空 组件 数据 this.eventBus.$emit('reset') // 广播 ---- 清空 组件 数据
if (!data) { if (!data) {
...@@ -357,6 +359,7 @@ export default { ...@@ -357,6 +359,7 @@ export default {
this.editForm = __clone this.editForm = __clone
console.log(this.editForm) console.log(this.editForm)
const { const {
manufacturerName,
manufacturerId, manufacturerId,
merchantId, merchantId,
influenceScope, influenceScope,
...@@ -367,6 +370,7 @@ export default { ...@@ -367,6 +370,7 @@ export default {
} = __clone } = __clone
this.default_value = { this.default_value = {
// 设置组件默认值 // 设置组件默认值
manufacturerName,
manufacturerId, manufacturerId,
merchantId, merchantId,
influenceScope, influenceScope,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!