<com_top_nav title="礼包详情"></com_top_nav>
<wxs module="filter" src="../../../../../utils/filter.wxs"></wxs>
<wxs module="m_filter" src="filter.wxs"></wxs>

<view class="box data-v-3a5b7e36" style="background-color:{{default_color?default_color:'#e85f93'}};min-height: 100vh;">
  <view class="box_top data-v-3a5b7e36">
    <image src="{{iurl}}{{monthgiftbag.cover_img}}" class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr" mode="widthFix" 
      data-errorimg="giftImage"></image>
  </view>
  <view class="box_title data-v-3a5b7e36">
    <!-- <view class="top_title data-v-3a5b7e36">
      <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{monthgiftbag.giftTitle}}</text>
      <!-- 这个是分享按钮 -->
      <!-- <view wx:if="{{c_state<2}}" class="xc-share-frame t-c" bindtap="clickShare">
        <view class="iconfont icon-share fs40"></view>
        <view class="fs22 c-7b">分享</view>
      </view> -->
    <!-- </view> -->

    <view class="fs30" style="font-weight: bolder;">{{monthgiftbag.act_name}}</view>
     
    <view class="top_price data-v-3a5b7e36">
      
      <block wx:if="{{monthgiftbag.money_type>0}}">
        ￥<text class="fs46" style="font-weight: bolder;">{{monthgiftbag.lbPrice}}</text>+<text  class="fs46" style="font-weight: bolder;">{{monthgiftbag.payIntegral}}</text> 积分
      </block>
      <block wx:else>
        <block wx:if="{{monthgiftbag.lbPrice>0}}">
          ￥<text  style="font-weight: bolder;" class="fs46 data-v-3a5b7e36">{{monthgiftbag.lbPrice}}</text>
        </block>
        <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}">
          <text class="fs46 data-v-3a5b7e36">/</text>
        </block>
        <block wx:if="{{monthgiftbag.payIntegral>0}}">
          <text style="font-weight: bolder;" class="fs46 data-v-3a5b7e36">{{monthgiftbag.payIntegral}}</text> 积分
        </block>
      </block>
    </view>

    <view class="top_foot data-v-3a5b7e36" wx:if="{{monthgiftbag.oldPrice}}">
      <view class="top_foot_price data-v-3a5b7e36 no_line_x">
        <text class="data-v-3a5b7e36"> {{monthgiftbag.oldPrice?'零售价：':''}}{{monthgiftbag.oldPrice+"元"}}</text>
      </view>
      
    </view>
  </view>
  <view class="box_ware data-v-3a5b7e36">
    <view class="box_ware_title data-v-3a5b7e36">
      <text class="data-v-3a5b7e36">礼包内容</text>
    </view>
    <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="Id">
      <view bindtap="navigateTo" 
        data-url="/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist?isBuy=0&lbId={{item.giftbagid}}&cover_img={{item.cover_img}}&orderSn={{item.receive_ordersn}}&record_list_id={{item.id}}"
        class="box_ware_box data-v-3a5b7e36">
        <view class="box_ware_img data-v-3a5b7e36">

          <image src="{{item.cover_img==''?iurl+'/miniapp/images/giftbag/gift01.png':iurl+item.cover_img}}"
            class="data-v-3a5b7e36" lazy-load="true" binderror="bind_bnerr2"
            data-errorimg="wareCard[{{index}}].cover_img"></image>

        </view>
        <view class="box_ware_item data-v-3a5b7e36">
          <view class="box_ware_item_title data-v-3a5b7e36">
             <view><text class="data-v-3a5b7e36">{{item.lbtitle}}</text></view> 
          
          </view>
          <view  wx:if="item.lbstate>0" class="sw_state_btn flex jc-center ai-center  {{m_filter.lb_type_color(item.lbstate)}}  ">
               {{m_filter.lb_type(item.lbstate)}}
          </view>
          
          <view class="box_ware_item_qty data-v-3a5b7e36 flex">
            <text class="data-v-3a5b7e36 ellipsis-1" style="color:#797979">
              {{"零售价:"+item.oldprice}}
            </text>
            
          </view>

          <view    class="box_ware_code data-v-3a5b7e36 fs34"  >

            <view class="month_btn flex fs26 ai-center jc-center">
               <text>{{item.giftbag_monthnum}} ></text>
            </view>    
          </view>

        </view>
      </view>
    </block>
  </view>


  <view class="foot_box data-v-3a5b7e36">
    <view class="foot_box_title data-v-3a5b7e36">
      <text class="data-v-3a5b7e36">活动说明</text>
    </view>
    <view class="foot_box_remark data-v-3a5b7e36">
      <rich-text nodes="{{monthgiftbag.remark}}" style="word-break:break-all;word-wrap:break-word"></rich-text>
    </view>
  </view>

  <view style="height: 20rpx;"></view>


  <view class="foot_empty data-v-3a5b7e36"></view>
     

</view>
<!-- 引入提示组件 -->
<warn id="warn"></warn>
<my_confirm id="my_confirm"></my_confirm>
<!-- 弹出框扫描 -->
<qr_code id="qc_com"></qr_code>
<!--  制作一个圆球导航  -->
<block wx:if="{{!params || (params && params.is_act !=1)}}">
  <nav_b id="nav_b"></nav_b>
</block>

<canvas canvas-id='share' style='width:750rpx;height:1217rpx;background-color:white;'
  wx:if="{{!canvasHidden}}"></canvas>
<share id="share_button" bind:send="send" bind:cancel="cancel" bind:share_img="saveImageToPhotosAlbum"
  wx:if="{{share_hidden}}"></share>

<view wx:if="{{showPoster}}">
  <view class="mask" catchtap="closePoster"></view>
  <view class="poster-container">
    <view class="poster-wrapper">
      <view class="poster" bindtap="previewPoster">
        <!-- <view class="poster" bindtap="previewImage"> -->
        <image src="{{shareImgPath}}" class="poster-img"></image>
        <view class="btn-close" catchtap="closePoster">
          <text class="iconfont icon-close"></text>
        </view>
      </view>
      <view class="btn-container">
        <!-- <button class="btn-share" open-type="share" bindtap="">微信好友分享</button> -->
        <button class="btn-share" bindtap="savePic">保存到相册</button>
      </view>
    </view>
  </view>
</view>