From adfb2db2a65b00cf2aa4d1a4d1cc206e71cc2339 Mon Sep 17 00:00:00 2001 From: Trae AI Date: Fri, 2 Jan 2026 16:32:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=86=E9=A2=91=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=9B=BE?= =?UTF-8?q?=E7=89=87Urls=E5=88=B0=E7=BC=96=E8=BE=91API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Reject.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Reject.js b/Reject.js index 8f17782..23d9d64 100644 --- a/Reject.js +++ b/Reject.js @@ -1170,8 +1170,7 @@ app.put('/api/supplies/:id/edit', async (req, res) => { } } -<<<<<<< Updated upstream -======= + // 处理媒体文件上传(图片和视频) let uploadedImageUrls = []; if (Array.isArray(imageUrls) && imageUrls.length > 0) { @@ -1216,20 +1215,20 @@ app.put('/api/supplies/:id/edit', async (req, res) => { console.log('媒体文件处理完成,成功上传', uploadedImageUrls.length, '个文件'); } ->>>>>>> Stashed changes + // 更新货源信息 const updateQuery = ` UPDATE products SET productName = ?, price = ?, quantity = ?, grossWeight = ?, yolk = ?, specification = ?, supplyStatus = ?, description = ?, region = ?, - producting = ?, product_contact = ?, contact_phone = ? + producting = ?, product_contact = ?, contact_phone = ?, imageUrls = ? WHERE id = ? `; await connection.query(updateQuery, [ productName, price.toString(), parseInt(quantity), grossWeight, yolk, specification, supplyStatus, description, region, - producting, productContact, contactPhone, productId + producting, productContact, contactPhone, JSON.stringify(uploadedImageUrls), productId ]); // 提交事务