This commit is contained in:
@@ -196,6 +196,9 @@ export default {
|
|||||||
unit: '',
|
unit: '',
|
||||||
price: '',
|
price: '',
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
|
length: '',
|
||||||
|
width: '',
|
||||||
|
area: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
status: 1
|
status: 1
|
||||||
}
|
}
|
||||||
@@ -236,11 +239,12 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const formData = JSON.parse(JSON.stringify(this.form))
|
||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
await productApi.updateProduct(this.form)
|
await productApi.updateProduct(formData)
|
||||||
uni.showToast({ title: '更新成功', icon: 'success' })
|
uni.showToast({ title: '更新成功', icon: 'success' })
|
||||||
} else {
|
} else {
|
||||||
await productApi.createProduct(this.form)
|
await productApi.createProduct(formData)
|
||||||
uni.showToast({ title: '创建成功', icon: 'success' })
|
uni.showToast({ title: '创建成功', icon: 'success' })
|
||||||
}
|
}
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
|
|||||||
Reference in New Issue
Block a user