<import src="../../../wxParse/wxParse.wxml" />
<!-- bindtouchmove="touchMove" bindtouchend='touchEnd' bindtouchstart='touchStart' -->
<view class="goodsdetail">
  <!-- 顶部导航 -->
  <view class="showicon {{hoet?'hoet':''}}">
    <view></view>
    <view class="show_b" wx:if="{{hoet}}">
      <view class="{{current == 1?'curr':''}}" id="1" bindtap="getTap">{{goodsType == 'reserve_simple_goods' ? '服务' : '商品'}}</view>
      <view class="{{current == 2?'curr':''}}" id="2" bindtap="getTap">评论</view>
      <view class="{{current == 3?'curr':''}}" id="3" bindtap="getTap">详情</view>
      <!--<view wx:if="{{roomdataBol&&roomdata.length>0}}" class="{{current == 4?'curr':''}}" id="4" bindtap="getTap">直播-->
      <!--</view>-->
    </view>
    <view class="cart">
      <view class="back" wx:if="{{goodsType == 'hotelGoods' || goodsType == 'group_goods' || goodsType == 'zhpGroup' || goodsType == 'reserve_simple_goods'}}" catchtap="gotoindex">
        <icon class="iconfont icon-ai-home"></icon>
      </view>
    </view>
    <view class="member" catchtap="gotoMember" wx:if="{{(goodsType == 'group_goods'|| goodsType == 'groupwork' || goodsType == 'reserve_simple_goods' || !activityid) && is_member_enter}}">
      <view class="back">
        <icon class="iconfont icon-wode-wode"></icon>
      </view>
    </view>
  </view>
  <!-- 顶部导航 end -->

  <!-- 新抽奖悬浮按钮 -->
  <view class="luck-draw-btn" wx:if="{{luck_draw&&luck_draw.number>0}}">
    <image class="luck-draw-btn-img" src="{{luck_draw.luck_img_url}}" alt="" catchtap="gotoLuckDraw" />
  </view>
  <!-- 新抽奖悬浮按钮 end -->

  <!-- 轮播 -->
  <goodSwipe goodsInfo="{{goodsInfo}}" broadcast_data="{{broadcast_data}}" is_goodsType="{{goodsType}}"></goodSwipe>
  <!-- 轮播end -->

  <!-- 限时购  start
    @goodsInfo  详情数据
    @goodsType  商品类型
    @popPrice  默认价格
    @group_price  拼团价格
    @isendTime  有拼团结束时间
    @end_time  拼团结束时间
    @start_time  拼团开始时间
    @gooddatas  拼团数据
    @isTimeEnd 抢团活动是否结束
    @leader_partake 抢团团长是否有参加
    @leader_not_join_invalid 为1时不显示“不参与抢团”按钮
  -->
  <timeLimit goodsInfo="{{goodsInfo}}" goodsType="{{goodsType}}" popPrice="{{popPrice}}" group_price="{{group_price}}"
             isendTime='{{isendTime}}' end_time="{{end_time}}" start_time="{{start_time}}"
             gooddatas="{{gooddatas}}" isTimeEnd="{{isTimeEnd}}" leader_partake="{{leader_partake}}" leader_not_join_invalid="{{leader_not_join_invalid}}"></timeLimit>
  <!-- 限时购 end -->

  <!-- 价格，标题，库存，销量 开通会员
    @gooddatas  详情数据
    @enterAt  酒店入住时间
    @isBuy  限时购开关
    @isBegTime  限时购据开始时间开关
    @goods_plugin  插件数据
    @prop_goods_info  父组件数据
    @isRent  是否是租赁商品
    @activityid  拼团活动id
    @goodsType  商品类型
    @openShare  分享弹窗事件
    @postShow 海报弹窗事件
  -->
  <priceTitleRepertorySales gooddatas="{{gooddatas}}" favorite="{{favorite}}" enterAt="{{enterAt}}" isBuy="{{isBuy}}" isBegTime="{{isBegTime}}"
                            plugin="{{goods_plugin}}" prop_goods_info="{{prop_goods_info}}" isRent="{{isRent}}"
                            activityid="{{activityid}}" goodsType="{{goodsType}}" bind:tapPostShow="postShow" bind:onFavorite="onFavorite" bindtapOpenShare="openShare" fromStock="{{fromStock}}">
  </priceTitleRepertorySales>
  <!-- 价格，标题，库存，销量end -->

  <!--珍惠拼-->
  <zhplist wx:if="{{goodsType == 'zhpGroup'}}" gooddatas="{{gooddatas}}" ></zhplist>

  <!-- 分时预约 -->
  <timeAppointment wx:if="{{goodsType == 'reserve_simple_goods'}}" goodsInfo="{{goodsInfo}}" goods_plugin="{{goods_plugin}}"></timeAppointment>

  <group-work wx:if="{{goodsType=='groupwork'&&gooddatas}}" gooddatas="{{gooddatas}}"></group-work>

  <!-- 引导加群 -->
  <!--<view class="guide" wx:if="{{get_guidepage_info && get_guidepage_info.status==1}}">-->
    <!--<view class="guideLeft">-->
      <!--<view class="left">-->
        <!--<view class="img">-->
          <!--<image src="{{get_guidepage_info.thumb}}" mode='widthFix' />-->
        <!--</view>-->
      <!--</view>-->
      <!--<view class="right">-->
        <!--<veiw class="name"-->
              <!--style="{{'color:'+(get_guidepage_info.title.color?get_guidepage_info.title.color:'#333')+';'}} {{'font-size:'+(get_guidepage_info.title.size?get_guidepage_info.title.size:'14px')+';'}}">-->
          <!--{{get_guidepage_info.title.title}}</veiw>-->
        <!--<view class="describe"-->
              <!--style="{{'color:'+(get_guidepage_info.sidehead.color?get_guidepage_info.sidehead.color:'#333')+';'}} {{'font-size:'+(get_guidepage_info.sidehead.size?get_guidepage_info.sidehead.size:'14px')+';'}}">-->
          <!--{{get_guidepage_info.sidehead.sidehead}}</view>-->
      <!--</view>-->
    <!--</view>-->
    <!--<view class="guideRight"-->
          <!--style="{{'background-color:'+(get_guidepage_info.button?get_guidepage_info.button:'#02c777')+';'}}"-->
          <!--catchtap="appendBtn">-->
      <!--添加-->
    <!--</view>-->
  <!--</view>-->
  <!-- 引导加群end -->

  <!-- 活动 自购省 服务标签 一口价 应用市场
    @fight_groups  拼团的商品id
    @activityId  拼团活动id
    @store_id  拼团门店id
    @end_time_team 队伍时间
    @goodsType 商品类型
    @is_o2o 是否门店拼团
    @goods_info 详情数据

  -->
  <selfParameterServicetag id="Tag" team="{{team}}" gooddatas="{{gooddatas}}" wx:if="{{goodsType!='hotelGoods'}}" fight_groups="{{fight_groups}}"
                           activityId="{{activityid}}" store_id="{{store_id}}" end_time_team="{{end_time_team}}" goodsType="{{goodsType}}"
                           is_o2o="{{is_o2o}}" goods_info="{{goods_info}}"  bind:showCanSelf="showCan" bind:showPop="selfShowPop" bindcontorBuyNow_good="contorBuyNow">
  </selfParameterServicetag>
  <!-- 活动 自购省 服务标签end  -->

  <!--群活码-->
  <view class="group-code panel" wx:if="{{goods_plugin.group_code && goods_plugin.group_code.goods_entrance == 1}}">
    <view class="group-code-face" wx:if="{{goods_plugin.group_code.code_logo}}">
      <image src="{{goods_plugin.group_code.code_logo}}" alt="" />
    </view>
    <view class="group-code-content">
      <view class="group-code-name">{{goods_plugin.group_code.code_title}}邀请您添加专属福利群！</view>
      <view class="group-code-desc">{{goods_plugin.group_code.citation_copy}}</view>
    </view>
    <view class="group-code-button" catchtap="toGroupCode">去加群</view>
  </view>

  <!-- 项目核销 -->
  <project-card-module wx:if="{{ goodsType==='store_projects_goods' }}" goodsId="{{ goodsId }}" />

  <!-- 运费说明 Start -->
  <view class="freightPricing" wx:if="{{JSON.stringify(freight_pricing) != '{}'&&freight_pricing.is_explain==1}}">
    <view class="title">{{ freight_pricing.freight_name }}</view>
    <view class="freightPricing_main {{isfold ? 'unfold' : 'fold'}}" style="height:{{freightPricing_main_heigth}}rpx">
      <block wx:if="{{Shipping.nodes}}">
        <view class="freightPricing_main_heigth">
          <template is="wxParse" data="{{wxParseData:Shipping.nodes}}" />
        </view>
      </block>
      <view style="padding:0 20rpx;" wx:else>
        <rich-text nodes="{{first_content}}" class="freightPricing_main_heigth"></rich-text>
      </view>
      <!-- <rich-text nodes="{{freight_pricing.content}}" ></rich-text> -->
    </view>
    <view class="freightPricing_btn {{isfold ? 'unfold' : 'fold'}}" catchtap="changeFold">
      {{ isfold ? '收起' : '展开' }}
      <view class="rotate_box">
        <icon class="iconfont icon-member-bottom"></icon>
      </view>
    </view>
  </view>
  <!-- 运费说明 end -->

  <!-- 预约商品 start-->
  <appointment goodsId="{{goodsId}}" wx:if="{{goodsType == 'appointment_goods'}}"></appointment>
  <!-- 预约商品  end -->

  <!-- 厂家管理 -->
  <producer producer_info="{{producer_info}}"></producer>
  <!-- 厂家管理 -->

  <!-- 微帖 -->
  <invitationAndLive prop_goods_info="{{prop_goods_info}}" min_micro="{{min_micro}}" tabList="{{tabList}}" roomdata="{{roomdata}}"></invitationAndLive>
  <!-- 微帖 -->

  <!-- 品牌 -->
  <view class="brandBox" wx:if="{{goodsInfo.has_one_brand}}">
    <view class="brand"  data-brandval="{{goodsInfo.has_one_brand.id}}"
          bindtap="toBrandDetail">
      <view class="logo">
        <image src="{{goodsInfo.has_one_brand.logo}}"></image>
        <view class="logoText">{{goodsInfo.has_one_brand.name}}</view>
        <view class="intro">品牌介绍</view>
      </view>
    </view>
  </view>
  <!-- 品牌end -->

  <!-- 精选口碑 -->
  <comment class="sift" goodsInfo="{{goodsInfo}}" goodsId="{{goodsId}}" commentPage="{{commentPage}}" ></comment>
  <!-- 精选口碑 -->

  <!-- 猜你喜欢 -->
  <guessLike goodsInfo="{{goodsInfo}}" activityid="{{activityid}}"></guessLike>
  <!-- 猜你喜欢end -->

  <!-- 供应商 -->
  <supplierModel goodsInfo="{{goodsInfo}}"  wx:if="{{goodsType == 'supplierGoods'}}"></supplierModel>
  <!-- 供应商end -->

  <!--商品参数-->
  <view class="goods-param panel" wx:if="{{goodsInfo.has_many_params && goodsInfo.has_many_params.length > 0}}">
    <view class="goods-param-title">
      商品参数
    </view>
    <view class="goods-param-conent">
      <view class="con" wx:for="{{goodsInfo.has_many_params}}" wx:key="index" wx:if="{{index < 6}}">
        <view class="con-left">{{ item.title }}</view>
        <view class="con-right">{{ item.value }}</view>
      </view>
    </view>
    <view class="goods-param-conent goods-more-param {{showMoreParams ? 'show-more-param' : ''}}">
      <view class="con" wx:for="{{goodsInfo.has_many_params}}" wx:key="index" wx:if="{{index >= 6}}">
        <view class="con-left">{{ item.title }}</view>
        <view class="con-right">{{ item.value }}</view>
      </view>
    </view>
    <view class="goods-param-more" bindtap="handlerShowParams">
      <text>{{!showMoreParams ? '展开' : '收起'}}</text>
      <van-icon name="arrow-down" wx:if="{{!showMoreParams}}"></van-icon>
      <van-icon name="arrow-up" wx:else></van-icon>
    </view>
  </view>
  <!--商品参数end-->
  <!-- 规格信息 -->
  <view class="spec_box" wx:if="{{goodsInfo.spec_info && goodsInfo.spec_info.length > 0}}">
    <block wx:for="{{goodsInfo.spec_info}}" wx:key="index">
      <view class="spec_list" >
        <view class="spec_left">
          <image src="{{item.info_img_src}}" class="spec_left_img" />
        </view>
        <view class="spec_conten" >
          <view class="spec_conten_lis" wx:for="{{item.content}}" wx:for-item="datas" wx:key="index" wx:key-item="ind">
            {{datas.content}}
          </view>
        </view>
        <view class="spec_right">
          <view class="spec_right_btn" bindtap="pushCart" data-item="{{item}}">购物车+</view>
        </view>
      </view>
    </block>
  </view>
  <!-- 规格信息 end -->

  <!-- 底部购买导航
    @beginDownObj  限时购据开始时间倒计时
    @enterAt 	酒店入住时间
    @isTime 	限时购开关
    @isBegTime 	限时购开关
    @activityid 	拼团活动id
    @ipnonexbol		iphone机型判断
    @goodsType 商品类型
    @leader_partake 抢团团长是否有参加
    @leader_not_join_invalid 为1时不显示“不参与抢团”按钮
    @start_time  拼团开始时间
  -->
  <goodFoot wx:if="{{goods_type != 'reserve_simple_goods' }}" id="footChild" bindbuyNowFoot="buyNowFoot" bindaddCartFoot="addCart" bindpopupModeshowChild="addCart"  bindshowGroupMoreChild="showGroupMoreChild"
            beginDownObj="{{beginDownObj}}" enterAt="{{enterAt}}" isTime="{{isTime}}" isBegTime="{{isBegTime}}" leader_partake="{{leader_partake}}" leader_not_join_invalid="{{leader_not_join_invalid}}" debtId="{{debtId}}"
            activityid="{{activityid}}" ipnonexbol="{{ipnonexbol}}" goodsInfo="{{goodsInfo}}" bindbuyNowRetail="buyNowRetail" cart_num="{{cart_num}}" bind:changeCartNumber="changeCartNumber"
            goodsType="{{goodsType}}" goods_plugin="{{goods_plugin}}" goodsId="{{goodsId}}" mode="{{mode}}" isRent="{{isRent}}"></goodFoot>
  <!-- 底部购买导航end -->
  <view class="payIntro" wx:if="{{goods_plugin.paid_content && goods_plugin.paid_content.display_set == 'before'}}">
    <block wx:if="{{!goods_plugin.paid_content.editor}}">
      <view class="title-text">{{goods_plugin.paid_content.title}}</view>
      <view class="txt">
      <icon class="iconfont icon-customform_list_2"></icon>
      {{goods_plugin.paid_content.remind}}</view>
    </block>
    <block wx:else>
      <mp-html content="{{goods_plugin.paid_content.editor}}"></mp-html>
    </block>
  </view>
  <!-- 详情 -->
  <view class="foShowBox" style="width:100%;margin-top:20rpx">
    <view class="pullBox {{xqBoxShow?'nondh':'rotadh'}}" style="margin-bottom:{{boxHeight}}px;">
      <image class="pullIcon {{xqBoxShow?'rotateImg':'normalImg'}}" src="{{imagUrl+'pull_up@2x.png'}}"></image>
      <text>上拉查看商品详情</text>
    </view>
    <view class="detail_content {{xqBoxShow?'actives':'noneBox'}}">
      <view class="title-text">
        商品详情
      </view>
      <mp-html content="{{first_content}}"></mp-html>
      <view style="color: #999;text-align: center;">{{first_content==''&&article.nodes==''?'暂无':''}}</view>
      <view class="payIntro" wx:if="{{goods_plugin.paid_content && goods_plugin.paid_content.display_set == 'after'}}" style="margin-top: 20rpx;">
        <block wx:if="{{!goods_plugin.paid_content.editor}}">
          <view class="title-text">{{goods_plugin.paid_content.title}}</view>
          <view class="txt">
            <icon class="iconfont icon-customform_list_2"></icon>
            {{goods_plugin.paid_content.remind}}</view>
        </block>
        <block wx:else>
          <mp-html content="{{goods_plugin.paid_content.editor}}"></mp-html>
        </block>
      </view>
    </view>
    <!-- 详情end -->
  
  </view>
  
  <!--价格说明-->
  <view class="price-desc {{xqBoxShow?'actives':'noneBox'}}"  wx:if="{{goodsInfo.is_price_desc}}">
    <view class="price-desc-title ">{{goodsInfo.price_desc_title}}</view>
    <view id="a_content">
      <mp-html content="{{goodsInfo.explain}}"></mp-html>
    </view>
  </view>
  
  <!-- 购买弹窗start
    @goodsType	商品类型
    @goodsId		商品id
    @optionsId	规格id
    @mark  标识
    @isRent		租赁商品
    @goodsInfo	详情数据
    @goods_plugin		插件数据
   -->
  <buyNow id="buyNowChild" coid="{{coid}}" bindparamsOptionsId="getOptionsId" goodsType="{{goodsType}}" goodsId="{{goodsId}}" optionsId="{{optionsId}}" mark="{{mark}}" bind:changeCartNumber="changeCartNumber" debtId="{{debtId}}"
          isRent="{{isRent}}" goodsInfo="{{goodsInfo}}" goods_plugin="{{goods_plugin}}"  mode="{{mode}}" store_id="{{store_id}}" bindpopupModeshowChild="showSkuImages_Methob_child" vieText="{{vieText}}" fromStock="{{fromStock}}">
  </buyNow>
  <!-- 购买弹窗 end  -->

  <view class="popupMode {{popupModeshow?'popupModeShow':''}}" hidden="{{popupModeshow}}"></view>
  <view style="height: 34px;" wx:if="{{ipnonexbol}}"></view>
</view>
<view class="posTopBtn" wx:if="{{hoet}}">
  <backup datas="{{btnData}}"></backup>
</view>
<!--海报悬浮按钮-->
<backup datas="{{btnData2}}" poster="{{1}}" bind:posterClick="postShow" wx:if="{{fromStock != 2}}"></backup>

<!--海报-->
<goods-qrcode isshow="{{posterShow}}" goodsId="{{goodsId}}" ispt="{{ispt}}"
              activityid="{{goodsType == 'zhpGroup' ?activityId:activityid}}"></goods-qrcode>
<!--海报end-->

<view wx:if="{{isRent}}">
  <!-- 租赁商品设置跳转商品id -->
  <view class="but" wx:if="{{isRentBuyShow}}" data-immedid="{{goods_plugin.lease_toy.immed_goods_id}}" bindtap="toRentBuy">
    <view class="button">
      <view class="p">立即</view>
      <view class="p">购买</view>
    </view>
  </view>
</view>


<!-- 引导加群弹窗 -->
<van-popup bind:close="replyBolClose" show="{{replyBol}}" position="center" overlay="{{true}}">
  <view class="reply">
    <view class="top">
      <van-icon name="bullhorn-o" color='#ffffff' size='60rpx' />
    </view>
    <view class="bottom">
      <view class="message"
            style="{{'color:'+(get_guidepage_info.alert_title.color?get_guidepage_info.alert_title.color:'#333')+';'}} {{'font-size:'+(get_guidepage_info.alert_title.size?get_guidepage_info.alert_title.size:'14px')+';'}}">
        {{get_guidepage_info.alert_title.alert_title?get_guidepage_info.alert_title.alert_title:''}}
      </view>
      <view class="replymessage"
            style="{{'color:'+(get_guidepage_info.alert_sidehead.color?get_guidepage_info.alert_sidehead.color:'#333')+';'}} {{'font-size:'+(get_guidepage_info.alert_sidehead.size?get_guidepage_info.alert_sidehead.size:'14px')+';'}}">
        {{get_guidepage_info.alert_sidehead.alert_sidehead?get_guidepage_info.alert_sidehead.alert_sidehead:''}}
      </view>
      <button class="replyBtn" open-type="contact"
              style="{{'color:'+(get_guidepage_info.alert_button?get_guidepage_info.alert_button:'#38ad5b')+';'}}"
              bindcontact="handleContact">去回复</button>
    </view>
  </view>
</van-popup>
<!-- 引导加群弹窗end -->

<!--客服-->
<van-popup custom-style="border-radius: 38rpx;" show="{{show1}}" overlay="{{true}}">
  <view class="pop-content">
    <view class="pop-top">
      <view class="left">
        <view class="wrap">
          <view>
            <view class="image" style="position:relative">
              <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/kf_online_contect@2x.png"></image>
            </view>
            <view>在线联系</view>
            <button open-type="contact" bindcontact="handleContact"
                    style="position:absolute;width:100%;height:80rpx;opacity:0;top:-140rpx;"></button>
          </view>
        </view>
      </view>
      <view style="display:flex;" wx:if="{{!service_mobile==''}}">
        <view class="line"></view>
      </view>
      <view class="right" wx:if="{{!service_mobile==''}}">
        <view class="wrap" bindtap="callPhone">
          <view>
            <view class="image">
              <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/kf_tel_contect@2x.png"></image>
            </view>
            <view>联系电话</view>
            <view style="margin-top:16rpx">{{service_mobile}}</view>
          </view>
        </view>
      </view>
    </view>
    <view class="pop-bottom" wx:if="{{!service_QRcode==''}}">
      <view class="image">
        <image src="{{service_QRcode}}" show-menu-by-longpress></image>
      </view>
    </view>
    <icon class="iconfont icon-close11" catchtap="closePop"></icon>
  </view>
</van-popup>

<!--分享弹窗-->
<van-popup custom-style="border-radius: 38rpx;" closeable bind:close="closeSharePop" show="{{showSahre}}"
           overlay="{{true}}">
  <view class="pop-content" style="padding: 20rpx 0 100rpx 0;">
    <view style="font-size: 34rpx;padding: 40rpx;text-align: center;">分享</view>
    <view class="pop-top">
      <view class="left">
        <view class="wrap">
          <view catchtap="closeSharePop">
            <view class="image" style="position:relative">
              <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/icon-fx_haoyou.png"></image>
            </view>
            <view>分享好友</view>
            <button style="position:absolute;width:100%;height:100%;opacity:0;top: 0;right: 0;"
                    open-type="share"></button>
          </view>
        </view>
      </view>
      <view class="right">
        <view class="wrap" catchtap="postShow">
          <view>
            <view class="image ">
              <icon class="iconfont icon-erweima color2" role="img"></icon>
            </view>
            <view>分享海报</view>
          </view>
        </view>
      </view>
      <view class="right" wx:if="{{wechatcircle_open==1}}">
        <view class="wrap" catchtap="shareGoods">
          <view>
            <view class="image">
              <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/icon-fx_haowuquan.png"></image>
            </view>
            <view>分享到好物圈</view>
          </view>
        </view>
      </view>
      <view class="right" wx:if="{{wx_video_link==1}}">
        <view class="wrap" catchtap="getVideoLink">
          <view>
            <view class="image ">
              <icon class="iconfont icon-ht_operation_copyline color3" role="img"></icon>
            </view>
            <view>视频号链接</view>
          </view>
        </view>
      </view>
    </view>
  </view>
</van-popup>

<!-- 视频号复制弹窗 -->
<van-popup show="{{showVideoLink}}" round closeable>
  <view class="video-link-copy">
    <view class="video-link-copy-btn" wx:if="{{article_url}}" catchtap="onCopy">一键复制</view>
    <view class="video-link-copy-text">复制链接，<br />视频号发布视频粘贴扩展链接</view>
    <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/goods/videolink.png" alt="" mode='widthFix'
           class="video-link-copy-img"></image>
  </view>
</van-popup>

<van-toast id="custom-selector" />
