123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <i-auth bind:authSuccess="authSuccess" needAuth="{{!is_login}}">
- <view class='page-wrap'>
- <!--搜索框begin-->
- <view class='search-bar'>
- <view class='search-box'>
- <input class='ipt' placeholder="搜索商品" confirm-type="搜索" type="text" bindconfirm="goResult"></input>
- <view class='search-icon'>
- <image src='../../images/search.png'></image>
- </view>
- </view>
- </view>
- <view class="page-content">
- <scroll-view scrollWithAnimation scrollY class="page-category" scrollTop="{{categoryScrollBarTop}}" style="height:{{scrollViewHeight}}px">
- <view bindtap="changeCategory" class="category-item {{rushCategoryData.activeIndex===index?'active':''}}" data-index="{{index}}" wx:for="{{rushCategoryData.tabs}}" wx:key="index">
- <view class="item-border"></view>
- <view>{{item.name}}</view>
- </view>
- </scroll-view>
- <!-- 子栏目 -->
- <view class='mask' hidden='{{!showDrop}}' bindtap='showDrop'></view>
- <view class='sub-cate' wx:if="{{rushCategoryData.tabs[rushCategoryData.activeIndex].sub.length}}">
- <scroll-view class='sub-cate-scroll' scroll-x scrollLeft="{{scrollLeft}}">
- <view class='sub-cate-item {{active_sub_index==0?"active":""}}' data-idx="0" data-id='{{rushCategoryData.tabs[rushCategoryData.activeIndex].id}}' bindtap='change_sub_cate'>默认</view>
- <view class='sub-cate-item {{active_sub_index==index+1?"active":""}}' wx:for="{{rushCategoryData.tabs[rushCategoryData.activeIndex].sub}}" wx:key="{{index}}" data-idx="{{index+1}}" data-id='{{item.id}}' bindtap='change_sub_cate'>{{item.name}}</view>
- </scroll-view>
- <view class='icon-open' bindtap='showDrop'><image class="openImg {{showDrop?'':'down'}}" src="../../images/commentsOpen.png"></image></view>
- </view>
- <view class='sub-cate-hide' wx:if="{{rushCategoryData.tabs[rushCategoryData.activeIndex].sub.length&&showDrop}}">
- <view class='sub-cate-item {{active_sub_index==0?"active":""}}' data-idx="0" data-id='{{rushCategoryData.tabs[rushCategoryData.activeIndex].id}}' bindtap='change_sub_cate'>默认</view>
- <view class='sub-cate-item {{active_sub_index==index+1?"active":""}}' wx:for="{{rushCategoryData.tabs[rushCategoryData.activeIndex].sub}}" wx:key="{{index}}" data-idx="{{index+1}}" data-id='{{item.id}}' bindtap='change_sub_cate'>{{item.name}}</view>
- </view>
- <!-- 列表 -->
- <scroll-view scrollWithAnimation scrollY bindscroll="scroll" bindscrolltolower="onReachBottom" bindtouchend="touchend" bindtouchstart="touchstart" class="page-list {{rushCategoryData.tabs[rushCategoryData.activeIndex].sub.length?'pt50':''}}" lowerThreshold="{{200}}" scrollTop="{{resetScrollBarTop}}" style="height:{{scrollViewHeight}}px"
- upperThreshold="{{50}}">
- <view class="scroll-col-tip-top">
- <!-- <span wx:if="{{isFirstCategory}}">已经拉到最顶部啦~</span>
- <block wx:else>
- <span>到顶了,看看别的分类吧~</span>
- </block> -->
- </view>
- <view style="min-height: {{scrollViewHeight+50}}px;">
- <block wx:if="{{!pageEmpty}}">
- <i-type-item wx:for="{{rushList}}" wx:key="{{item.actId}}" spuItem="{{item}}" reduction="{{reduction}}" stopClick="{{stopClick}}" bind:openSku="openSku" bind:changeCartNum="changeCartNum" changeCarCount="{{changeCarCount}}"/>
- </block>
- <view class="none-rush-list" wx:elif="{{pageEmpty}}">
- <image class="img-block" src="../../images/icon-index-empty.png"></image>
- <view class="h1">暂时没有团购</view>
- <view class="h2">我们正在为您准备更优惠的团购</view>
- </view>
- <view wx:if="{{loadMore}}">
- <i-load-more loading="{{loadMore}}" tip="{{loadText}}"></i-load-more>
- </view>
- <view class="scroll-col-tip-bottom" wx:elif="{{canNext}}">
- <span wx:if="{{isLastCategory}}">看到我的底线了吗~</span>
- <block wx:else>
- <span>到底了,看看别的分类吧~</span>
- </block>
- </view>
- </view>
- </scroll-view>
- </view>
- <i-tabbar currentIdx='1' cartNum='{{cartNum}}' class="tabbar {{isIpx?'pb20':''}}" />
- </view>
- </i-auth>
- <view class="mask" hidden="{{!visible}}"></view>
- <!---规格选择begin-->
- <view bind:cancel="close" class='sku-content' scrollUp="{{true}}" hidden="{{!visible}}">
- <view class="sku-card">
- <view bindtap="closeSku" class="close">
- <image src="../../images/icon-sku-close.png"></image>
- </view>
- <view class="sku-header">
- <i-img defaultImage="../../images/placeholder-refund.png" height="80" iClass="sku-img" loadImage="{{cur_sku_arr.skuImage}}" width="80"></i-img>
- <view class="sku-desc">
- <view class="sku-title">
- <span>{{cur_sku_arr.spuName}}</span>
- </view>
- <view class="sku-price">
- <view class="sale-price">
- ¥
- <span>{{cur_sku_arr.actPrice[0]}}</span>.{{cur_sku_arr.actPrice[1]}}
- </view>
- <view class="market-price">¥{{cur_sku_arr.marketPrice[0]}}.{{cur_sku_arr.marketPrice[1]}}</view>
- </view>
- <view class="sku-switch-on">已选择:{{cur_sku_arr.spec}}</view>
- </view>
- </view>
- <view class="sku-spec" wx:for="{{skuList.list}}" wx:key="{{item.id}}">
- <view class="title">{{item.name}}</view>
- <view class="spec-list">
- <span bindtap="selectSku" class="{{idx==sku[index]['idx']?'on':''}}" data-disabled="{{item.canBuyNum-value<0}}" data-type="{{index}}_{{idx}}_{{value.option_value_id}}_{{value.name}}" wx:for-index="idx" data-idx="{{idx}}" wx:for="{{item.option_value}}"
- wx:for-item="value" wx:key="{{idx}}">{{value.name}}</span>
- </view>
- </view>
- <view class="sku-num-content">
- <view class="title">数量</view>
- <view class="i-class i-input-number i-input-number-size-{{size}}">
- <view bindtap="setNum" data-type="decrease" class="i-input-number-minus {{value<=min?'i-input-number-disabled':''}}">
- <image src="../../images/icon-input-reduce.png"></image>
- </view>
- <input bindblur="handleBlur" bindfocus="handleFocus" class="i-input-number-text {{min>=max?'i-input-number-disabled':''}}" disabled="true" type="number" value="{{sku_val}}"></input>
- <view bindtap="setNum" data-type="add" class="i-input-number-plus {{value>=max?'i-input-number-disabled':''}}">
- <image src="../../images/icon-input-add.png"></image>
- </view>
- </view>
- <view class="msg" wx:if="{{skuList[current].isLimit}}">
- <span wx:if="{{skuList[current].limitMemberNum>-1}}">每人限{{skuList[current].limitMemberNum}}单</span>
- <span wx:if="{{skuList[current].limitOrderNum>-1}}">每单限{{skuList[current].limitOrderNum}}份</span>
- <span></span>
- </view>
- <view class="even-num" wx:elif="{{!skuList[current].isLimit&&skuList[current].canBuyNum-value<=10&&skuList[current].canBuyNum-value>-1}}">还可以购买 {{skuList[current].canBuyNum-value}} 件</view>
- </view>
- <form bindsubmit="gocarfrom" report-submit="true">
- <button formType="submit" class="sku-confirm" disabled='{{cur_sku_arr.stock==0 ? true : false}}'>
- <view>{{cur_sku_arr.stock==0?"已抢光":"确定"}}</view>
- </button>
- </form>
- </view>
- </view>
- <!---规格选择end-->
|