Browse Source

讲价优化

Xfy
徐飞洋 2 weeks ago
parent
commit
60ffc16deb
  1. 12
      pages/goods-detail/goods-detail.js
  2. 1
      pages/goods-detail/goods-detail.wxml
  3. 4
      pages/profile/index.wxml
  4. 15
      tatus'
  5. 2
      utils/api.js

12
pages/goods-detail/goods-detail.js

@ -1000,8 +1000,10 @@ Page({
const clientX = touch.clientX;
const screenWidth = wx.getWindowInfo().windowWidth;
const sliderWidth = screenWidth * 0.8;
// 获取屏幕宽度
const screenWidth = wx.getSystemInfoSync().windowWidth;
// 计算滑块宽度和位置(基于屏幕宽度的比例)
const sliderWidth = screenWidth * 0.6; // 调整为合适的比例
const sliderLeft = (screenWidth - sliderWidth) / 2;
let progress = ((clientX - sliderLeft) / sliderWidth) * 100;
@ -2121,7 +2123,9 @@ Page({
// 确保region使用提取后的省份信息,放在最后覆盖所有展开操作
region: region,
// 添加价格波动信息
specPriceChanges: specPriceChanges
specPriceChanges: specPriceChanges,
// 添加讲价字段
bargaining: product.bargaining !== undefined ? product.bargaining : 0
};
// 调试:打印formattedGoods的imageUrls和mediaItems
@ -2142,6 +2146,8 @@ Page({
console.log('formattedGoods._isSoldOut:', formattedGoods._isSoldOut);
console.log('商品状态:', formattedGoods.status);
console.log('weightQuantityData:', formattedGoods.weightQuantityData);
console.log('bargaining字段:', formattedGoods.bargaining);
console.log('bargaining类型:', typeof formattedGoods.bargaining);
// 根据来源决定显示完整地区还是仅显示省份
let displayRegion = formattedGoods.region || '暂无';

1
pages/goods-detail/goods-detail.wxml

@ -418,6 +418,7 @@
bindtap="showBargainModal"
data-id="{{goodsDetail.id}}"
disabled="{{fromChatDetail}}"
wx:if="{{goodsDetail.bargaining == 0 && goodsDetail.status !== 'sold_out' && goodsDetail.status !== 'sold' && goodsDetail.status !== 'out_of_stock' && !goodsDetail.supplyStatus.includes('售空')}}"
>
讲价
</button>

4
pages/profile/index.wxml

@ -106,10 +106,10 @@
<view class="title">系统信息</view>
<view style="padding: 20rpx 0;">
<view style="font-size: 26rpx; color: #333; margin-bottom: 16rpx;">
当前版本:{{versionInfo.version || '2.6.10'}}
当前版本:{{versionInfo.version || '2.6.222'}}
</view>
<view style="font-size: 26rpx; color: #333; margin-bottom: 16rpx;">
上次更新:{{versionInfo.lastUpdate || '2026-02-8'}}
上次更新:{{versionInfo.lastUpdate || '2026-02-22'}}
</view>
</view>
</view>

15
tatus'

@ -0,0 +1,15 @@
SSUUMMMMAARRYY OOFF LLEESSSS CCOOMMMMAANNDDSS
Commands marked with * may be preceded by a number, _N.
Notes in parentheses indicate the behavior if _N is given.
A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.
h H Display this help.
q :q Q :Q ZZ Exit.
---------------------------------------------------------------------------
MMOOVVIINNGG
e ^E j ^N CR * Forward one line (or _N lines).
y ^Y k ^K ^P * Backward one line (or _N lines).

2
utils/api.js

@ -4030,6 +4030,8 @@ module.exports = {
// 添加spec_status字段检查
console.log('- 是否包含spec_status:', 'spec_status' in data.data);
console.log('- spec_status值:', data.data.spec_status);
console.log('- 是否包含bargaining:', 'bargaining' in data.data);
console.log('- bargaining值:', data.data.bargaining);
console.log('- 完整字段:', Object.keys(data.data));
}
return data;

Loading…
Cancel
Save