|
|
@ -97,13 +97,7 @@ |
|
|
<text wx:if="{{goodsDetail.weightQuantityData && goodsDetail.weightQuantityData[0] && goodsDetail.weightQuantityData[0].priceChangeDirection === 'up'}}" class="price-change-arrow up">↑</text> |
|
|
<text wx:if="{{goodsDetail.weightQuantityData && goodsDetail.weightQuantityData[0] && goodsDetail.weightQuantityData[0].priceChangeDirection === 'up'}}" class="price-change-arrow up">↑</text> |
|
|
<text wx:elif="{{goodsDetail.weightQuantityData && goodsDetail.weightQuantityData[0] && goodsDetail.weightQuantityData[0].priceChangeDirection === 'down'}}" class="price-change-arrow down">↓</text> |
|
|
<text wx:elif="{{goodsDetail.weightQuantityData && goodsDetail.weightQuantityData[0] && goodsDetail.weightQuantityData[0].priceChangeDirection === 'down'}}" class="price-change-arrow down">↓</text> |
|
|
</view> |
|
|
</view> |
|
|
<view |
|
|
|
|
|
class="compare-button" |
|
|
|
|
|
bindtap="onCompareClick" |
|
|
|
|
|
style="display: flex; align-items: left; margin-right: 20rpx; padding: 8rpx 16rpx; border: 2rpx solid #4a90e2; border-radius: 20rpx; position: relative; left: 68rpx; top: 0rpx" |
|
|
|
|
|
> |
|
|
|
|
|
<text style="font-size: 32rpx; color: #4a90e2; margin-right: 8rpx;">对比价格</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view |
|
|
<view |
|
|
class="favorite-button" |
|
|
class="favorite-button" |
|
|
bindtap="onFavoriteClick" |
|
|
bindtap="onFavoriteClick" |
|
|
@ -121,12 +115,26 @@ |
|
|
<view class="wq-title">规格信息</view> |
|
|
<view class="wq-title">规格信息</view> |
|
|
<view class="wq-list"> |
|
|
<view class="wq-list"> |
|
|
<block wx:for="{{goodsDetail.weightQuantityData}}" wx:key="index"> |
|
|
<block wx:for="{{goodsDetail.weightQuantityData}}" wx:key="index"> |
|
|
<view class="wq-item"> |
|
|
<view class="spec-card"> |
|
|
<!-- 使用display字段显示完整信息,包括已下架标记 --> |
|
|
<!-- 顶部:规格名称 + 价格 --> |
|
|
<text class="wq-text">{{item.display}}</text> |
|
|
<view class="spec-header"> |
|
|
<text wx:if="{{item.priceChangeDirection === 'up'}}" class="price-change-arrow up">↑</text> |
|
|
<text class="spec-name">{{item.weightSpec}}</text> |
|
|
<text wx:elif="{{item.priceChangeDirection === 'down'}}" class="price-change-arrow down">↓</text> |
|
|
<text class="spec-price">¥{{item.price}}</text> |
|
|
<text wx:if="{{item.isOffShelf}}" style="color: red; margin-left: 20rpx;">已下架</text> |
|
|
</view> |
|
|
|
|
|
<!-- 底部:降价/库存/下架状态 --> |
|
|
|
|
|
<view class="spec-footer"> |
|
|
|
|
|
<!-- 降价标识(仅当 priceChangeDirection === 'down' 时显示) --> |
|
|
|
|
|
<view wx:if="{{item.priceChangeDirection === 'down'}}" class="price-down-tag"> |
|
|
|
|
|
<text class="arrow">↓</text> |
|
|
|
|
|
<text class="label">降价</text> |
|
|
|
|
|
</view> |
|
|
|
|
|
<!-- 已下架标识 --> |
|
|
|
|
|
<text wx:if="{{item.isOffShelf}}" class="off-shelf-tag">已下架</text> |
|
|
|
|
|
<!-- 库存信息(未下架且有件数且未售空时显示) --> |
|
|
|
|
|
<text wx:elif="{{item.quantity && item.quantity !== '售空' && !item.weightSpec.includes('售空') && !item.display.includes('售空')}}" class="stock-info">剩余{{item.quantity}}件</text> |
|
|
|
|
|
<!-- 售空标识(未下架且售空时显示) --> |
|
|
|
|
|
<text wx:else class="stock-info">已售{{item.quantity || 0}}件</text> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</block> |
|
|
</block> |
|
|
</view> |
|
|
</view> |
|
|
@ -375,49 +383,40 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 操作按钮区域 --> |
|
|
<!-- 操作按钮区域(替换原有底部按钮) --> |
|
|
<view class="action-buttons" wx:if="{{!fromSeller}}"> |
|
|
<view class="action-buttons" wx:if="{{!fromSeller}}"> |
|
|
<button |
|
|
<!-- 物流 --> |
|
|
class="call-button bottom-button" |
|
|
<button class="bottom-button logistics-btn" bindtap="onLogisticsClick"> |
|
|
bindtap="makePhoneCall" |
|
|
<text class="icon">🚚</text> |
|
|
data-phone="{{goodsDetail.contact_phone}}" |
|
|
<text class="text">物流</text> |
|
|
> |
|
|
|
|
|
拨打电话 |
|
|
|
|
|
</button> |
|
|
</button> |
|
|
<button |
|
|
<!-- 对比 --> |
|
|
class="chat-button bottom-button" |
|
|
<button class="bottom-button compare-btn" bindtap="onCompareClick"> |
|
|
bindtap="showBargainModal" |
|
|
<text class="icon">⚖️</text> |
|
|
data-id="{{goodsDetail.id}}" |
|
|
<text class="text">对比</text> |
|
|
disabled="{{fromChatDetail}}" |
|
|
</button> |
|
|
wx:if="{{goodsDetail.bargaining === 0 && goodsDetail.status !== 'sold_out' && goodsDetail.status !== 'sold' && goodsDetail.status !== 'out_of_stock' && !goodsDetail.supplyStatus.includes('售空')}}" |
|
|
<!-- 联系 --> |
|
|
> |
|
|
<button class="bottom-button chat-btn" bindtap="onChat" data-id="{{goodsDetail.id}}"> |
|
|
还价 |
|
|
<text class="icon">💬</text> |
|
|
|
|
|
<text class="text">联系</text> |
|
|
</button> |
|
|
</button> |
|
|
<button |
|
|
<!-- 还价(保留原有显示条件) --> |
|
|
class="chat-button bottom-button" |
|
|
<button class="bottom-button bargain-btn" |
|
|
bindtap="navigateToFreightCalculator" |
|
|
wx:if="{{goodsDetail.bargaining === 0 && goodsDetail.status !== 'sold_out' && goodsDetail.status !== 'sold' && goodsDetail.status !== 'out_of_stock' && !goodsDetail.supplyStatus.includes('售空')}}" |
|
|
data-id="{{goodsDetail.id}}" |
|
|
bindtap="showBargainModal"> |
|
|
wx:if="{{isInternalUser}}" |
|
|
<text class="icon">💰</text> |
|
|
> |
|
|
<text class="text">还价</text> |
|
|
运费估算 |
|
|
|
|
|
</button> |
|
|
</button> |
|
|
<button |
|
|
<!-- 电话 --> |
|
|
class="chat-button bottom-button" |
|
|
<button class="bottom-button phone-btn" bindtap="makePhoneCall" data-phone="{{goodsDetail.contact_phone}}"> |
|
|
bindtap="onChat" |
|
|
<text class="icon">📞</text> |
|
|
data-id="{{goodsDetail.id}}" |
|
|
<text class="text">电话</text> |
|
|
disabled="{{fromChatDetail}}" |
|
|
|
|
|
> |
|
|
|
|
|
💬 留言 |
|
|
|
|
|
</button> |
|
|
</button> |
|
|
</view> |
|
|
</view> |
|
|
<!-- 返回按钮区域(仅在seller页面查看时显示) --> |
|
|
|
|
|
|
|
|
<!-- 返回按钮区域(fromSeller 时保留) --> |
|
|
<view class="action-buttons" wx:if="{{fromSeller}}"> |
|
|
<view class="action-buttons" wx:if="{{fromSeller}}"> |
|
|
<button |
|
|
<button class="back-button bottom-button" bindtap="goBack">返回</button> |
|
|
class="back-button bottom-button" |
|
|
|
|
|
bindtap="goBack" |
|
|
|
|
|
> |
|
|
|
|
|
返回 |
|
|
|
|
|
</button> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 讲价弹窗 --> |
|
|
<!-- 讲价弹窗 --> |
|
|
|