更新字段

feature/0423
陈伟 9 months ago
parent abe7e8ea7e
commit 8fd6691bb2
  1. 38
      src/views/store/Setting.vue

@ -29,6 +29,42 @@
v-decorator="['logo_image_id']"
/>
</a-form-item>
<a-form-item
label="新品首发"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
extra="建议尺寸: 300*300"
>
<SelectImage
multiple
:defaultList="record.newProductImg ? record.newProductImg : []"
v-decorator="['new_product_img_id']"
/>
</a-form-item>
<a-form-item
label="大牌正品"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
extra="建议尺寸: 300*300"
>
<SelectImage
multiple
:defaultList="record.bigBrandImg ? record.bigBrandImg : []"
v-decorator="['big_brand_img_id']"
/>
</a-form-item>
<a-form-item
label="新人首单"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
extra="建议尺寸: 300*300"
>
<SelectImage
multiple
:defaultList="record.newPeopleOrderImg ? record.newPeopleOrderImg : []"
v-decorator="['new_people_order_img_id']"
/>
</a-form-item>
<a-form-item :wrapperCol="{ span: wrapperCol.span, offset: labelCol.span }">
<a-button type="primary" html-type="submit">提交</a-button>
</a-form-item>
@ -103,7 +139,7 @@ export default {
// api
onFormSubmit (values) {
this.isLoading = true
Api.update({ form: values })
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(',') } })
.then(result => this.$message.success(result.message, 1.5))
.finally(() => this.isLoading = false)
}

Loading…
Cancel
Save