<!--packageI/cps/cpsDetail/cpsDetail.wxml-->
<view id="cpsDetail" wx:if="{{goodsDetail.item_id}}">
  <view class="topimg">
    <view class="header-box {{hoet?'hoet':''}}">
      <!--<view class="back" catchtap="goBack">-->
        <!--<icon class="iconfont icon-member-left"></icon>-->
      <!--</view>-->
      <view class="member" catchtap="gotoMember">
        <icon class="iconfont icon-wode-wode"></icon>
      </view>
    </view>

    <swiper>
      <swiper-item>
        <image mode="widthFix" src="{{goodsDetail.cover_image}}"></image>
      </swiper-item>
    </swiper>
  </view>
  <view class="contenBox">
    <!-- 价格 -->
    <view class="goodsPrice">
      <view style="display: flex;">
        <view class="goodsPrice_left"><text>￥</text><text class="goodsPrice_left_price">{{goodsDetail.discount_price}}</text></view>
        <view class="goodsPrice_left_row" wx:if="{{good.price > good.discount_price}}">
          <text>折后价</text>
          <text class="original">原价￥{{goodsDetail.price}}</text>
        </view>
      </view>
      <view class="goodsPrice_right"><text>已售 {{goodsDetail.month_sales}}</text></view>
    </view>
    <!-- 商品名称 -->
    <view class="goodsDetail">
      <view class="goodsDetail_left">
        <view class="shopType">{{goodsDetail.platform_id == 2 ? '拼多多' : '京东'}}</view>
        <text>{{goodsDetail.title}}</text>
      </view>
      <view class="goodsDetail_right">
        <view>预估赠送</view>
        <view style="color: #e64a40;">{{ratioCommissionAmount}}{{ratio_data.ratio_name}}</view>
      </view>
    </view>
    <!-- 优惠券 -->
    <view class="couponBox" wx:if="{{goodsDetail.coupon_money > 0}}">
      <view class="dor">￥</view>
      <text class="couponBox_price">{{goodsDetail.coupon_money}}</text>
      <view style="margin-left: 0.44rem;">
        <view style="text-align: left;">优惠券</view>
        <view class="time">{{goodsDetail.coupon_starttime}}~{{goodsDetail.coupon_endtime}}</view>
      </view>
      <view class="couponRight" catchtap="getCoupon">立即领券</view>
    </view>
    <!-- 门店 -->
    <view class="storeIn">
      <view class="store_left">
        <image src="{{goodsDetail.shop_logo}}" mode="widthFix"></image>
      </view>
      <view class="store_right">
        <view class="storeName">
          <text>{{goodsDetail.shop_name}}</text>
          <!--<text class="btn">进入店铺</text>-->
        </view>
        <view class="evaluate" wx:if="{{goodsDetail.dsr_info}}">
          <view>宝贝描述 <text style="color: #ff2424">{{goodsDetail.dsr_info.descriptionMatch}}</text></view>
          <view>卖家服务 <text style="color: #ff2424">{{goodsDetail.dsr_info.serviceAttitude}}</text></view>
          <view>物流服务 <text style="color: #ff2424">{{goodsDetail.dsr_info.deliverySpeed}}</text></view>
        </view>
      </view>
    </view>
  </view>
  <view class="line"></view>
  <!-- 详情 -->
  <view class="describe">
    <view class="describe_top">
      <text>宝贝描述</text>
      <view class="describe_top_r" catchtap="toShowContent">
        {{showContent ? '收起' :'展开'}}
        <van-icon name="arrow-up" wx:if="{{showContent}}" />
        <van-icon name="arrow-down" wx:if="{{!showContent}}" />
      </view>
    </view>
    <view class="content" wx:if="{{showContent}}">
      <yz-image wx:for="{{goodsDetail.images}}" wx:key="index" custom-class="img" src="{{item}}" mode='widthFix' />
    </view>
  </view>
  <!-- 下单导航 -->
  <view class="orderNav">
    <view class="leftNav">
      <view class="leftNav_min" catchtap="gotoHome">
        <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/cps/icon-xiaoxi@2x@2x.png" ></image>
        首页
      </view>
      <!--<view class="leftNav_min leftNav_min_right">-->
        <!--<icon class="iconfont icon-fontclass-pingfen"></icon>-->
        <!--收藏-->
      <!--</view>-->
    </view>
    <view class="btnAR">
      <button class="orderNav_left" catchtap="shareWeixin" open-type="share">
        <view class="orderNav_left_top">立即分享</view>
        <view class="orderNav_left_bottom" wx:if="{{shareCommissionAmount > 0}}">收益{{shareCommissionAmount}}</view>
      </button>
      <view class="orderNav_right" catchtap="getCoupon">
        <view class="orderNav_right_top">{{goodsDetail.coupon_money > 0 ? '立即领券' : '立即购买'}}</view>
        <view class="orderNav_right_bottom" wx:if="{{goodsDetail.coupon_money > 0}}">省{{goodsDetail.coupon_money}}元</view>
      </view>
    </view>
  </view>
</view>
