<template>
  <HeaderNav headerText="详情"></HeaderNav>
  <div class="merchant-details">
    <div class="user-info">
      <div class="info-left">
        <img src="@/assets/img/index/user/default-head.png" alt="" />
        <div class="info-name">
          <div class="name-area pf500 fs18 fc2C3131">
            用户昵称
            <div class="vip pf500 fs10 fcDF384C">V2</div>
          </div>
          <div class="time pf500 fs12 fc999999">入驻时间: 2025-11-07</div>
        </div>
      </div>
      <div class="info-right pf500 fs12 fcFFFFFF">关注</div>
    </div>
    <div class="chengjiao-number pf500 fs10 fc999999">成交量 12550 · 98.95% 成交率</div>
    <div class="money-item pf500 fs10 fcDF384C">
      <div class="checkbox">
        <img src="@/assets/icon/asset/duihao.png" alt="" />
      </div>
      <div class="text">保证金 1000.00 USDT</div>
    </div>
    <div class="certification-center">
      <div class="certification-item pf500 fs10 fcDF384C">
        <div class="checkbox">
          <img src="@/assets/icon/asset/duihao.png" alt="" />
        </div>
        <div class="text">视频认证</div>
      </div>
      <div class="certification-item pf500 fs10 fcDF384C">
        <div class="checkbox">
          <img src="@/assets/icon/asset/duihao.png" alt="" />
        </div>
        <div class="text">身份认证</div>
      </div>
      <div class="certification-item pf500 fs10 fcDF384C">
        <div class="checkbox">
          <img src="@/assets/icon/asset/duihao.png" alt="" />
        </div>
        <div class="text">电子邮件</div>
      </div>
      <div class="certification-item pf500 fs10 fcDF384C">
        <div class="checkbox">
          <img src="@/assets/icon/asset/duihao.png" alt="" />
        </div>
        <div class="text">手机</div>
      </div>
    </div>
    <div class="send-message pf600 fs14 fcDF384C">发消息</div>
    <div class="notifi-classifi">
      <div class="pf600 fs18 fc121212" @click="current = 0">详情</div>
      <div class="sys-notifi pf600 fs14 fcA8A8A8" @click="current = 1">委托单</div>
    </div>
    <div class="user-details" v-if="current == 0">
      <div class="details-item margin-top10">
        <div class="pf500 fs14 fc2C3131">成交单数</div>
        <div class="pf500 fs12 fc2C3131">15020</div>
      </div>
      <div class="details-item margin-top7">
        <div class="pf500 fs14 fc999999">购买</div>
        <div class="pf500 fs12 fc999999">520</div>
      </div>
      <div class="details-item margin-top7">
        <div class="pf500 fs14 fc999999">出售</div>
        <div class="pf500 fs12 fc999999">12500</div>
      </div>
      <div class="line"></div>
      <div class="details-item margin-top10">
        <div class="pf500 fs14 fc2C3131">成交率</div>
        <div class="pf500 fs12 fc2C3131">100.00%</div>
      </div>
      <div class="details-item margin-top7">
        <div class="pf500 fs14 fc999999">购买</div>
        <div class="pf500 fs12 fc999999">50.20%</div>
      </div>
      <div class="details-item margin-top7">
        <div class="pf500 fs14 fc999999">出售</div>
        <div class="pf500 fs12 fc999999">25.05%</div>
      </div>
      <div class="details-item margin-top13">
        <div class="pf500 fs14 fc2C3131">交易对手数</div>
        <div class="pf500 fs12 fc2C3131">894820</div>
      </div>
      <div class="details-item margin-top13">
        <div class="pf500 fs14 fc2C3131">平均放币时间</div>
        <div class="pf500 fs12 fc2C3131">1m15s</div>
      </div>
    </div>
    <div class="user-order" v-else>
      <div class="order-item" v-for="(item, index) in 2" :key="index">
        <div class="price-area">
          <div class="text pf400 fs10 fc999999">单价</div>
          <div class="price-number pf400 fs10 fc999999">
            ￥
            <span class="pf500 fs16 fc333333">6.58</span>
            /USDT
          </div>
          <div class="number pf400 fs10 fc999999">
            数量 <span class="pf400 fs12 fc666666">1000.05 USDT</span>
          </div>
          <div class="number pf400 fs10 fc999999">
            限额 <span class="pf400 fs12 fc666666">20000 - 1000.05 CNY</span>
          </div>
        </div>
        <div class="price-func">
          <div class="func-time pf400 fs10 fc999999">
            <img src="@/assets/icon/asset/clock-gray.svg" alt="" />0m 45s
          </div>
          <div class="func-pay-way pf400 fs10 fc999999">
            <div class="color"></div>
            银行卡
          </div>
          <div class="func-main">
            <div class="func-buy pf500 fs12 fcFFFFFF">购买</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script setup>
  import { ref } from "vue";
  import HeaderNav from "../../../index/components/HeaderNav.vue";

  const baseFlag = ref(true);
  const current = ref(1);
</script>
<style lang="less" scoped>
  .merchant-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin-top: 48px;
    width: 100%;

    .user-info {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      margin-top: 10px;
      width: 345px;
      height: 56px;

      .info-left {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;

        img {
          width: 56px;
          height: 56px;
        }

        .info-name {
          margin-left: 16px;

          .name-area {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-items: center;
          }

          .vip {
            margin-left: 5px;
            width: 18px;
            height: 15px;
            line-height: 15px;
            text-align: center;
            border-radius: 3px;
            background: #df384c1a;
          }

          .time {
            margin-top: 3px;
          }
        }
      }

      .info-right {
        width: 60px;
        height: 24px;
        line-height: 24px;
        text-align: center;
        border-radius: 5px;
        background: #df384c;
      }
    }

    .chengjiao-number {
      margin-top: 2px;
      width: 345px;
      height: 24px;
      line-height: 24px;
    }

    .checkbox {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 4px;
      background: #df384c; /* 红色背景 */

      img {
        width: 10px;
        height: 7px;
      }
    }

    .money-item {
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: center;
      width: 345px;

      &:first-child {
        margin-left: 0;
      }

      .text {
        margin-left: 4px;
      }
    }

    .certification-center {
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: center;
      margin-top: 7px;
      width: 345px;
      height: 16px;

      .certification-item {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        margin-left: 8px;

        &:first-child {
          margin-left: 0;
        }

        .text {
          margin-left: 4px;
        }
      }
    }

    .send-message {
      margin-top: 21px;
      width: 311px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      border-radius: 100px;
      background: #df384c1a;
    }

    .notifi-classifi {
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: flex-end;
      margin-top: 14px;
      width: 349px;
      height: 24px;

      .sys-notifi {
        margin-left: 67px;
      }
    }

    .user-details {
      width: 345px;

      .margin-top10 {
        margin-top: 10px;
      }

      .margin-top7 {
        margin-top: 7px;
      }

      .margin-top13 {
        margin-top: 13px;
      }

      .line {
        margin-top: 15px;
        width: 335px;
        height: 1px;
        background: #f5f5f5;
      }

      .details-item {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 345px;
        height: 18px;
      }
    }

    .user-order {
      margin-top: 10px;

      .order-item {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 10px;
        padding: 0 10px;
        width: 345px;
        height: 92px;
        border-radius: 8px;
        border: 1px solid #ebebeb;
        box-sizing: border-box;

        &:first-child {
          margin-top: 0;
        }

        .price-area {
          margin-top: 10px;

          .price-number {
            margin-top: 3px;
          }

          .number {
            margin-top: 5px;
            height: 13px;
            line-height: 13px;

            span {
              margin-left: 1px;
            }
          }
        }

        .price-func {
          display: flex;
          flex-direction: column;
          justify-content: flex-start;
          align-items: flex-end;
          margin-top: 10px;

          .func-time {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-items: center;
            height: 12px;

            img {
              margin-right: 3px;
              width: 9px;
              height: 9px;
            }
          }

          .func-pay-way {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            align-items: center;
            margin-top: 5px;
            height: 12px;

            .color {
              margin-right: 3px;
              width: 3px;
              height: 10px;
              border-radius: 2px;
              background: #df384c;
            }
          }

          .func-main {
            display: flex;
            flex-direction: row;
            justify-content: flex-start;
            margin-top: 15px;
            height: 24px;

            .func-chat {
              width: 58px;
              height: 24px;
              line-height: 24px;
              text-align: center;
              border-radius: 5px;
              background: #df384c1a;
            }

            .func-buy {
              margin-left: 8px;
              width: 58px;
              height: 24px;
              line-height: 24px;
              text-align: center;
              border-radius: 5px;
              background: #45b26b;
            }
          }
        }
      }
    }
  }
</style>
