<import src="../../../wxParse/wxParse.wxml" />
<wxs module="m1">
  var getindexof = function(num, id) {
    console.log(num,id,'assa')
    if (num.indexOf(id) >= 0) {
      return true
    } else {
      return false
    }
  }
  module.exports.getindexof = getindexof;
</wxs>
<view class="goods store_goods">
  <view class="showicon {{hoet?'hoet':''}}" wx:if="{{isCup}}">
    <view></view>
    <view class="show_b" wx:if="{{hoet}}">
      <view class="{{current == 1?'curr':''}}" id="1" bindtap="getTap">商品</view>
      <view class="{{current == 2?'curr':''}}" id="2" bindtap="getTap">评论</view>
      <view class="{{current == 3?'curr':''}}" id="3" bindtap="getTap">详情</view>
    </view>
    <view class="member">
      <view class="back" wx:if="{{!favorite}}" data-favorite="{{favorite}}" bindtap="onFavorite">
        <icon class="iconfont icon-bc_like_normal"></icon>
      </view>
      <view class="back" wx:if="{{favorite}}" data-favorite="{{favorite}}" bindtap="onFavorite">
        <icon class="iconfont icon-bc_like" style="color: rgb(255, 150, 1);"></icon>
      </view>
    </view>
    <view class="member" catchtap="gotoMember">
      <view class="back">
        <icon class="iconfont icon-wode-wode"></icon>
      </view>
    </view>
    <view class="cart" catchtap="gotoindex">
      <view class="back">
        <icon class="iconfont icon-ai-home"></icon>
      </view>
    </view>
  </view>
  <view class="ithumb">
    <view style="position:relative;">
      <swiper indicator-dots="{{true}}" autoplay="{{false}}" circular="{{true}}" indicator-active-color="#007aff">
        <swiper-item wx:if="{{goodsInfo.goods_video}}">
          <video style="width: 100%;height:100%;" src="{{goodsInfo.goods_video}}" poster="{{goodsInfo.video_image}}"></video>
        </swiper-item>
        <block wx:for="{{goodsInfo.thumb_url}}" wx:for-item="ithumb" wx:for-index="index" wx:key="index">
          <swiper-item>
            <block wx:if="{{ithumb}}">
              <image src="{{ithumb}}" mode='widthFix' />
            </block>
            <block wx:else="{{!ithumb}}">
              <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/img_default.png" mode='widthFix' />
            </block>
          </swiper-item>
        </block>
        <block wx:if="{{!goodsInfo.thumb_url || goodsInfo.thumb_url == null || goodsInfo.thumb_url.length <= 0}}">
          <swiper-item>
            <image src="{{goodsInfo.thumb}}" mode='widthFix' />
          </swiper-item>
        </block>
      </swiper>
      <float-order broadcast_data="{{broadcast_data}}"></float-order>
    </view>

  <view class="rob-time" wx:if="{{isBuy &&(isTime||isBegTime)}}">
		<view class="price">
			<view class="li text">
				<view class="span">{{ limitedTimeCustomName }}</view>
			</view>
		</view>
		<view class="time" wx:if="{{!isBegTime}}">
			<view class="left">距结束余：</view>
			<view class="right" style="margin-left:0;">
				<view class="content">
					<view class="date">{{countDownObj.day}}</view>
					<view class="mes">天</view>
					<view class="date">{{countDownObj.hou}}</view>
					<view class="mes">:</view>
					<view class="date">{{countDownObj.min}}</view>
					<view class="mes">:</view>
					<view class="date">{{countDownObj.sec}}</view>
				</view>
			</view>
		</view>
		<view class="time" wx:if="{{isBuy && (!isTime||isBegTime)}}">
			<view class="left">距开始还剩：</view>
			<view class="right">
				<view class="content">
					<view class="date">{{beginDownObj.day}}</view>
					<view class="mes">天</view>
					<view class="date">{{beginDownObj.hou}}</view>
					<view class="mes">:</view>
					<view class="date">{{beginDownObj.min}}</view>
					<view class="mes">:</view>
					<view class="date">{{beginDownObj.sec}}</view>
				</view>
			</view>
		</view>
	</view>

    <view class="goodsInfo_box">
      <view style="padding: 0 24rpx;">
        <view class="loveprice" wx:if="{{isGoodsLove}}">
          <view class="left">
            <view class="price-num">天天兑价</view>
          </view>
          <view class="right">
            <view class="pic_top">
              {{language['money']}}{{goods_love_cash+" + "+goods_love_deduction+goods_love_name}}
            </view>
          </view>
        </view>
        <view class="nameInfo">
          <view class="h2" wx:if="{{!isGoodsLove}}">
        <view class="{{goodsInfo.vip_level_status&&goodsInfo.vip_level_status.status==1?'change':''}}">
          <view class="show_price_box" wx:if="{{goods_plugin.goods_show&&goods_plugin.goods_show.store_goods_detail_style==1}}">
						<view class="show_price">
              <text style="margin-right:5px;font-size:15px;" wx:if="{{!goodsInfo.coupon}}">{{getprice}}</text>
						  <text style="margin-right:5px;font-size:15px;" wx:if="{{goodsInfo.coupon}}">券后价</text>
							<text style="font-size:16px">{{language['money']}} {{ goodsInfo.has_option == 1 ? (goodsInfo.min_price == goodsInfo.max_price ? goodsInfo.min_price : goodsInfo.min_price + "-" + goodsInfo.max_price) : goodsInfo.price }}</text>
						</view>
						<view class="show_price" wx:for="{{goods_plugin.goods_show.data}}">
							<view class="other_price {{index % 2 == 0 ? 'red_white' : 'white_red'}}" >{{ item.name }}：{{ item.value }}</view>
						</view>
					</view>
          <block wx:if="{{!goods_plugin.goods_show||goods_plugin.goods_show.store_goods_detail_style!=1}}">
            <text style="font-size:24rpx;">{{language['money']}}</text>
            <view class="price-num1" wx:if="{{goodsInfo.vip_level_status&&goodsInfo.vip_level_status.status==1}}" style="font-size: 24rpx!important;font-weight: 500;display:inline-block;">{{ goodsInfo.vip_level_status.word }}</view>
            <view id="price-num" wx:else style="display:inline-block;">
              {{ goodsInfo.has_option == 1 ? (goodsInfo.min_price == goodsInfo.max_price ? goodsInfo.min_price : goodsInfo.min_price + "-" + goodsInfo.max_price) : goodsInfo.price }}
            </view>
            <view class="original_icon" wx:if="{{goodsInfo.market_price && goodsInfo.notMarket_price&&goodsInfo.market_price!=goodsInfo.price}}" style="display:inline-block;">
              原价:{{language['money']}}{{goodsInfo.market_price}}
            </view>
          </block>
        </view>
      </view>
      <view class="h2" wx:if="{{isGoodsLove}}">
        <view class="{{goodsInfo.vip_level_status&&goodsInfo.vip_level_status.status==1?'change':''}}">
          <text class="pic_icon">{{language['money']}}</text>
          <text class="price-num1" style="font-size: 24rpx!important;font-weight: 500;display:inline-block;" wx:if="{{goodsInfo.vip_level_status&&goodsInfo.vip_level_status.status==1}}">{{ goodsInfo.vip_level_status.word }}</text>
          <view id="price-num" wx:else style="display:inline-block;">
            {{goodsInfo.price}}
          </view>
          <text wx:if="{{isRent}}">/天</text>
          <view class="original_icon" wx:if="{{goodsInfo.market_price && goodsInfo.notMarket_price&&goodsInfo.market_price!=goodsInfo.price}}" style="display:inline-block;">
            原价:{{language['money']}}{{goodsInfo.market_price}}
            <text wx:if="{{isRent}}" style="color: #8c8c8c;">/天</text>
          </view>
        </view>
      </view>
          <view class="right" style="margin-right: 10rpx;">
            <icon class="iconfont icon-erweima" catchtap="postShow"></icon>
          </view>
          <view class="right" style="position: relative;" wx:if="{{wechatcircle_open == 1||wx_video_link == 1}}" catchtap="openShare">
            <icon class="iconfont icon-fenxiang"></icon>
            <!-- <button style="position:absolute;width:100%;height:100%;opacity:0;top: 0;right: 0;" open-type="share"></button> -->
          </view>
          <view class="right share_text" wx:if="{{!activityid && (wechatcircle_open == 1||wx_video_link == 1)}}" catchtap="openShare">分享</view>
          <view class="right" style="position: relative;" wx:if="{{wechatcircle_open == 0&&wx_video_link == 0}}">
            <icon class="iconfont icon-fenxiang"></icon>
            <button style="position:absolute;width:100%;height:100%;opacity:0;top: 0;right: 0;" open-type="share"></button>
          </view>
          <view wx:if="{{!activityid && (wechatcircle_open == 0&&wx_video_link == 0)}}" class="right share_text" >
            <view>分享</view>
            <button style="position:absolute;width:100%;height:100%;opacity:0;top: 0;right: 0;" open-type="share"></button>
          </view>
        </view>
      </view>
      <block wx:if="{{prop_goods_info.plugin.pass_price}}">
        <view class="pass_price">{{prop_goods_info.plugin.pass_price.name}}:{{prop_goods_info.plugin.pass_price.price}}</view>
      </block>
      <view class="title-box">
        <view class="h1">{{goodsInfo.title}}</view>
        <view class="Coupon_b" wx:if="{{isCup&&goodsInfo.availability==1?true:false}}" bindtap="gotoCoupon">
          领券
          <van-icon class="arrow" name="arrow" size='32rpx' />
        </view>
      </view>
      <view style="padding: 0 24rpx;">
        <view class="rowContent" wx:if="{{goods_plugin.love_shoppin_gift}}">
          <view class="loveprice_b">
            <view class="span" style="text-align: left;width: 100%">
              {{goods_plugin.love_shoppin_gift}}
            </view>
          </view>
        </view>
        <view class="goodsbottom">
          <view class="stockcontainer">
            <view class="left">库存:{{goodsInfo.stock}}</view>
            <view class="middle" wx:if="{{goodsInfo.is_month_sales == 1}}">月销量:{{goodsInfo.month_sales?goodsInfo.month_sales:0}}</view>
            <view class="right">{{goodsInfo.is_month_sales == 1 ? "总销量" : "销量"}}:{{ salesCount }}</view>
          </view>
        </view>
        <view class="o2oCart" wx:if="{{is_o2o && (!isBuy || (isBuy && !isBegTime)) && !reserve_goods}}">
          <view class="Box" wx:if="{{o2oCount > 0 && goodsInfo.has_option !== 1}}">
            <icon class="iconfont icon-store_reduceLine" wx:if="{{o2oCount > 0}}" data-id="{{goodsInfo.id}}" data-num="{{-1}}" catchtap="updateCartbtn"></icon>
            <view class="label">{{o2oCount}}</view>
            <icon class="iconfont icon-store_plus" catchtap="addCart" data-item="{{goodsInfo}}"></icon>
          </view>
          <view class="spec_btn" wx:if="{{o2oCount >= 0 && goodsInfo.has_option === 1}}">
            <view class="span goods-num {{goodsCarts[goodsInfo.id]?'show':'hide'}}" wx:if="{{goodsCarts[goodsInfo.id]}}">
              {{ goodsCartsTotal[goodsInfo.id].total }}
            </view>
            <view class="button" catchtap="addGood" style="background-color: #f15353;">选规格</view>
          </view>
          <view class="addCart1" wx:if="{{o2oCount <= 0 && goodsInfo.has_option !== 1}}">
            <view class="button" data-item="{{goodsInfo}}" style="background-color: #f15353;" catchtap="addCart" wx:if="{{showDis && !toker}}">
              加入购物车
            </view>
            <view class="button" data-item="{{goodsInfo}}" style="background-color: #f15353;" catchtap="toBuy" wx:if="{{toker}}">
              立即买
            </view>
          </view>
        </view>
      </view>
    </view>
    <view class="member_b" wx:if="{{openVip == '1'&& isCup}}" catchtap="gotoMemberGradeList"  data-o="{{goodsInfo.member_discount.display_page}}" style="padding:8rpx;">
      <view class="img"></view>
      <view class="vipBox">
      <view style="font-size:12px;display:block;">{{goodsInfo.member_discount.level_name}}专享价{{language['money']}}{{goodsInfo.vip_level_status&&goodsInfo.vip_level_status.status==1 ? '暂无权限' : goodsInfo.member_discount.discount_value}}</view>
         <view style="font-size:12px;margin-top:8rpx;color:#a77b00;" wx:if="{{goodsInfo.member_discount.next_level_price!=goodsInfo.member_discount.discount_value&&goodsInfo.member_discount.next_level_price>0.00}}">加入{{ goodsInfo.member_discount.next_level_name }}专享价{{language['money']}}{{ goodsInfo.vip_level_status&&goodsInfo.vip_level_status.status==1 ? '暂无权限' : goodsInfo.member_discount.next_level_price }}</view>
        <text wx:if="{{isRent}}">/天</text>
      </view>
      <view class="vipBox_btn" wx:if="{{goodsInfo.member_discount.display_page=='1'}}">
			立即开通
			<van-icon class="arrow" name="arrow" size='24rpx'  />
		</view>
    </view>
    <view class="store-position">
      <view class="store-box" wx:if="{{is_o2o}}" catchtap="gotoList">
        <view class="store-name">
          <van-icon name="shop-o" color="#999" size="34rpx" />
          <view class="span">{{o2oName}}</view>
        </view>
        <view class="o2oName">点击进入门店</view>
      </view>
      <view class="contact-box" wx:if="{{is_o2o}}">
        <view class="contact">
          <view class="o2oPhone" catchtap="gophone" data-mobile="{{o2oPhone}}">
            <van-icon name="phone-o" color="#999" size="34rpx" />
            <view class="span">联系商家</view>
          </view>
        </view>
        <view class="position" catchtap="showPop">
          <van-icon name="service-o" size='40rpx' color="#666" />
           <view class="span">客服</view>
        </view>
        <view class="position" catchtap="goToAdress">

          <van-icon name="location-o" color="#999" size="34rpx" />
        </view>
      </view>
    </view>
    <view class="act-box">
      <view wx:if="{{isCup}}">
        <!-- <view class="coupon" bindtap="gotoCoupon" wx:if="{{goodsInfo.availability==1?true:false}}">
										<view class="li_1">领券</view>
										<view class="li_2">
												<text class="span">优惠券</text>
										</view>
										<view class="ang_right">
												<view class="ang_right_icon">
														<van-icon name="arrow" size='32rpx' />
												</view>
										</view>
								</view>
								<view class="vip" wx:if="{{openVip == '1'}}">
										<view class="li_1">
												<text>会员</text>
										</view>
										<view class="grade">
												<text>{{goodsInfo.member_discount.level_name}}</text>
										</view>
										<view class="li_3" wx:if="{{goodsInfo.member_discount.discount_value}}">
												会员专享价
												<text>{{language['money']}}{{goodsInfo.member_discount.discount_value}}</text>
												<text wx:if="{{isRent}}">/天</text>
										</view>
								</view> -->
        <view class="act" bindtap="activityShowFun" wx:if="{{activitySwitch}}">
          <view class="act1">活动</view>
          <view class="act2">
            <text>{{firstActivityBtn}}</text>
          </view>
          <view class="act3">
            <text>{{firstActivityCon}}</text>
          </view>
          <view class="ang_right">
            <view class="ang_right_icon">
              <van-icon name="arrow" size='32rpx' />
            </view>
          </view>
        </view>
      </view>
      <!-- 自购省 -->
			<view class="act" wx:if="{{selfbuy_discount!=null}}" catchtap='gotohuiyuan' style="line-height:40rpx;height:auto;padding-top:16rpx;padding-bottom:16rpx;wxcs_style_padding:15rpx 0;">
				<view class="act1">自购省</view>
				<view class="canTxt" style="display:flex;flex-direction:column;" >
					<text wx:if="{{selfbuy_discount.this_level_discount_price.show==1}}">{{selfbuy_discount.this_level_discount_price.content}}</text>
					<text wx:if="{{selfbuy_discount.next_level_discount_price.show==1}}">{{selfbuy_discount.next_level_discount_price.content}}</text>
				</view>
				<view class="act3">
					<text></text>
				</view>
				<view class="ang_right"  wx:if="{{selfbuy_discount && selfbuy_discount.link_to_level_page && selfbuy_discount.link_to_level_page.show==1}}">
					<view class="ang_right_icon">
						<van-icon name="arrow" size='32rpx' />
					</view>
				</view>
			</view>
      <view class="act" catchtap='showCan'>
        <view class="act1">参数</view>
        <view class="canTxt">
          <text>商品参数详情</text>
        </view>
        <view class="act3">
          <text></text>
        </view>
        <view class="ang_right">
          <view class="ang_right_icon">
            <van-icon name="arrow" size='32rpx' />
          </view>
        </view>
      </view>
      <!-- 服务标签 -->
      <view class="act_bq">
        <block wx:for="{{goods_plugin.label}}" wx:key="index" wx:for-item="item" wx:for-index="index">
					<view class="act_bq_Box">
						<image wx:if="{{item.pic}}" src="{{item.pic}}"></image>
						<view>{{item.name}}</view>
					</view>
				</block>
      </view>
    </view>
    <!-- <view class="shopInfo">
						<van-tabs active="{{activeName}}" bind:change="handleClick">
								<van-tab title="商品介绍">
										<block wx:if="{{article.nodes}}">
												<template is="wxParse" data="{{wxParseData:article.nodes}}" />
										</block>
										<block wx:else>
												<rich-text nodes="{{first_content}}"></rich-text>
										</block>
								</van-tab>
								<van-tab title="商品参数">
										<view class="parameter" wx:for="{{second_content}}" wx:for-item="item" wx:for-index="index" wx:key="index">
												<view class="par-info">
														<text class="name">{{item.title}}</text>
														<text class="value">{{item.value}}</text>
												</view>
										</view>
								</van-tab>
								<van-tab title="用户评价">
										<view>
												<view class="pj" wx:for="{{third_content}}" wx:key="index" wx:for-item="n" wx:for-index="index">
														<view class="user">
																<view class="imageshow">
																		<image src="{{n.head_img_url}}" mode='widthFix' />
																</view>
																<view class="name">{{n.nick_name}}</view>
																<view class="time">{{n.created_at}}</view>
														</view>
														<van-rate disabled="{{true}}" disabled-color="#ff9900" value="{{n.level}}" />
														<view class="p">{{n.content}}</view>
														<view class="photoshow">
																<view class="p">晒图：</view>
																<view class="photobottom">
																		<image src="{{item}}" wx:for="{{n.images}}" wx:key="{{imgindex}}" wx:for-index="imgindex" mode='widthFix' />
																</view>
														</view>
														<view wx:if="{{n.append}}">
																<view class="last_day p">
																		追评
																		<text>{{n.append.created_at}}</text>
																</view>
																<view class="p">{{n.append.content}}</view>
														</view>
														<view class="comment" wx:if="{{isCup}}">
																<text bindtap='toContentInfo' data-jsondata="{{n}}">评论数:{{n.reply_count}}</text>
														</view>
												</view>
										</view>
								</van-tab>
						</van-tabs>
				</view> -->
    <view class="Go_settle" wx:if="{{carts.length === 0 && showDis && !toker && !reserve_goods}}">
      <icon class="iconfont" catchtap="trggleCart"></icon>
      <view class="p">购物车是空的</view>
      <view class="button" style="background: hsla(0,0%,100%,.1);color: #aaa;">
        <block wx:if="{{!isBug || (isBuy && !isBegTime)}}">
 				请选择商品
			  </block>
			<block wx:else>
				活动未开始
			</block>

      </view>
    </view>
    <view class="Go_settle complete" wx:if="{{carts.length > 0  && showDis && !toker && !reserve_goods}}">
      <view class="number" wx:if="{{!showCart}}">{{cartsNum}}</view>
      <icon style="{{minicartStyle}}" class="iconfont" catchtap="trggleCart"></icon>
      <view class="p" style="{{leftPrice}}">
        <text class="span">{{language['money']}}</text>
        {{ cartsTotal }}
      </view>
      <view class="button" catchtap="goodsOrder">去结算</view>
    </view>
    <!-- 预约商品 -->
    <view class="reserveBtn" wx:if="{{reserve_goods}}" catchtap="tapReserve">立即预约{{testLength}}</view>
    <van-calendar show="{{showCalendar}}" show-confirm="{{false}}" formatter="{{formatter}}" bind:confirm="onConfirmCalendar" bind:close="closeCalendar" />
    <van-popup bind:click-overlay="trggleCart" show="{{showCart}}" position="bottom" custom-style="max-height:60%;width:100%;padding-bottom:10rpx;" overlay="{{true}}">
      <view class="top_1">
        <view style="display: flex;align-items: center;">
          <icon class="cartIcon" catchtap="trggleCart"></icon>
          <text class="span select">(已选{{ cartsNum }}件)</text>
        </view>
        <view class="clear_car" catchtap="clearCart">
          <icon class="iconfont icon-delete"></icon>
          <text class="span">清空购物车</text>
        </view>
      </view>
      <view class="carPopup" ref="cartWrapper">
        <view>
          <view class="goodsList">
            <view class="goods" wx:for-index="index" wx:for-item="item" wx:key="index" wx:for="{{carts}}">
              <view class="goods_img">
                <image src="{{item.goods.thumb}}" mode='widthFix' />
              </view>
              <view class="ul goodsName">
                <view class="li name">
                  <view class="install-tag" wx:if="{{item.live_install && item.live_install.open_state == 1}}">安装</view>
                    				<view class="goods-names">{{ item.goods.title }}</view>
                  <view class="span" wx:if="{{item.option_str}}">({{ item.option_str }})</view>
                </view>
                <view class="li price">{{language['money']}}{{ item.goods.price }}</view>
              </view>
              <view class="addBtn">
                <icon class="iconfont icon-store_reduceLine" catchtap="updateCartbtn" data-id="{{item.goods_id}}" data-num="{{-1}}"></icon>
                <input type="number" value="{{item.total}}" data-total="{{item.total}}" bindfocus="clickCount" bindblur="changeCount" data-id="{{item.goods_id}}" />
                <icon class="iconfont icon-store_plus" catchtap="updateCartbtn" data-id="{{item.goods_id}}" data-num="{{1}}"></icon>
              </view>
            </view>
          </view>

        </view>
         <view style="height: 3.5rem;"></view>
      </view>
    </van-popup>
  </view>
  <!--<view class="sift">-->
    <!--<view class="sift-title">-->
      <!--<text>精选口碑</text>-->
      <!--<view class="tit_a">-->
        <!--好评率-->
        <!--<text>{{goodsInfo.favorable_rate}}</text>-->
      <!--</view>-->
      <!--<view class="sift-right" catchtap="goKb">-->
        <!--<text>查看全部({{goodsInfo.get_comment.total}})</text>-->
        <!--<van-icon name="arrow" size='32rpx' />-->
      <!--</view>-->
    <!--</view>-->
    <!--<swiper next-margin='140px' wx:if="{{goodsInfo.get_comment.data.length>0}}">-->
      <!--<block wx:for='{{commentLimit}}' wx:key='index'>-->
        <!--<swiper-item>-->
          <!--<view style="width:400rpx;height:193rpx" class="swiper-kb">-->
            <!--<view class="figure">-->
              <!--<image src="{{item.head_img_url}}"></image>-->
              <!--<view class="figtxt">-->
                <!--<text>{{item.nick_name}}</text>-->
                <!--<van-rate disabled="{{true}}" disabled-color="#ff9900" value="{{item.level}}" size='14' />-->
              <!--</view>-->
            <!--</view>-->
            <!--<view class="figure_right">{{item.content}}</view>-->
          <!--</view>-->
        <!--</swiper-item>-->
      <!--</block>-->
    <!--</swiper>-->
    <!--<view wx:else style="width:100%;text-align: center;height:100px;line-height:100px;color: #7d7e80;">-->
      <!--暂无评价-->
    <!--</view>-->
  <!--</view>-->
  <!-- 精选口碑 -->
  <comment class="sift" goodsInfo="{{goodsInfo}}" goodsId="{{goodsId}}" commentPage="{{1}}" ></comment>
  <!-- 精选口碑 -->
  <!-- 微帖 -->
	<invitation goods_plugin="{{prop_goods_info}}"></invitation>
	<!-- 微帖 -->
  <view class="foShowBox" style="width:100%;margin-top:20rpx" wx:if="{{!toker}}">
    <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="{{xqBoxShow?'actives':'noneBox'}}">
      <view style="text-align: center;width:100%;height:100rpx;line-height:100rpx;background:#fff;">商品详情</view>
      <block wx:if="{{article.nodes}}">
        <template is="wxParse" data="{{wxParseData:article.nodes}}" />
      </block>
      <block wx:else>
        <rich-text nodes="{{first_content}}"></rich-text>
      </block>
    </view>
  </view>

  <view wx:if="{{toker}}">
    <van-tabs id="toker" active="{{active}}" bind:click="toTokerList" >
      <van-tab title="套餐内容"></van-tab>
      <van-tab title="商品详情"></van-tab>
    </van-tabs>

    <view wx:if="{{active == '0'}}">
      <view class="meal">
        <view>
          <view>核销日期：</view>
          <view wx:if="{{customer_development.effective_time == 0}}">永久有效</view>
          <view wx:if="{{customer_development.effective_time > 0 && customer_development.effective_day.length > 0}}" style="display: flex;flex-wrap: wrap;justify-content: flex-start;">
            购买后{{customer_development.effective_time}}天内有效
            <view wx:for="{{customer_development.effective_day}}" wx:for-index="ind" wx:key="ind">（限{{ind == customer_development.customer_development.effective_day.length ?item:item+','}}使用)</view>
          </view>
          <view wx:if="{{customer_development.effective_day.length == 0}}">不可使用</view>
        </view>
        <view class="timer">
          <block wx:for="{{customer_development.time_interval}}" wx:for-index="ind">
            <view wx:key="ind">核销时间段：{{item.start}}-{{item.end}}</view>
          </block>
        </view>
        <block wx:if="{{customer_development.once_list.length >0}}">
          <view class="onece">
          一次性消费项
          </view>
          <view class="onelis"  wx:for="{{customer_development.once_list}}" wx:for-index="ind" wx:key="ind" >
            <view class="oneleft">
              <image src="{{item.full_img_url}}" ></image>
            </view>
            <view class="oneright">
              <view class="rightTitle">{{item.name}}</view>
              <view class="rightBottom">
                <text>{{ item.quantity }}</text>
                <text style="margin-left:32rpx;">单价￥{{item.price}}</text>
                <text style="margin-left:1rem;">总价￥{{ item.price * item.quantity }}</text>
              </view>
            </view>
          </view>
        </block>
        <block wx:if="{{customer_development.many_list.length >0}}">
          <view class="onece">
          多次性消费项
          </view>
          <view class="onelis"  wx:for="{{customer_development.many_list}}" wx:for-index="ind" wx:key="ind">
            <view class="oneleft">
              <image src="{{item.full_img_url}}"></image>
            </view>
            <view class="oneright">
              <view class="rightTitle">{{item.name}}</view>
              <view class="rightBottom">
                <text>{{ item.quantity }}</text>
                <text style="margin-left:32rpx;">单价￥{{item.price}}</text>
                <text style="margin-left:32rpx;">总价￥{{ item.price * item.quantity }}</text>
              </view>
            </view>
          </view>
        </block>
      </view>
    </view>
      <view wx:if="{{(active == '1' && toker)}}">
      <!-- {{article.nodes}} -->
      <block wx:if="{{article.nodes}}">
        <view style="padding:0 20rpx;overflow:hidden;">
          <template is="wxParse" data="{{wxParseData:article.nodes}}" />
        </view>
      </block>
      <block wx:else>
        <rich-text nodes="{{first_content}}"></rich-text>
      </block>
      <view style="color: #7d7e80;text-align: center;line-height: 120rpx;">{{first_content==''&&article.nodes==''?'暂无详情':''}}</view>
    </view>
  </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">
      <rich-text nodes="{{goodsInfo.explain}}"></rich-text>
    </view>
  </view>

  <!-- 门店推荐商品 -->
    <view class="like-list" wx:if="{{goodsInfo.show_push.length>0 && xqBoxShow}}">
    <view class="box06">
      <view class="img">
        <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/goods-like01.png" mode='widthFix' />
      </view>
      <view class="h3 like">猜你喜欢</view>
    </view>
    <view class="like-box">
      <view class="box" wx:for="{{goodsInfo.show_push}}" wx:key="index" wx:for-item="item" bindtap='pushGoodGoto' data-itemdata="{{item}}">
        <view class="goods-img">
          <image src="{{item.thumb}}" style="width:100%;height:100%;" mode='widthFix' />
        </view>
        <view class="goods-info">
          <view class="name">
            <text>{{item.title}}</text>
          </view>
          <view class="pay">
            <view class="left">
              <text>{{language['money']}}</text> {{item.price}}
            </view>
            <view class="right">
              <text>{{language['money']}}</text> {{item.market_price}}
            </view>
          </view>
        </view>
      </view>
    </view>
    <view class="cloud">
      <view class="img">
        <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/cloud.png" style="width:100%;height:100%;" mode='widthFix' />
      </view>
      <view class="h4">没有更多了</view>
    </view>
  </view>
</view>
<view class="posTopBtn" wx:if="{{hoet}}">
  <backup datas="{{btnData}}"></backup>
</view>
<!-- 评价弹窗 -->
<van-popup custom-style="width:100%;height:100%;overflow:auto;" show="{{streetShow}}" position="right" overlay="{{false}}">
  <view class="streetContent">
    <van-nav-bar title="全部评价" left-text="" right-text="" left-arrow bind:click-left="streetClose" />
    <view class="shopInfo">
      <view class="pj" wx:for="{{third_content}}" wx:key="index" wx:for-item="n" wx:for-index="index">
        <view class="user">
          <view class="imageshow">
            <image src="{{n.head_img_url}}" mode='widthFix' />
          </view>
          <view class="name">{{n.nick_name}}</view>
          <view class="time">{{n.created_at}}</view>
        </view>
        <van-rate disabled="{{true}}" disabled-color="#ff9900" value="{{n.level}}" />
        <view class="p">{{n.content}}</view>
        <view style="text-align:left;margin:10rpx 0;"  wx:if="{{n.images&&n.images.length>0}}">
          <view style="margin-left:16rpx;">晒图：</view>
          <view style="display: flex;flex-wrap: wrap;">
            <view style="width:160rpx;height:160rpx;margin-left:16rpx;margin-bottom: 16rpx;"  wx:for="{{n.images}}" wx:key='index' >
              <image src="{{item}}" style="width: 100%;height: 100%;"mode='aspectFill' />
            </view>
          </view>
        </view>
        <view wx:if="{{n.append}}">
          <view class="last_day p">
            追评
            <text>{{n.append.created_at}}</text>
          </view>
          <view class="p">{{n.append.content}}</view>
        </view>
        <view class="comment" wx:if="{{isCup}}">
          <text bindtap='toContentInfo' data-jsondata="{{n}}">评论数:{{n.reply_count}}</text>
        </view>
      </view>
    </view>
  </view>
</van-popup>
<!-- 选规格 -->
<van-popup bind:click-overlay="close" show="{{show2}}" position="center" overlay="{{true}}" round>
	<view>
		<view class="spec_box q5">
			<view class="h3">
				{{ popTitle }}
				<icon catchtap="close" class="iconfont icon-close11"></icon>
			</view>
			<view style="height: 80rpx;"></view>
      <view class="choose-calendar" catchtap="tapReserve" wx:if="reserve_goods">
          <view class="span">{{ calendar_data ? "已选择日期"+calendar_data : "请选择日期" }}</view>
          <view class="span" style="margin-left: 15px;" wx:if="calendar_data">剩余：{{ arrjson.number }}</view>
        </view>
			<view class="spec_a" wx:for-item="spec" wx:for="{{goodsInfo.has_many_specs}}" wx:key="index">
				<view class="h5">{{ spec.title }}：</view>
				<view class="ul option">
					<view class="li  {{m1.getindexof(specid,item.id)?'cur':''}}" wx:for-index="itemidx" wx:key="{{itemidx}}" wx:for-item="item" data-index="{{itemidx}}" data-indexl="{{index}}" data-item="{{item}}" data-itemid="{{item.id}}" catchtap="selectSpecs" wx:for="{{spec.specitem}}">
						{{ item.title }}
					</view>
				</view>
			</view>
			<view style="height:3.4375rem;"></view>
		</view>
		<view class="add_car">
      <view class="ul car_btn">
        <view class="left">
          <text class="good-price">
            <text class="span">{{language['money']}}</text
            >{{ popPrice }}<text class="span" style="margin-left: 0.3rem;">库存：{{ popStock }}</text>
          </text>
          <view class="vip-price" wx:if="{{isMultiSpecs}}">
            <van-loading class="m-l-w6" color="#fdbc2e" size='16' wx:if="{{specsVIPPrc == 0}}"/>
            <text class="m-l-w6" wx:if="{{specsVIPPrc}}">会员价: {{language['money']}}{{ specsVIPPrc }} </text>
          </view>
        </view>
        <view class="right li" catchtap="submitAction" wx:if="{{!toker && !reserve_goods}}">
          <text class="span" wx:if="{{!popNum}}">加入购物车</text>
        </view>
        <view class="right li" catchtap="toBuy" wx:if="{{toker && !reserve_goods}}">
          <text class="span" wx:if="{{!popNum}}">立即买</text>
        </view>
        <view class="right li" catchtap="toBuy" wx:if="{{reserve_goods}}">
          <text class="span" wx:if="{{!popNum && arrjson.is_reserve}}" catchtap="confirmTap" >确认预约</text>
          <text class="span" wx:if="{{!popNum && !arrjson.is_reserve}}" style="background: #999;" >确认预约</text>
        </view>
        <view class="Box" wx:if="{{popNum >= 1}}">
          <icon class="iconfont icon-store_reduceLine" data-id="{{popCard.id}}" data-num="{{-1}}" catchtap="updateCart1btn"></icon>
          <view class="show label">{{ popNum }}</view>
          <icon class="iconfont icon-store_plus" data-id="{{popCard.id}}" data-num="{{1}}" catchtap="updateCart1btn"></icon>
        </view>
      </view>
    </view>
	</view>

</van-popup>
<goods-qrcode isshow="{{posterShow}}" goodsId="{{goodsId}}" ></goods-qrcode>
<van-popup wx:if="{{false}}" show="{{posterShow}}" closeable close-on-click-overlay="true" bind:close="posterClose" custom-style="background:none;" class="posterPopup_style" position="bottom">
	<view class="code_box">
		<image wx:if="{{posterImg}}" src="{{'data:'+posterImg.mime+';base64,'+posterImg.base64Image}}"
		 mode='widthFix' />
		<image wx:if="{{!posterImg}}" src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/img_default.png" mode='widthFix' />
	</view>
  <view class="icon_btn">
		<view class="box">
      <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/images/poster_share.png" />
      <text>分享好友</text>
      <button style="position:absolute;width:100%;height:100%;opacity:0;top: 0;right: 0;" open-type="share"></button>
    </view>
    <view class="box" catchtap='saveImg'>
      <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/images/poster_save.png" />
      <text>保存海报</text>
    </view>
	</view>
  <!-- 关闭图标 -->
  <view class="icon_close" style="{{iPnoneBottomBol?'padding-bottom: 34px;':''}}" catchtap="posterClose">取消</view>
</van-popup>
<van-popup bind:click-overlay="activityShowBtn" show="{{activityShow}}" position="bottom">
  <view class="activitycontent">
    <view class="header">
      <view class="left"></view>
      <view class="center">
        <text>活动</text>
      </view>
      <view class="right">
        <view class="close" bindtap='activityShowBtn'>
          <van-icon name="close" size='40rpx' />
        </view>
      </view>
    </view>
    <view class="activitybot">

      <view style="display:flex;flex-direction: column;" wx:for="{{activityItem.sale}}" wx:key="{{activityArrIdex}}" wx:for-index="activityArrIdex"	wx:for-item="activitem">
					<view class="activicell" >
						<view class="left">{{activitem.name}}</view>
						<view class="right" wx:if="{{activitem.type == 'string'}}">
							<view class="right_content">
								{{activitem.value}}
							</view>
						</view>
						<view class="right" wx:if="{{activitem.type == 'array'}}">
							<view class="right_content" wx:for-index="rightContentIdex" wx:key="{{rightContentIdex}}" wx:for="{{activitem.value}}"
							wx:for-item="value">
								<text>{{value}}</text>
							</view>
						</view>
					</view>
					<view wx:if="{{activitem.desc}}" style="padding: 0 30rpx 30rpx 30rpx;color: rgb(241, 83, 83);">
						{{activitem.desc}}
					</view>
				</view>

    </view>
  </view>
</van-popup>
<van-popup show="{{show8}}" custom-style="width: 80%;" position="center" overlay="{{true}}">
  <view class="show8content" style="background-color:#fff;">
    <view class="p tips">该商家已过期，去看看其他的吧</view>
    <view class="p bottom">
      <view class="button" catchtap="goTOHome">我知道了</view>
    </view>
  </view>
</van-popup>
<van-popup show="{{showCs}}" closeable bind:close="closeCs" class="canshu" position="bottom" custom-style="width:100%;height:70%;overflow:auto;">
  <view class="parameter">
    <view class="showTitle">商品参数</view>
    <view class="par-info" wx:for="{{second_content}}" wx:key="index">
      <view class="name">{{item.title}}</view>
      <view class="value">{{item.value}}</view>
    </view>
  </view>
</van-popup>
<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="postion:relative">
							<image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/kf_online_contect@2x.png"></image>
						</view>
						<view>在线联系</view>
            <button wx:if="{{cservice==''}}" open-type="contact" bindcontact="handleContact" style="postion:absolute;width:100%;height:80rpx;opacity:0;top:-140rpx;"></button>
            <button wx:if="{{cservice!=''}}" data-cservice="{{cservice}}" bindtap="gotoChat" style="postion:absolute;width:100%;height:80rpx;opacity:0;top:-140rpx;"></button>
					</view>
				</view>
			</view>
			<view style="display:flex;padding-top: 10%;" 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="postion: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">
				<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>
