detail.wxml 5.92 KB
<import src="./picker/picker.wxml"/>
<wxs src="../../../wxs/helper.wxs" module="helper"/>
<import src="../../../vendors/zanui/actionsheet/index.wxml"/>

<view class="detail-container">
    <view class='topContainer'>
        <product-banner image-list="{{productImages}}" product-name="{{productName}}"></product-banner>
    </view>
    <view class="price-seperator"></view>
    <view class="goodPrice">
        <text class="realPrice">{{salesPrice != '0' ? salesPrice : marketPrice}}</text>
        <text class="price" wx:if="{{salesPrice != '0'}}">{{marketPrice}}</text>
        <view class="goodShare">
            <image class="shareIcon" src="../../../static/images/share-ic-dark@2x.png" bindtap="share"></image>
            <button bindtap="share" class="shareButton"></button>
        </view>
    </view>
    <view class="gap"></view>
    <!-- 支持的服务 -->
    <view class="supportService"
          style="display: {{productSupportServiceList.length>0?'block':'none'}} ;flex-direction: row; display: flex;">
        <view class="supportService-item" wx:for="{{productSupportServiceList}}" wx:key="supportService">
            <text wx:if="{{item.flag == 1}}" class="iconfont icon-duihao-fill"></text>
            <text wx:else class="iconfont icon-warn-fill unsupport-icon"></text>
            <text class="support-service-title">{{item.title}}</text>
        </view>
    </view>
    <view class="gap"></view>
    <view class="goodsInfo" style="display:{{productDesc.length>0?'block':'none'}}">
        <view class="module-title">
            <text class="text">商品信息 <text class="sub-text">DESCRIPTION</text></text>
        </view>
        <view class="table">
            <view class="tr" wx:for="{{productDesc.length/2}}" wx:key="unique">
                <view class="td">{{productDesc[index*2]}}</view>
                <view class="td">{{productDesc[index*2+1]}}</view>
            </view>
        </view>
        <view wx:if="{{productPhrare}}" class="goodsInfoPhrare">
            <text class="lightGrayFont">{{productPhrare}}</text>
        </view>
    </view>
    <view class="goodsInfo" style="display:{{productSizeContent.length>0?'block':'none'}}">
        <view class="module-title">
            <text class="text">尺码信息 <text class="sub-text">INFORMATION</text></text>
        </view>
        <scroll-view class="table">
            <view class="tr">
                <view class="td" wx:for="{{productSizeTitle}}" wx:key="unique">{{item}}</view>
            </view>
            <view class="tr" wx:for="{{productSizeContent}}" wx:key="unique">
                <view class="td" wx:for="{{productSizeContent[index]}}" wx:key="unique">{{item}}</view>
            </view>
        </scroll-view>
    </view>

    <view class="goodsInfo" style="display:{{productMeasurementImage?'block':'none'}}">
        <view class="module-title">
            <text class="text">测量信息 <text class="sub-text">DESCRIPTION</text></text>
        </view>
        <image src="{{productMeasurementImage}}" mode="widthFix"></image>
    </view>
    <view class="goodsInfo" style="display:{{productMaterialList[0].remark?'block':'none'}}">
        <view class="module-title">
            <text class="text">商品材质 <text class="sub-text">DESCRIPTION</text></text>
        </view>
        <view class="goodsInfoDescription">
            <text class="lightGrayFont">{{productMaterialList[0].remark}}</text>
        </view>
        <view class="goodsTexture" wx:for="{{productWashTipsBoList}}" wx:key="unique">
            <view class="texture">
                <image class="img" src= "{{item.img}}" mode="widthFix"/>
                <view class="desc">
                    <text class="lightGrayFont">{{item.caption}}</text>
                </view>
            </view>
        </view>
    </view>

    <view class="goodsInfo img" style="display:{{productIntroImageList.length>0?'block':'none'}}">
        <view class="module-title">
            <text class="text">商品详情 <text class="sub-text">DESCRIPTION</text></text>
        </view>
        <view wx:for="{{productIntroImageList}}" wx:key="introImage" style="text-align:center">
            <image class="intro-image" src="{{item}}" mode="widthFix"></image>
        </view>
    </view>
    <block wx:if="{{shopRecList.length}}">
        <view class="gap"></view>
        <view class='titleContainer'>
            <view class='titleLine'></view>
            <view class='titleDesc'> 店铺推荐商品</view>
        </view>
        <view class="product-list shop-rec">
            <product-list list="{{shopRecList}}"></product-list>
        </view>
    </block>
    <block wx:if="{{preferList.length}}">
        <view class="gap"></view>
        <view class='titleContainer'>
            <view class='titleLine'></view>
            <view class='titleDesc'> 你可能喜欢</view>
        </view>
        <view class="product-list prefer">
            <product-list list="{{preferList}}"></product-list>
        </view>
    </block>
    <copyright></copyright>
</view>
<block wx:if="{{storage_sum==0}}">
    <view class='bottom-tip-view' wx:if="{{showBottomTipView}}" style="display:{{storage_sum===0?'flex':'none'}}">
        <text class="bottom-tip-view-title" style="display:{{is_supplyed?'flex':'none'}}">此商品已售罄,请等待后续备货!</text>
        <text class="bottom-tip-view-title" style="display:{{is_supplyed?'none':'flex'}}">已售罄</text>
    </view>
</block>
<block wx:else>
    <view 
        class="bottom-action {{(productOnlyProvideByYohoAPP || productOnlyProvideByYohoStore || productNotForSale) ? 'disabled' : ''}}" >
        <view 
            class="buy-btn" 
              bindtap="buyImmediate">立即购买
        </view>
    </view>
</block>
<quick-navigation show-menu="{{showMenu}}" show-back-top="{{showBackTop}}" show="{{true}}"
                  bindbacktop="backTop" margin-bottom="{{150}}"></quick-navigation>

<template is="Picker" data="{{pickerData, loadingForPayment}}"/>
<template is="zan-actionsheet" data="{{...actionSheet}}"/>