<view class="container">
  <!-- 拍卖客服 -->
  <LiveCustomer wx:if="{{showLiveCustomer}}" pullUrl="{{live_room_id}}" kid="{{kid}}" online_sum="{{online_sum}}"></LiveCustomer>
  <view class="banner-box">
    <swiper indicator-dots="{{indicatorDots}}" indicator-color="rgba(255,255,255,0.5)" indicator-active-color="#ffffff" autoplay="{{false}}" interval="{{3000}}" duration="{{500}}" circular="{{true}}">
      <block wx:for="{{bannerImg}}" wx:key="{{index}}">
        <swiper-item>
          <block wx:if="{{index == 0 && video_file_id.length > 0}}">
                <video src="{{prodUrl}}web-cp-all/img_pm/img/{{item.img}}" class='slide-image' controls id='myVideo'></video>
          </block>

          <image wx:else src="{{prodUrl}}web-cp-all/img_pm/img/{{item.img}}" class="slide-image" mode="aspectFill"></image>
        </swiper-item>
      </block>
    </swiper>
  </view>
  <view class="goods-state-box">
    <view class="goods-state-title-box" wx-if="{{onlineFlag}}">
      <view class="goods-state-title" id="{{positionFixed?'title-position':''}}" bindtap='onPageScroll'>
        <view class="goods-state-time">
          <text class="goods-time-state" wx:if="{{goodsInfo.bid_opening === '已结束'}}">结束时间</text>
          <text class="goods-time-state" wx:elif="{{goodsInfo.bid_opening === '未开拍'}}">距开始还有</text>
          <text class="goods-time-state" wx:elif="{{goodsInfo.bid_opening === '已开拍'}}">距结束仅剩</text>
          <view class="triangle"></view>
        </view>
        <text class="goods-time-down" style="{{goodsInfo.bid_opening === '已结束'?'font-size:45rpx;line-height:104rpx' : ''}}">{{countDown}}</text>
      </view>
    </view>
    <view class="goods-state-title-box" wx-if="{{!onlineFlag}}">
      <view class="goods-state-title" id="{{positionFixed?'title-position':''}}" bindtap='onPageScroll'>
        <view class="goods-state-time">

          <text class="goods-time-state" wx:if="{{goodsInfo.bid_opening === '已结束'}}">结束时间</text>
          <text class="goods-time-state" wx:elif="{{goodsInfo.bid_opening === '未开拍'}}">距开始还有</text>
          <text class="goods-time-state" wx:elif="{{goodsInfo.bid_opening === '已开拍'}}">拍卖倒计时</text>
          <view class="triangle"></view>
        </view>
        <text class="goods-time-down" style="{{goodsInfo.bid_opening === '已结束'?'font-size:45rpx;line-height:104rpx' : ''}}">{{countDown}}</text>
      </view>
    </view>
    <view class="goods-info">
      <text>{{goodsInfo.item_name}}</text>
      <!-- <button bindtap='' class='btn'>
        <image src="./images/living.gif"></image>
      </button> -->
      <button open-type="share" class='btn'>
        <image src="./images/redpack.gif"></image>
      </button>
    </view>
    <view class="goods-price">
      <text class="goods-state-market" wx:if="{{goodsInfo.bid_opening === '已结束'}}">成交价：</text>
      <text class="goods-state-market" wx:elif="{{goodsInfo.bid_opening === '未开拍'}}">起始价：</text>
      <text class="goods-state-market" wx:elif="{{goodsInfo.bid_opening === '已开拍'}}">当前价：</text>
      <view class="goods-price-state">
        <text class="goods-state-price-text1">{{bidRecord.length === 0?'当前无人出价': '￥'+price_bidder+'元'}}</text>
       
      </view>
      <!-- 设置提醒 -->
      <form class="goods-time-remind" bindsubmit="formSubmit" id="container" bindreset="formReset" report-submit='true' wx-if="{{clock}}">
        <image id='clock' src="../../images/clock.png"></image>
        <button class="goods-collect" type="warn" form-type='submit' catchtap='childClick' hover-stop-propagation='true'>
          设置提醒
        </button>
      </form>
    </view>
    <view class="goods-takePartIn">
      <text style="border-right:1px solid #999;padding-left:0">{{submit_count}}人报名</text>
      <text>{{circusee_num}}人围观</text>
      <view class="serial-num" wx:if="{{serial_number && goodsInfo.bid_opening !== '未开拍'}}">
        <text>您的竞买号是：</text>
        <text style="color:#e22;font-weight:600;">{{serial_number}}</text>
      </view>
    </view>
    <view class="auctioneer">
      <navigator url="" hover-class="none">
        <view class="auctioneer-img">
          <image src="{{user_hader}}"></image>
        </view>
        <view class="auctioneer-info">
          <view class="auctioneer-name">
            <text>商铺：{{goodsInfo.name}}</text>
            <text class="sign">已认证</text>
          </view>
        </view>
        
        <!-- <view class="follow">
          <image wx:if="{{imgsrc}}" src="../../images/followdy.png" catchtap='onFollow' data-src="{{imgsrc}}"></image>
          <image wx:else src="../../images/follow.png" catchtap='onFollow' data-src="{{imgsrc}}"></image>
        </view> -->
      </navigator>
    </view>
    <!-- <view class="goods-news">
      <image src="images/news.png"></image>
      <view>
        <text style="color:#fb752c">用户134****3828</text>
        <text>以</text>
        <text style="color:#fb752c">￥8.5</text>
        
      </view>
    </view> -->
  </view>
  <view class="guild-box">
    <view class="guild-title">
      <image src="./images/auction.png"></image>
      <text>竞买信息</text>
    </view>
    <view class="guild-content">
      <view class="guild-promise">
        <view>
          <image src="./images/icon-1.png"></image>
          <text>零风险</text>
        </view>
        <view>
          <image src="./images/icon-1.png"></image>
          <text>正品承诺</text>
        </view>
        <view>
          <image src="./images/icon-1.png"></image>
          <text>极速发货</text>
        </view>
        <view>
          <image src="./images/icon-1.png"></image>
          <text>公平公正</text>
        </view>
      </view>
      <view class="guild-auction-info">
        <view class="info-left-box">
          <view class="info-left-lines">
            <text class="info-key">起始价</text>
            <text wx-if="{{onlineFlag}}"  class="info-val">￥{{goodsInfo.price_start}}元</text>
             <text wx-if="{{!onlineFlag}}" class="goods-state-price-text1">{{goodsInfo.price_start== 0?"保密": '￥'+goodsInfo.price_start+'元'}}</text>
          </view>
          <!-- <view class="info-left-lines">
            <text class="info-key">保证金</text>
            <text class="info-val">￥{{goodsInfo.price_guarantee}}元</text>
          </view> -->
          <view class="info-right-lines" wx-if="{{!onlineFlag}}">
            <text class="info-key">保留价</text>
            <!-- <text class="info-val">￥{{goodsInfo.price_retain <= 0 ? '无':goodsInfo.price_retain}}元</text> -->
            <text class="info-val">保密</text>
          </view>
        </view>
        <view class="info-right-box">
          <view class="info-right-lines">
            <text class="info-key">加价幅度</text>
            <text class="info-val">￥{{goodsInfo.price_add}}元</text>
          </view>
          <view class="info-right-lines">
            <text class="info-key">延时周期</text>
            <text class="info-val" wx-if="{{onlineFlag}}">{{goodsInfo.update_interval/60}}分钟/次</text>
            <text class="info-val" wx-if="{{!onlineFlag}}">180秒/次</text>
          </view>
          <!-- <view class="info-right-lines">
            <text class="info-key">保留价</text>
            <text class="info-val">￥{{goodsInfo.price_retain <= 0 ? '无':goodsInfo.price_retain}}元</text>
          </view> -->
        </view>
      </view>
    </view>
  </view>
  <view class="bidrecord-box"  bindtap='getRecordlist'>
    <navigator  src="" hover-stay-time="10" url="pages/recordlist/recordlist">
      <image src="../../images/record.png"></image>
      <text>出价记录</text>
      <image class="arrow" src="../../images/arrow.png"></image>
    </navigator>
    <view class="lines-box">
      <view wx:if="{{bidRecord.length <= 0}}" class="lines-box-tips">
        <text>暂无出价记录</text>
      </view>
      <view class="lines {{(index == 0)?'textColor':''}}" wx:for="{{bidRecord}}" wx:key="{{index}}">
        <image src="../../images/user.png"></image>
        <text>竞买号：{{item.code}}</text>
        <text wx:if="{{index == 0}}">领先</text>
        <text wx:else>出局</text>
        <text>{{item.created}}</text>
        <text class="price">￥{{item.price_bidder}}</text>
      </view>
    </view>
  </view>
  <view class="share-box">
    <view class="share-tab">
      <view class="share-tab-left {{(item.select == tabIndex?'textstyle':'')}}" bindtap='onLoadTemplate' wx:for="{{tabData}}" wx:key="{{index}}" data-index="{{index}}" data-templateName="{{item.templateName}}" >
        <text>{{item.tabText}}</text>
      </view>
    </view>
    <view class="share-content">
      <import src="template/template.wxml"></import>
      <template is="{{templateName}}" data="{{pageData,parameter,prodUrl,bid_content}}"></template>
    </view>
  </view>
  <view class="bidders-btn" wx:if="{{seller}}">
    <view wx:if="{{item_submit && goodsInfo.bid_opening === '已开拍'}}" class="bidon">
      <view class="offer-count">
        <text class="offer-count-left">当前价格￥{{price_bidder}}元</text>
        <text class="offer-count-right">加价幅度￥{{goodsInfo.price_add}}</text>
      </view>
      <view class="bid">
        <button class="reduce" bindtap='reducePrice'>-</button>
        <input bindfocus="bidFocus" class="bid-input" value="￥{{new_price_bidder}}" type="digit" bindblur="getBidder"></input>
        <button class="increase" bindtap='reduceIncrease'>+</button>
      </view>
      <view class="sub-price">
        <button bindtap='bid' disabled='{{subPricFlag}}'>出价</button>
      </view>
    </view>
    <view wx:elif="{{item_submit && goodsInfo.bid_opening === '未开拍'}}" class="not-auction">
      <text>您已支付保证金，请等待开始！</text>
    </view>
    <view wx:elif="{{goodsInfo.bid_opening === '已结束'}}" class="end">
      <text>竞买已结束</text>
    </view>
    <view wx:elif="{{is_sign&&!is_pay}}" class="end">
      <text>已报名，请线下支付并等待审核</text>
    </view>
    <navigator bindtap='navPayPage' url=""  hover-stay-time="10" wx:elif="{{!item_submit && goodsInfo.bid_opening !== '已结束'}}">
      <text>交保证金报名</text>
    </navigator>
  </view>
</view>

<!-- 分享进入返回首页 -->
<image wx-if="{{isshare === 'true'}}" bindtap='backHome' class='d-back-home' src='./images/home.png' lazy-load></image>
<!-- 恭喜中拍 -->
<view class="mask" wx:if="{{mask}}">
  <view>
    <image src='images/win.png'></image>
    <button bindtap='gopay' wx-if="{{onlineFlag}}">立即付款</button>
    <button bindtap='gopayOffline' wx-if="{{!onlineFlag}}">立即付款</button>
  </view>
</view>
<!-- 红包弹窗 -->
<view class='red-packet' wx:if="{{is_first}}">
  <view class="close" bindtap='closeRedPacket'><icon type="clear" color="#fff"/></view>
  <image src='/images/red.png'></image>
  <view class="text">
    <text>5元“新人红包”</text>
  </view>
  <view class="btn">
    <button class="lj" bindtap='getRedPacket'>立即领取</button>
    <button class="hb" bindtap='navRedPacket'>我的红包</button>
  </view>
</view>