<com_top_nav title="礼包详情"></com_top_nav>
<wxs module="filter" src="../../../../../utils/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="flex ai_c fs28" style="margin-bottom: 20rpx"  wx:if="{{isBuy==0 && pick_up}}">
      <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>{{pick_up.pickup_name}}
    </view>

    <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="top_time data-v-3a5b7e36" wx:if="{{!flag}}">
		  <block wx:if="{{isBuy==1 && giftTitle && isStart!=1}}" >
		     <text class="data-v-3a5b7e36">
		        {{"活动开始时间："+giftStart}}
		     </text>
		  </block>

		  <block wx:else>
		    <text class="data-v-3a5b7e36" wx:if="{{isBuy==0 && iswarelbtype}}">{{"兑换结束时间："+giftDate}}</text>
		    <text class="data-v-3a5b7e36" wx:if="{{flag == 1}}">
		        {{"活动结束时间："+giftDate}}
		    </text>
		  </block>
		</view>
    <view class="top_time data-v-3a5b7e36" wx:if="{{flag == 1 && iswarelbtype}}">
			<text class="data-v-3a5b7e36" wx:if="{{exchangeType == 1}}">
			   {{"兑换时间：领取后"+exchangeDay+"天内兑换"}}
			</text>
			<text class="data-v-3a5b7e36" wx:elif="{{exchangeType == 2}}">
			   {{"兑换时间："+exchangeStartTime+"至"+exchangeEndTime}}
			</text>
    </view> -->
		
    <view class="top_price data-v-3a5b7e36">

        <block wx:if="{{monthgiftbag.money_type>0}}">
            {{"￥"+monthgiftbag.lbPrice}}+{{monthgiftbag.payIntegral+"积分"}}
        </block>
        <block wx:else>
            <block wx:if="{{monthgiftbag.lbPrice>0}}">
                <text class="data-v-3a5b7e36">{{"￥"+monthgiftbag.lbPrice}}</text>
            </block>
            <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}">
                <text class="data-v-3a5b7e36">/</text>
            </block>
            <block wx:if="{{monthgiftbag.payIntegral>0}}">
                <text class="data-v-3a5b7e36">{{monthgiftbag.payIntegral+"积分"}}</text>
            </block>
        </block>

      <!-- <block wx:if="{{giftType>0}}">
        <text class="data-v-3a5b7e36">{{actTitle}}</text>
      </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 class="top_foot_qty data-v-3a5b7e36">
        <text class="data-v-3a5b7e36" wx:if="{{!flag}}">{{"已售:"+giftQty+"件"}}</text>
				<text class="data-v-3a5b7e36" wx:elif="{{flag == 1 && giftQty > 0}}">{{"数量:"+giftQty+"件"}}</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" >
          <view bindtap="navigateTo"
                data-url="/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist?only_show=1&lbId={{item.giftbagid}}&cover_img={{item.cover_img}}"
                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}}" style="height: 150rpx; width: 150rpx;"
                         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 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>第{{index+1}}个月 ></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 class="foot_empty data-v-3a5b7e36"></view>
		
	<block wx:if="{{flag != 1 && (params && !params.is_act)}}">
		<block wx:if="{{getUserID && monthgiftbag.giftTitle}}">
		  <block wx:if="{{isStart==1}}">
		    <view class="foot_button data-v-3a5b7e36">

              <block wx:if="{{monthgiftbag.money_type>0}}">
                  <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_left data-v-3a5b7e36" data-money="{{monthgiftbag.lbPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice">
                      <text class="data-v-3a5b7e36  ">立即购买</text>
                  </view>
              </block>
              <block wx:else>
                  <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral>0}}">
                      <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_left data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" data-id="{{lbId}}" bindtap="GetBuyPrice">
                          <text class="data-v-3a5b7e36  ">立即购买</text>
                      </view>
                      <view class="foot_button_right data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}">
                          <text class="data-v-3a5b7e36">立即兑换</text>
                      </view>
                  </block>
                  <block wx:if="{{monthgiftbag.lbPrice>0 && monthgiftbag.payIntegral<=0}}">
                      <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_buy data-v-3a5b7e36 " data-money="{{monthgiftbag.lbPrice}}" bindtap="GetBuyPrice" data-id="{{lbId}}">
                          <text class="data-v-3a5b7e36">立即购买</text>
                      </view>
                  </block>
                  <block wx:if="{{monthgiftbag.lbPrice<=0 && monthgiftbag.payIntegral>0}}">
                      <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_intalge data-v-3a5b7e36 " bindtap="GetBuyIntegral" data-id="{{lbId}}">
                          <text class="data-v-3a5b7e36">立即兑换</text>
                      </view>
                  </block>
                  <block wx:if="{{monthgiftbag.lbPrice<=0 && monthgiftbag.payIntegral<=0}}">
                      <view style="{{scene==1154 ? 'background:#b9b5b5':''}}" class="foot_button_buy data-v-3a5b7e36 " bindtap="GetFree" data-id="{{lbId}}">
                          <text class="data-v-3a5b7e36">免费领取</text>
                      </view>
                  </block>
              </block>

		    </view>
		  </block>
		  <block wx:else>
		    <view class="foot_button data-v-3a5b7e36">
		    <view class="foot_button_intalge data-v-3a5b7e36 gray ">
		        <text class="data-v-3a5b7e36">活动还未开始</text>
		    </view>
		    </view>
		  </block>
		
		</block>
    <block wx:else>
      <view class="foot_button data-v-3a5b7e36">
		        <view style="{{ 'background:#b9b5b5'}}" class="foot_button_left data-v-3a5b7e36 " catchtap="logTab" data-money="{{monthgiftbag.lbPrice}}" data-id="{{lbId}}" >
		          <text class="data-v-3a5b7e36  ">请先登录</text>
		        </view>
		    </view>
    </block>
		<!-- <block wx:if="{{isBuy==0}}">
		  <view class="foot_button data-v-3a5b7e36">
		    <block wx:if="{{is_lb!=1}}">
		      <view class="foot_button_buy data-v-3a5b7e36 overdue"  wx:if="{{!getUserID && scene==1154}}">
		        <text class="data-v-3a5b7e36">请先登录</text>
		      </view>
		    </block>
		    <block wx:else>
          <view wx:if="{{c_state==-1}}" class="foot_button_buy data-v-3a5b7e36 overdue" >
		        <text class="data-v-3a5b7e36">兑换未开始</text>
		      </view>
		      <view wx:if="{{c_state==0}}" class="foot_button_buy data-v-3a5b7e36" bindtap="getcode">
		        <text class="data-v-3a5b7e36">立即使用</text>
		      </view>
		      <view wx:if="{{c_state==1}}" class="foot_button_buy data-v-3a5b7e36 overdue" bindtap="getcode">
		        <text class="data-v-3a5b7e36">商品已核销</text>
		      </view>
		      <view wx:if="{{c_state==2}}" class="foot_button_buy data-v-3a5b7e36 overdue">
		        <text class="data-v-3a5b7e36">商品兑换时间已过</text>
		      </view>
		    </block>
		  </view>
		</block> -->
	</block>
  
</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>

<include src="../public/buy_com.wxml"></include>
<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>