diff --git a/src/pages/product/manage.vue b/src/pages/product/manage.vue index 2cc0ed0..bdb0515 100644 --- a/src/pages/product/manage.vue +++ b/src/pages/product/manage.vue @@ -196,6 +196,9 @@ export default { unit: '', price: '', categoryId: '', + length: '', + width: '', + area: '', remark: '', status: 1 } @@ -236,11 +239,12 @@ export default { } try { + const formData = JSON.parse(JSON.stringify(this.form)) if (this.isEdit) { - await productApi.updateProduct(this.form) + await productApi.updateProduct(formData) uni.showToast({ title: '更新成功', icon: 'success' }) } else { - await productApi.createProduct(this.form) + await productApi.createProduct(formData) uni.showToast({ title: '创建成功', icon: 'success' }) } this.closeModal()