|
@@ -3,7 +3,7 @@
|
|
<!-- 商品图片 -->
|
|
<!-- 商品图片 -->
|
|
<view class="empty-space">
|
|
<view class="empty-space">
|
|
<swiper style="width: 100%; height: 100%;" autoplay="true" interval="3000" circular>
|
|
<swiper style="width: 100%; height: 100%;" autoplay="true" interval="3000" circular>
|
|
- <block wx:for="{{item.detail_images}}" wx:key="index">
|
|
|
|
|
|
+ <block wx:for="{{item.specList[gaoliao].detail_images}}" wx:key="index">
|
|
<swiper-item>
|
|
<swiper-item>
|
|
<image style="width: 100%; height: 100%;" src="{{item}}" mode="aspectFill"
|
|
<image style="width: 100%; height: 100%;" src="{{item}}" mode="aspectFill"
|
|
bindtap="previewImage" data-index="{{index}}" />
|
|
bindtap="previewImage" data-index="{{index}}" />
|
|
@@ -16,8 +16,8 @@
|
|
<!-- 商品价格和浏览量 -->
|
|
<!-- 商品价格和浏览量 -->
|
|
<view class="price-and-views">
|
|
<view class="price-and-views">
|
|
<view>
|
|
<view>
|
|
- <text class="price">¥{{item.price}}</text>
|
|
|
|
- <text class="original-price">¥{{item.old_price}}</text>
|
|
|
|
|
|
+ <text class="price">¥{{item.specList[gaoliao].price ? item.specList[gaoliao].price : '暂无'}}</text>
|
|
|
|
+ <text class="original-price">¥{{item.specList[gaoliao].old_price ? item.specList[gaoliao].old_price : '暂无'}}</text>
|
|
</view>
|
|
</view>
|
|
<view style="display: flex; align-content: center;">
|
|
<view style="display: flex; align-content: center;">
|
|
<image style="width: 30rpx; height: 30rpx;" src="{{showimg}}" />
|
|
<image style="width: 30rpx; height: 30rpx;" src="{{showimg}}" />
|
|
@@ -31,8 +31,15 @@
|
|
<!-- 选择规格 -->
|
|
<!-- 选择规格 -->
|
|
<view class="specifications">
|
|
<view class="specifications">
|
|
<text style="font-size: 38rpx;">选择规格</text>
|
|
<text style="font-size: 38rpx;">选择规格</text>
|
|
- <view class="specifications_boxs">
|
|
|
|
- <button wx:for="{{item.specs}}" wx:key="index" class="spec-btn {{gaoliao === index ? 'active' : ''}}">{{item}}</button>
|
|
|
|
|
|
+ <view wx:if="{{item.specList.length > 0}}" class="specifications_boxs">
|
|
|
|
+ <button wx:for="{{item.specList}}" wx:key="index" class="spec-btn {{gaoliao === index ? 'active' : ''}}"
|
|
|
|
+ bindtap="selectSpec"
|
|
|
|
+ data-specindex="{{index}}">
|
|
|
|
+ {{item.spec}}
|
|
|
|
+ </button>
|
|
|
|
+ </view>
|
|
|
|
+ <view wx:else class="specifications_boxs">
|
|
|
|
+ <text style="width: 100%; text-align: center; padding: 30rpx 0; color: #ccc;">暂无规格</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -50,7 +57,8 @@
|
|
<view class="product-details">
|
|
<view class="product-details">
|
|
<text style="font-size: 38rpx;">产品详情</text>
|
|
<text style="font-size: 38rpx;">产品详情</text>
|
|
<view class="details-list">
|
|
<view class="details-list">
|
|
- <text wx:for="{{item.details}}" wx:key="index">• {{item}}</text>
|
|
|
|
|
|
+ <!-- <text wx:for="{{item.details}}" wx:key="index">• {{item}}</text> -->
|
|
|
|
+ <text>{{item.specList[gaoliao].details}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|