This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user