Commit 31368336 by wangql

a

1 parent f0334db1
......@@ -20,7 +20,7 @@
:in_row='false'
:value.sync="manufacturer"
:uploadAction="uploadAction"
default_value="selectDefaultValue"
:default_value="selectDefaultValue"
/>
<gl-form-item label="上传表情" prop="uploadExpression">
<gl-upload
......@@ -130,7 +130,9 @@ export default {
this.expressionId = data
}
this.title = !this.expressionId ? '新增品牌IP表情' : '编辑品牌IP表情'
this.getExpInfo()
if (this.expressionId) {
this.getExpInfo()
}
})
}
}
......@@ -382,24 +384,26 @@ export default {
// 新增或编辑表情信息表单验证
editExpValidate() {
this.idPassvalue.$emit('submit')
console.log(this.manufacturer)
if (this.manufacturer) {
if (this.manufacturer.merchants) {
this.addParams.merchantId = this.manufacturer.merchants.id
this.addParams.merchantName = this.manufacturer.merchants.merchantName
}
if (this.manufacturer.manufacturers) {
this.addParams.manufacturer = this.manufacturer.manufacturers.manufacturer
this.addParams.manufacturerId = this.manufacturer.manufacturers.merchantId
this.addParams.manufacturerName = this.manufacturer.manufacturers.merchantName
}
if (this.manufacturer.grayscaleUserList) {
this.addParams.grayscaleUserList = this.manufacturer.grayscaleUserList
}
if (this.manufacturer.influenceScope) {
this.addParams.influenceScope = this.manufacturer.influenceScope
setTimeout(() => {
console.log(this.manufacturer)
if (this.manufacturer) {
if (this.manufacturer.merchants) {
this.addParams.merchantId = this.manufacturer.merchants.id
this.addParams.merchantName = this.manufacturer.merchants.merchantName
}
if (this.manufacturer.manufacturers) {
this.addParams.manufacturer = this.manufacturer.manufacturers.manufacturer
this.addParams.manufacturerId = this.manufacturer.manufacturers.merchantId
this.addParams.manufacturerName = this.manufacturer.manufacturers.merchantName
}
if (this.manufacturer.grayscaleUserList) {
this.addParams.grayscaleUserList = this.manufacturer.grayscaleUserList
}
if (this.manufacturer.influenceScope) {
this.addParams.influenceScope = this.manufacturer.influenceScope
}
}
}
}, 100)
// this.$validator.validateAll().then(result => {
// console.log('result:' + result)
// // 验证表情包上传情况
......@@ -447,28 +451,28 @@ export default {
// 新增或编辑表情信息
editExpressionInfo() {
const params = this.getParams()
console.log(params)
// if (!this.expressionId) { // 新增表情时,不调用新增或编辑表情背景接口,直接将全部数据打包带过去
// delete params.id
// addExp
// .req(params)
// .then(res => {
// // this.updateVisible = !this.updateVisible
// this.InitializationPageValue()
// this.$emit('updateClose')
// })
// .catch(err => console.log(err))
// } else { // 编辑表情时,表情信息和表情背景信息分开保存,表情背景的添加和修改直接调用表情接口操作,表情信息里的表情背景数组项不用去管
// params.ipBackgroundList = []// 编辑表情时不需要管背景信息,因此清空数组数据
// mergeExp
// .req(params)
// .then(res => {
// // this.updateVisible = !this.updateVisible
// this.InitializationPageValue()
// this.$emit('updateClose')
// })
// .catch(err => console.log(err))
// }
console.log('editExpressionInfo params:' + params)
if (!this.expressionId) { // 新增表情时,不调用新增或编辑表情背景接口,直接将全部数据打包带过去
delete params.id
addExp
.req(params)
.then(res => {
// this.updateVisible = !this.updateVisible
this.InitializationPageValue()
this.$emit('updateClose')
})
.catch(err => console.log(err))
} else { // 编辑表情时,表情信息和表情背景信息分开保存,表情背景的添加和修改直接调用表情接口操作,表情信息里的表情背景数组项不用去管
params.ipBackgroundList = []// 编辑表情时不需要管背景信息,因此清空数组数据
mergeExp
.req(params)
.then(res => {
// this.updateVisible = !this.updateVisible
this.InitializationPageValue()
this.$emit('updateClose')
})
.catch(err => console.log(err))
}
},
// 页面初始化,还原页面
InitializationPageValue() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!