Browse Source

Merge remote-tracking branch 'origin/Xfy'

pull/6/head
Default User 2 months ago
parent
commit
4108a1a844
  1. 17
      pages/goods-detail/goods-detail.js
  2. 12
      pages/index/index.js

17
pages/goods-detail/goods-detail.js

@ -599,19 +599,12 @@ Page({
console.log('✓ 售空分支执行: 只显示规格信息');
console.log('weightQuantityData设置为:', weightQuantityData);
} else {
// 非售空状态,正常处理规格信息,但不显示件数
console.log('× 非售空分支执行: 只显示规格信息');
console.log('输入参数: weightSpecString="', weightSpecString, '"');
// 非售空状态,使用processWeightAndQuantityData函数正确处理规格和件数信息
console.log('× 非售空分支执行: 调用processWeightAndQuantityData处理');
console.log('输入参数: weightSpecString="', weightSpecString, '", quantityString="', quantityString, '"');
weightQuantityData = processWeightAndQuantityData(weightSpecString, quantityString, '');
if (weightSpecString) {
// 处理净重/规格字符串,只显示规格信息
const weightSpecArray = weightSpecString.split(/[,,、]/).map(item => item.trim()).filter(item => item);
weightQuantityData = weightSpecArray.map(spec => ({
weightSpec: spec.includes('毛重') ? spec : `毛重${spec}`,
quantity: '',
display: spec.includes('毛重') ? spec : `毛重${spec}`
}));
}
console.log('× 非售空分支结果:', weightQuantityData);
}

12
pages/index/index.js

@ -664,18 +664,6 @@ Page({
// 其他情况显示具体数字
displayStock = totalStock;
}
console.log('库存计算详情:', {
productId: product.productId || product.id,
minOrder: product.minOrder,
quantity: product.quantity,
stock: product.stock,
inventory: product.inventory,
availableStock: product.availableStock,
totalAvailable: product.totalAvailable,
calculatedTotal: totalStock,
displayStock: displayStock
});
// 格式化规格显示
const formattedSpec = this.formatSpecification(product.specification || product.spec || '', product.yolk || '');

Loading…
Cancel
Save