|
|
@ -139,7 +139,13 @@ export default { |
|
|
|
// 提交到后端api |
|
|
|
// 提交到后端api |
|
|
|
onFormSubmit (values) { |
|
|
|
onFormSubmit (values) { |
|
|
|
this.isLoading = true |
|
|
|
this.isLoading = true |
|
|
|
Api.update({ form: { ...values, new_product_img_id: values.new_product_img_id.join(','), big_brand_img_id: values.big_brand_img_id.join(','), new_people_order_img_id: values.new_people_order_img_id.join(',') } }) |
|
|
|
const params = { |
|
|
|
|
|
|
|
new_product_img_id: (values.new_product_img_id && values.new_product_img_id.join(',')) || '', |
|
|
|
|
|
|
|
big_brand_img_id: (values.big_brand_img_id && values.big_brand_img_id.join(',')) || '', |
|
|
|
|
|
|
|
new_people_order_img_id: (values.new_people_order_img_id && values.new_people_order_img_id.join(',')) || '' |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Api.update({ form: { ...values, ...params } }) |
|
|
|
.then(result => this.$message.success(result.message, 1.5)) |
|
|
|
.then(result => this.$message.success(result.message, 1.5)) |
|
|
|
.finally(() => this.isLoading = false) |
|
|
|
.finally(() => this.isLoading = false) |
|
|
|
} |
|
|
|
} |
|
|
|