<van-popup show="{{ skuShow }}" position="bottom" custom-style="border-radius:30rpx 30rpx 0 0;" bind:click-overlay="skuOnclose">
<view class='goods_sku'>
<view class='goodHeader'>
<view class='goodHeaderImg'>
<image src='{{goodHeaderImg?goodHeaderImg:imgList[0]}}'></image>
</view>
<view class='goodHeaderTop'>
<view class='goodTitle'>
<view class='goods_name'>{{goodName}}</view>
<!-- 预售金额已开启 -->
<view class='price' wx:if='{{is_presell == 1}}'>
<view class='presell_sku_price'>
<text class='text_title'>定金</text>
<text>¥{{presell_first_money}}</text>
</view>
<view class='presell_sku_price'>
<text class='text_title'>总价</text>
<text>¥{{presell_all_money}}</text>
</view>
</view>
<view class='price' wx:else>
¥{{groupPrice !='' && buyType == 'groupBuy' ? groupPrice : goodPrice}}
<text class='groupPriceTip' wx:if="{{groupStatus == 'groupStart' && buyType == 'groupBuy'}}">拼团价</text>
<text class='groupPriceTip' wx:elif="{{seckillStatus == 'going' || seckillStatus == 'unstart'}}">秒杀价</text>
<text class='groupPriceTip' wx:else='{{discount_tip}}'>折扣价</text>
</view>
</view>
<view class='icon_closeBtn'>
<van-icon name='close' color='#969799' size='20px' bindtap='skuOnclose' />
</view>
</view>
</view>
<view class="{{sku.tree.length != 0 ? 'goods_sku_tree' :''}} ">
<view class='goods_sku_tree_item' wx:for="{{sku.tree}}" wx:key='' wx:for-index='group_idx'>
<view class='goods_sku_tree_key'>{{item.k}}:</view>
<view wx:for="{{item.v}}" class="goods_sku_tree_value {{i.isSelect == 'true' ? 'active_value':''}}" wx:for-item='i' wx:for-index='index' data-attr-index="{{index}}" data-select-index="{{group_idx}}" data-attr-id="{{i.id}}" data-attr-imgurl="{{i.imgUrl}}"
wx:key='item' catchtap="clickMenu" data-isSelect="{{i.isSelect}}">
<text>{{i.name}}</text>
</view>
</view>
</view>
<view class='stock_num'>
<view class='buy_num'>
<view>购买数量:</view>
<van-stepper wx:if="{{sureBtn == 'oneOrderGroup'}}" v-model="value" class='v_stepper' value="{{buyNum}}" max="{{stockNum}}" bind:change="changeBuynum" />
<van-stepper wx:else v-model="value" class='v_stepper' value="{{buyNum}}" max="{{maxBuy != ''?maxBuy:stockNum}}" bind:change="changeBuynum" />
</view>
<view class='surplus_num'>剩余{{stockNum}}件
<text class='maxbuy' wx:if="{{maxBuy != ''}}">每次限购{{maxBuy}}件</text> </view>
</view>
</view>
<view class='bottomBtn' wx:if="{{stockNum != 0}}">
<view wx:if="{{sku_btn}}">
<!-- 预售 -->
<view wx:if='{{is_presell == 1}}'>
<view class='buyOn' wx:if='{{presell_list.presellnum != 0}}' bindtap='buyNowOrder'>立即购买</view>
<view class='buyOn' wx:else>商品已售罄</view>
</view>
<!-- 秒杀 -->
<view wx:elif="{{seckillStatus == 'going' || seckillStatus == 'unstart'}}">
<view class='buyOn' bindtap='buyNowOrder'>立即购买</view>
</view>
<!-- 砍价 -->
<view wx:elif="{{bargain_list.status == 1 || bargain_list.status == 0}}">
<view class='buyOn' bindtap='buyNowOrder'>立即购买</view>
</view>
<!--goods_type 实物或虚拟商品标志 1实物商品 0 虚拟商品 -->
<view wx:elif='{{goodDetail.goods_type == 0}}'>
<view class='buyOn' bindtap='buyNowOrder'>立即购买</view>
</view>
<view class='sku_btn' wx:else>
<view class='addCart' bindtap='addCart'>加入购物车</view>
<view class='buyOn' bindtap='buyNowOrder'>立即购买</view>
</view>
</view>
<view wx:else>
<view class='buyOn' bindtap='buyNowOrder' wx:if="{{sureBtn == 'order'}}">立即购买</view>
<view class='addCart' bindtap='onOrderInfoPage' wx:if="{{sureBtn == 'oneOrderGroup'}}">立即购买</view>
<view class='addCart' bindtap='addCart' wx:if="{{sureBtn == 'addcart'}}">加入购物车</view>
</view>
</view>
<view class='nocartbottom' wx:else>
<view class='nocartbtn'>商品已售罄</view>
</view>
</van-popup>