<!--packageE/others/application_market/application_market.wxml-->
<view>

  <view class="after-sale-container">
    <view class="order-item after-sale">
      <view class="domain-name">域名：{{current_domain}}</view>
      <view class="server-time">
        <view class="time-text">剩余售后服务时长 {{remaining_time}}天</view>
        <view class="time-see" bindtap="getServiceDetails">查看></view>
      </view>
      <!-- <view class="see-more" bindtap="setDomianShow" wx:if="{{true}}">查看更多></view> -->
    </view>
  </view>


  <block wx:if="{{order.length > 0}}">
    <!-- <view class="site-name p">域名：{{domain}}</view> -->
    <view class="order-list" wx:for="{{order}}" wx:key="index">
      <view class="order-item">
        <view class="head">
          <view class="p" style="font-weight: bold">订单号：{{item.order_sn}}</view>
          <view class="p" style="color: #8c8c8c;">{{item.create_time}}</view>
        </view>
        <view wx:if="{{item.has_market_product && item.has_market_product.domain}}" style="margin: 5px 0;">
          当前域名：{{item.has_market_product.domain}}
        </view>
        <view class="content" wx:for="{{item.has_many_order_goods}}" wx:key="index" wx:for-item="good">
          <view class="left">
            <image src="{{good.thumb}}" alt="" />
          </view>
          <view class="right">
            <view class="title van-multi-ellipsis--l2">{{good.title}}</view>
            <view class="check-box">
              <view class="price">￥{{good.price}}</view>
              <view class="check" catchtap="tapPopupShow" data-item="{{item}}" data-good="{{good}}">查看插件></view>
            </view>
          </view>
        </view>
      </view>
    </view>
  </block>


  <view class="blank" wx:if="{{order.length <= 0 }}">
    <image src="https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/blank.png" />
    <view class="span">暂无数据</view>
  </view>
  <!-- custom-style="width:100%;height:70%;overflow:auto;" -->
  <van-popup show="{{PopupShow}}" round position="bottom">
    <view class="popup-title">
      插件列表
      <view class="closs_icon">
        <van-icon name="cross" catchtap="closs_tap" />
      </view>
    </view>
    <view class="popup-box">
      <view class="popup-item van-hairline--bottom" wx:for="{{showList}}" wx:key="index">{{item}}</view>
    </view>
  </van-popup>


  <!-- 
    后面取消了
    <van-popup show="{{domianShow}}" round position="bottom">
    <view class="popup-title">
      域名
      <view class="closs_icon">
        <van-icon name="cross" catchtap="setDomianShow" />
      </view>
    </view>
    <view class="popup-box">
      <view class="order-item after-sale popup-after-sale-item" wx:for="{{5}}">
          <view class="domain-name">域名：dev123.yunzmail.com</view>
          <view class="server-time">
            <view class="time-text">剩余售后服务时长 30天</view>
            <view class="time-see">查看></view>
          </view>
        </view>
    </view>
  </van-popup> -->

  <van-popup show="{{serviceDetailsShow}}" round position="center">
    <view class="popup-title">
      售后服务时长明细
      <view class="closs_icon">
        <van-icon name="cross" catchtap="setServiceDetailsShow" />
      </view>
    </view>
    <view class="popup-box" style="padding:0 32rpx;">
      <scroll-view scroll-y="true" style="height: 480rpx;" bindscrolltolower="getMoreServiceDetails">

        <view class="popup-service-item" wx:for="{{service_listData}}" wx:key="{{index}}">
          <view class="service-info">
            <view class="service-desc">{{ item.type_name }}</view>
            <view class="service-num">{{ item.change_value }}</view>
          </view>
          <view class="service-time">{{ item.created_at }}</view>
        </view>
        <view wx:if="{{service_allLoad && service_listData.length > 0}}" style="text-align:center;">没有更多了~</view>
        <view wx:if="{{service_listData.length==0}}" style="text-align:center;">暂无数据~</view>

      </scroll-view>

      
    </view>
  </van-popup>

</view>