<!--packageH/newDraw/newDrawRecommentReward/newDrawRecommentReward.wxml-->
<view id="recomment_reward">
  <view class="ul">
    <view class="li" wx:for="{{list}}">
      <view class="top-box flex-style">
        <view class="color-text">活动id:{{ item.activity_id }}</view>
        <view>{{ item.created_at }}</view>
      </view>
      <view class="reward-details">
        <view class="reward-details-title">奖励</view>
        <view class="reward-list">
          <rich-text nodes="{{item.content}}"></rich-text>
        </view>
      </view>
      <view class="good-box flex-style" wx:if="{{item.is_identical}}">
        <image src="{{item.goods_thumb}}" alt="" class="good-img" />
        <view class="good-other flex-style">
          <view class="tt flex-style">
            <view class="good-title">{{ item.goods_name }}</view>
          </view>
        </view>
      </view>
      <view class="order-btn">
        <view class="btn" wx:if="{{item.reward_data_id && item.is_used == 0}}" catchtap="confirmBtn" data-item="{{item}}" data-index="{{0}}">填写地址
        </view>
        <view class="btn" wx:if="{{item.reward_data_id && item.is_used == 1&& item.order_id}}" catchtap="confirmBtn" data-item="{{item}}" data-index="{{1}}">查看订单
        </view>
      </view>
    </view>
    <view wx:if="{{list.length == 0}}" class="blank-box">
      <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png" mode='widthFix'></image>
    </view>
  </view>

  <van-popup show="{{showAddrss}}" class="award-information" position="bottom" custom-style="height: 80% ">
    <van-nav-bar title="中奖推荐奖励" right-text="返回" bind:click-right="cloneAdress" />
    <van-cell-group wx:if="{{activityInfo.type == 2 && activityInfo.need_address == 1}}">
      <van-field value="{{ tel }}" label="手机号" placeholder="请输入手机号" border="{{ false }}"
        bind:change="onChangeTel" />
    </van-cell-group>
    <view class="address-box"  wx:else>
      <view class="address-title">收货地址</view>
      <view class="addr" catchtap="getAddress" wx:if="{{Object.keys(activityInfo.address).length != 0}}">
        <icon class="fa fa-map-marker"></icon>
        <view class="address-info">
          <view class="address-namenick">收货人:{{ activityInfo.address.username }} {{ activityInfo.address.mobile }}
          </view>
          <view class="address-shipping">
            {{ activityInfo.address.province }} {{ activityInfo.address.city }} {{ activityInfo.address.district }}
            {{ activityInfo.address.street || "" }} {{ activityInfo.address.address }}
          </view>
        </view>
        <icon class="fa fa-angle-right"></icon>
      </view>
    </view>
    <view class="confirm-address-btn" catchtap="joinActivity">确定</view>
  </van-popup>
  <yz_addressList show="{{showAddress}}" bind:confirm="confirmSelectAddress"></yz_addressList>
</view>