|
|
|
@ -7375,7 +7375,7 @@ app.post('/api/products/update-contacts', async (req, res) => { |
|
|
|
app.post('/api/products/quick-update', async (req, res) => { |
|
|
|
console.log('【快速更新】收到请求:', req.body); |
|
|
|
try { |
|
|
|
const { productId, price, product_contact, contact_phone } = req.body; |
|
|
|
const { productId, price, product_contact, contact_phone, description } = req.body; |
|
|
|
|
|
|
|
if (!productId) { |
|
|
|
return res.status(400).json({ |
|
|
|
@ -7420,6 +7420,11 @@ app.post('/api/products/quick-update', async (req, res) => { |
|
|
|
updateFields.contact_phone = contact_phone; |
|
|
|
console.log('【快速更新】更新联系电话:', contact_phone); |
|
|
|
} |
|
|
|
|
|
|
|
if (description !== undefined) { |
|
|
|
updateFields.description = description; |
|
|
|
console.log('【快速更新】更新货源描述:', description); |
|
|
|
} |
|
|
|
|
|
|
|
// 执行更新
|
|
|
|
await Product.update(updateFields, { |
|
|
|
|