<!--pages/extendProduct/extendProduct.wxml-->

<view class='page-extend-product'>
	<view class="swiper-tab">
		<view class="swiper-tab-item {{currentTab==0 ? 'active' : ''}}" data-current="0" bindtap="clickTab">
			推广商品
			<view class="line" wx-if="{{currentTab==0}}" />
		</view>
		<view class="swiper-tab-item {{currentTab==1 ? 'active' : ''}}" data-current="1" bindtap="clickTab">我的分享
			<view class="line" wx-if="{{currentTab==1}}" />
		</view>
	</view>

	<!-- <swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
			<swiper-item > -->
	<scroll-view scroll-y wx:if="{{currentTab==0}}">
		<view class="extend-img">
			<image mode="widthFix" src="{{extendProBanner ? extendProBanner : '/assets/imgs/7_1_0/coming-soon.jpg'}}" />
		</view>
		<view class="pro-nav-wrap">
			<view class="nav-list">
				<!-- <view class="nav-item nav-active">推荐</view>
            <view class="nav-item">最新</view>
            <view class="nav-item">最热</view>
            <view class="nav-item">价格</view> -->
			</view>
			<view class="select-radio all-radio" bindtap="allSelect">
				<text class="all" >全选</text>
				<view class="{{isAllSelect ? 'theme-color' : ''}} circle-radio ">
					<image
					 wx:if="{{isAllSelect}}"
					 class="tick-success"
					 src="/assets/imgs/7_1_0/tick-success.png"
					 mode="widthFix"
					/>
				</view>

			</view>
		</view>
		<view class="buy-product-wrap">
			<view class="buy-product-content">
				<view class="buy-list" wx:if="{{extendProList.length}}" wx:for="{{extendProList}}" wx:key="{{index}}">
					<view class="prod-img">
						<image src="{{item.productImgUrl}}" />
					</view>
					<view class="prod-info">
						<view class="prod-name">{{item.productName}}</view>
						<!-- <view class="hongbao">
                    <button class="btn btn-primary">预计赚5元红包</button>
                  </view> -->
						<view class="benefit-info">
							<view class="benefit-point" wx:if="{{item.point}}">
								<image src="/assets/imgs/7_1_0/integral-icon.png" class="integral-icon" mode="widthFix" />
								<text class="benefit-num">{{item.point}}</text>
							</view>
							<view class="coupon-title">
								<image src="/assets/imgs/7_1_0/rmb.png" class="coupon-icon" mode="widthFix"  wx:if="{{item.shareBonuses && item.shareBonuses.length > 0}}" />
								<block
								 wx:for="{{item.shareBonuses}}"
								 wx:for-item="shareItem"
								 wx:for-index="idx"
								 wx:key="{{idx}}"
								>
									<text class="benefit-num" >{{shareItem.couponSettingTitle}}</text>
								</block>
							</view>
						</view>
					</view>
					<view class="select-radio pro-radio" catchtap="selectPro" data-index="{{index}}">
						<view class="{{item.isSelect ? 'theme-color' : ''}} circle-radio">
							<image
							 wx:if="{{item.isSelect}}"
							 class="tick-success"
							 src="/assets/imgs/7_1_0/tick-success.png"
							 mode="widthFix"
							/>
						</view>
					</view>
				</view>

			</view>
		</view>
		<!-- <view class="share-wrap" wx:if="{{extendProList.length}}"> -->
	
		<!-- <view class="df no-list" wx:if="{{!extendProList.length}}">
			暂无推广商品
		</view> -->
	</scroll-view>
  <view class="share-wrap" wx:if="{{currentTab==0}}">
    <view class="share-button" bindtap="onTapShare">
      <image mode="widthFix" src="/assets/imgs/7_1_0/quick-share-black.jpg" />
      <text>快速分享</text>
    </view>
    <view class="share-button" bindtap="onTapPoster">
      <image mode="widthFix" src="/assets/imgs/7_1_0/poster-black.jpg"/>
      <text>生成海报</text>
    </view>
  </view>
	<!-- </swiper-item>
      <swiper-item> -->
	<scroll-view scroll-y wx:if="{{currentTab==1}}">
		<view class="release-num weui-flex df-j--bt">
			<view class="num-invite df-1 border_box">
				<view class="share-number">{{myShareCount.totalCount || 0}}</view>
				<view class="share-title">当前分享订单</view>
			</view>
			<view class="extension-line" />
			<view class="num-invite-yesterday df-1 border_box">
				<view class="share-number">{{myShareCount.yesterdayCount || 0}}</view>
				<view class="share-title">昨日新增分享订单</view>
			</view>
		</view>
		<view class="order-content">
			<view
			 class="order-list"
			 wx:for="{{myExtendList}}"
			 wx:key="{{index}}"
			 wx:for-item="extendItem"
      
			>
        <navigator url="/subPackage/page/pages/orderBenefit/orderBenefit?id={{extendItem.tentacleContent.id}}" hover-class="none">
          <view class="order-header">
            <view class="order-number">
              <text>{{extendItem.tentacleContent.createTime}}</text>
            </view>
            <text class="order-status">查看收益</text>
          </view>
          <view class="pro-list" wx:if="{{extendItem.tentacleContent.contentArr}}" >
            <image class="pro-img"  wx:for="{{extendItem.tentacleContent.contentArr}}" wx:for-item="contentItem" wx:key="{{index}}"  wx:if="{{index<4}}"  src="{{contentItem.url}}" />
            <!-- <image class="pro-img" />
            <image class="pro-img" />
            <image class="pro-img" /> -->
            <text class="pro-img-dot" wx:if="{{extendItem.tentacleContent.contentArr.length > 4}}">...</text>
          </view>
          <view class="pro-list" wx:if="{{!extendItem.tentacleContent.contentArr}}">
            
            <!-- <image class="pro-img" />
            <image class="pro-img" />
            <image class="pro-img" /> -->
            <text class="pro-img-dot">{{extendItem.tentacleContent.content}}</text>
          </view>
          <view class="pro-number">
            <text class="total-pro">促成订单 <text class="help-order">{{extendItem.orders || 0}}</text> 笔
            </text>
          </view>
        </navigator>
			</view>
		</view>
		<view class="loading-complete">已经到底啦！</view>
	</scroll-view>
	<!-- </swiper-item>
	</swiper> -->
</view>
<share-modal show="{{showShareModal}}" />
<card-modal
 show-card-modal="{{showCardModal}}"
 card-title="{{cardTitle}}"
 card-url="{{cardUrl}}"
 page-path="{{pagePath}}"
 scene="{{scene}}"
/>
<share-poster id="getPoster" bindmyevent="myEventListener" avater="{{cardUrl}}"  productDesc="{{cardTitle}}" userAvatar="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg" bind:showMiniCard="_showMiniCard" pagePath="{{pagePath}}" code-img="{{codeImg}}"></share-poster>
<!--goHome-->
<go-home/>

