product.wxml 4.6 KB

1
  1. <view class="container"><view class="carousel"><swiper indicator-dots="{{true}}" circular="{{true}}" duration="400"><block wx:for="{{imgList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><swiper-item class="swiper-item"><view class="image-wrapper"><image class="loaded" src="{{item}}" mode="scaleToFill"></image></view></swiper-item></block></swiper></view><block wx:if="{{goodsType==1}}"><view class="introduce-section seckill-box-title"><view class="title flex"><view class="title-box"><text class="price-tip">¥</text><block wx:if="{{userInfo&&userInfo.level==1}}"><text class="price">{{goodsObjact.vip_repurchase*1||''}}</text></block><block wx:if="{{userInfo&&userInfo.level==2}}"><text class="price">{{goodsObjact.agent_repurchase*1||''}}</text></block><block wx:if="{{!hasLogin||userInfo.level==0}}"><text class="price">{{goodsObjact.price*1}}</text></block></view><view class="flex timeStop"><view>距离结束</view><uni-countdown vue-id="1c037ce0-1" color="#ffffff" background-color="#D65B3F" splitor-color="#FFFFFF" show-day="{{false}}" hour="{{seckillObj.stopTimeH}}" minute="{{seckillObj.stopTimeM}}" second="{{seckillObj.stopTimeS}}" bind:__l="__l"></uni-countdown></view></view></view></block><view class="introduce-section"><block wx:if="{{goodsType==0}}"><view class="price-box"><text class="price-tip">¥</text><block wx:if="{{userInfo&&userInfo.identity==1}}"><text class="price">{{goodsObjact.vip_repurchase||''}}</text></block><block wx:if="{{userInfo&&userInfo.identity==2}}"><text class="price">{{goodsObjact.agent_repurchase||''}}</text></block><block wx:if="{{!hasLogin||userInfo.identity==0}}"><text class="price">{{goodsObjact.price}}</text></block><block wx:if="{{goodsObjact.ot_price>goodsObjact.price}}"><text class="m-price">{{"¥"+goodsObjact.ot_price}}</text></block></view></block><block wx:if="{{goodsType==0}}"><text class="title">{{goodsObjact.store_name}}</text></block></view><view class="c-list"><view data-event-opts="{{[['tap',[['toggleSpec',['$event']]]]]}}" class="c-row b-b" bindtap="__e"><text class="tit">购买数量</text><view class="con"><text class="selected-text">{{goodsNumber}}</text></view><text class="iconfont iconenter"></text></view><block wx:if="{{goodsType==1}}"><view class="c-row b-b"><text class="tit">限购数量</text><view class="con"><text class="selected-text">{{goodsObjact.num+goodsObjact.unit_name}}</text></view></view></block></view><view class="detail-desc"><view class="d-header"><text>商品详情</text></view><rich-text class="detail-centent" nodes="{{goodsObjact.description}}"></rich-text><view class="{{[(goodsType==1||goodsType==2)?'contentBottomHeight':'',(goodsType==0)?'goodsBottom':'']}}"></view></view><block wx:if="{{goodsType==0}}"><view class="page-bottom"><view class="action-btn-group"><view data-event-opts="{{[['tap',[['toFavorite',['$0'],['goodsObjact']]]]]}}" class="shoucang flex" bindtap="__e"><image src="../../static/icon/sc-ico.png" mode></image><view>收藏</view></view><view class="buy-now"><button class=" action-btn no-border add-cart-btn" type="primary" data-event-opts="{{[['tap',[['toggleSpec',[1]]]]]}}" catchtap="__e">立即购买</button></view></view></view></block><view data-event-opts="{{[['touchmove',[['stopPrevent',['$event']]]],['tap',[['toggleSpec',['$event']]]]]}}" class="{{['popup','spec',specClass]}}" catchtouchmove="__e" bindtap="__e"><view class="mask"></view><view data-event-opts="{{[['tap',[['stopPrevent',['$event']]]]]}}" class="layer attr-content" catchtap="__e"><view class="a-t"><image src="{{actionImage}}"></image><view class="right"><view class="good-name clamp">{{goodsObjact.store_name}}</view><text class="price">{{"¥"+actionPrice*goodsNumber}}</text></view></view><block wx:for="{{specList}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="attr-list"><text>{{item.attr_name}}</text><view class="item-list"><block wx:for="{{item.attr_value}}" wx:for-item="childItem" wx:for-index="childIndex" wx:key="childIndex"><text data-event-opts="{{[['tap',[['selectSpec',['$0','$1',index],[[['specList','',index],['attr_value','',childIndex]],[['specList','',index]]]]]]]}}" class="{{['tit',(childItem.check)?'selected':'']}}" bindtap="__e">{{''+childItem.attr+''}}</text></block></view></view></block><view class="attr-list" style="padding-bottom:120rpx;"><text>购买数量</text><view class="item-list"><uni-number-box class="step" vue-id="1c037ce0-2" isMin="{{true}}" value="{{goodsNumber}}" min="{{1}}" max="{{goodsNumberMax}}" data-event-opts="{{[['^eventChange',[['numberChange']]]]}}" bind:eventChange="__e" bind:__l="__l"></uni-number-box></view></view><button data-event-opts="{{[['tap',[['buy',['$event']]]]]}}" class="btn" catchtap="__e">确定</button></view></view></view>