From 898a7a083970e494a2a186efbc81aa570c712211 Mon Sep 17 00:00:00 2001 From: Default User Date: Sat, 10 Jan 2026 15:38:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/goods-update/goods-update.js | 9 +++++++++ pages/goods-update/goods-update.wxml | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/pages/goods-update/goods-update.js b/pages/goods-update/goods-update.js index a89040e..8f3998f 100644 --- a/pages/goods-update/goods-update.js +++ b/pages/goods-update/goods-update.js @@ -612,6 +612,11 @@ Page({ const formattedCreatedAt = formatDateTime(createdAt); console.log('formattedCreatedAt:', formattedCreatedAt); + // 格式化修改时间 + const updatedAt = preloadedData?.updated_at || preloadedData?.updatedAt || product.updated_at || product.updatedAt; + const formattedUpdatedAt = formatDateTime(updatedAt); + console.log('formattedUpdatedAt:', formattedUpdatedAt); + // 详细追踪地区信息 console.log('=== 地区信息详细追踪 ==='); console.log('预加载数据中的region:', preloadedData?.region); @@ -713,6 +718,8 @@ Page({ weightQuantityData: weightQuantityData, // 格式化创建时间 formattedCreatedAt: formattedCreatedAt, + // 格式化修改时间 + formattedUpdatedAt: formattedUpdatedAt, // 创建者信息 creatorName: creatorName, // 地区信息(先设置,后面会被覆盖) @@ -724,7 +731,9 @@ Page({ label: product.label, creatorName: creatorName, formattedCreatedAt: formattedCreatedAt, + formattedUpdatedAt: formattedUpdatedAt, created_at: createdAt, + updated_at: updatedAt, // 添加产品包装字段(放在product之后,确保不被覆盖) producting: product.producting || '', // 添加货源描述字段 diff --git a/pages/goods-update/goods-update.wxml b/pages/goods-update/goods-update.wxml index 4844de5..5e78070 100644 --- a/pages/goods-update/goods-update.wxml +++ b/pages/goods-update/goods-update.wxml @@ -180,6 +180,10 @@ 创建时间: {{goodsDetail.formattedCreatedAt || '暂无'}} + + 修改时间: + {{goodsDetail.formattedUpdatedAt || '暂无'}} +