<!--packageE/lottery/lottery.wxml-->
<view class="component-wrapper {{'component-'+ component_id}}" wx:if="{{datas.lottery && datas.lottery.name}}">
  <view class="lottery-box" style="background-color: {{datas.preview_color.color}}; background-image: url({{datas.preview_color.isColor == 2? datas.preview_color.image || emptyImage: ''}});background-size: 100% 100%;background-position: center;background-repeat: no-repeat;">

    <view class="title" style="font-size: 16px; color: {{datas.font_color}};" wx:if="{{datas.lottery && datas.lottery.name}}">抽奖活动: {{datas.lottery.name}}</view>

    <view class="priceChanceBtn">
      您有{{remainingTimes}}次抽奖机会
    </view>

    <view class="box">
      <view class="div {{true?(index==5?'prizeBtn1':(index==6?'prizeBtn2':(index==9?'prizeBtn3':(index==10?'prizeBtn4':'')))):''}}"
            wx:for="{{prizeList}}" wx:for-index="index" wx:for-item="imgLi" style="{{'background-image:url('+(imgLi.bgSrc?imgLi.bgSrc:'')+');'}} {{true?(index==5?'background-image:url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/lottery/01.png);':(index==6?'background-image: url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/lottery/02.png);':(index==9?'background-image:url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/lottery/03.png);':(index==10?'background-image: url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/lottery/04.png);':'')))):''}} {{(index!=5&&index!=6&&index!=9&&index!=10)?(index==arrNum[prizeIndex]?'background-image: url(https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/lottery/select.png);':''):''}}"
            wx:key="index">
        <view class="img">
          <image class="prizeInfoBtnImg" src="{{imgLi.thumb_url}}" wx:if="{{imgLi.thumb_url}}" mode='widthFix' />
        </view>
        <view class="span title" wx:if="{{index !== 5 && index !== 6 && index !== 9 && index !== 10}}">{{imgLi.prize}}</view>
      </view>
      <view class="section turn" catchtap="prizeZhuan">
        <view class="span text" wx:if="{{startStatus === 1}}">
          立即抽奖
        </view>
        <view class="span text" wx:elif="{{startStatus === 2}}">
          活动已结束
        </view>
        <view class="span text" wx:else>
          活动未开始
        </view>
      </view>
    </view>

    <view class="point" style="font-size: {{datas.font_size}}px; color: {{datas.font_color}};" wx:if="{{activityModel.draw_type!=0}}">{{activityModel.draw_type==1 ? '我的'+datas.list.point_word : '我的'+datas.list.love_word}} ：{{ activityModel.draw_type==1 ? (datas.list.point? datas.list.point.credit1: 0) : usable || 0 }}</view>
    <view class="reword" style="font-size: {{datas.class_font_size}}px; color: {{datas.class_font_color}};border-radius: {{datas.class_border_radius}}px;background-color: {{datas.class_bg_color}};" catchtap="toUrl">我的中奖纪录</view>

  </view>
</view>
<van-popup
  show="{{ show }}"
  z-index="101"
  position="right" custom-style="height: 100%" close-on-click-overlay="true" 
>
 <view class="van-content">
      <view style="height:2rem;display:flex;justify-content:center;align-items:center;">选择商品</view>
      <view style="font-size:32rpx;position:absolute;top:16rpx;right:32rpx;" bindtap="closePop">X</view>
      <van-radio-group value="{{radio}}"   wx:for="{{goods}}"  :key="index" bind:change="onChange">
              <van-radio  name="{{item.id}}" class="radio" checked-color="#f15353" >
                  <view style="display:flex;align-items:center;">
                    <view class="avatar">
                    <image src="{{item.thumb}}"></image>
                    </view>
                    <view style="margin-left:32rpx;">{{item.title}}</view>
                  </view>
                </van-radio>
      </van-radio-group>
      <view class="button" bindtap="confirmGoods">
        确定
      </view>
    </view>
</van-popup>