huzheng12
2024-05-06 3ed2cb78a690b64c3b2646d35e1500081186dfa3
src/page/advertiserDetail/index.vue
@@ -1,7 +1,13 @@
<template>
  <div v-if="userInfo" id="wantBuy" class="bg-blue " style="overflow: auto">
    <div class="w-full h-122 pl-40 pr-31 box-border bg-blue flex justify-between text-white items-center">
      <van-icon class="flex-1 font-32 font-700" name="arrow-left" @click.native="$router.back()" />
  <div v-if="userInfo" id="wantBuy" class="bg-blue" style="overflow: auto">
    <div
      class="w-full h-122 pl-40 pr-31 box-border bg-blue flex justify-between text-white items-center"
    >
      <van-icon
        class="flex-1 font-32 font-700"
        name="arrow-left"
        @click.native="$router.back()"
      />
    </div>
    <div class="main">
@@ -11,31 +17,71 @@
        <div>
          <p class="name">{{ c2cUser.nickName }}</p>
          <div class="advertisement flex items-center">
            <img class="succ" src="@/assets/image/icon-success.png" alt ="" />
            <span>{{ $t('认证广告方') }}</span>
            <img class="succ" src="@/assets/image/icon-success.png" alt="" />
            <span>{{ $t("认证广告方") }}</span>
            <span class="shu">|</span>
            <span>{{ $t('保证金') }} {{ $t(`${c2cUser.deposit}USDT`) }}</span>
            <span>{{ $t("保证金") }} {{ $t(`${c2cUser.deposit}USDT`) }}</span>
          </div>
          <div class="e-li">
            <div class="email">
              <span>{{ $t('邮箱') }}</span>
              <img v-if="party.emailAuthority" class="relative top-2" src="@/assets/image/success.png" alt="" />
              <img class="w-20 h-20 relative top-2" v-else src="~@/assets/image/c2c/no.png" alt="">
              <span>{{ $t("邮箱") }}</span>
              <img
                v-if="party.emailAuthority"
                class="relative top-2"
                src="@/assets/image/success.png"
                alt=""
              />
              <img
                class="w-20 h-20 relative top-2"
                v-else
                src="~@/assets/image/c2c/no.png"
                alt=""
              />
            </div>
            <div class="email">
              <span>{{ $t('手机') }}</span>
              <img v-if="party.phoneAuthority" class="relative top-2" src="@/assets/image/success.png" alt="" />
              <img class="w-20 h-20 relative top-2" v-else src="~@/assets/image/c2c/no.png" alt="">
              <span>{{ $t("手机") }}</span>
              <img
                v-if="party.phoneAuthority"
                class="relative top-2"
                src="@/assets/image/success.png"
                alt=""
              />
              <img
                class="w-20 h-20 relative top-2"
                v-else
                src="~@/assets/image/c2c/no.png"
                alt=""
              />
            </div>
            <div class="email">
              <span>{{ $t('身份') }}</span>
              <img v-if="party.kycAuthority" class="relative top-2" src="@/assets/image/success.png" alt="" />
              <img class="w-20 h-20 relative top-2" v-else src="~@/assets/image/c2c/no.png" alt="">
              <span>{{ $t("身份") }}</span>
              <img
                v-if="party.kycAuthority"
                class="relative top-2"
                src="@/assets/image/success.png"
                alt=""
              />
              <img
                class="w-20 h-20 relative top-2"
                v-else
                src="~@/assets/image/c2c/no.png"
                alt=""
              />
            </div>
            <div class="email">
              <span>{{ $t('高级认证') }}</span>
              <img v-if="party.kycHighlevelAuthority" class="relative top-2" src="@/assets/image/success.png" alt="" />
              <img class="w-20 h-20 relative top-2" v-else src="~@/assets/image/c2c/no.png" alt="">
              <span>{{ $t("高级认证") }}</span>
              <img
                v-if="party.kycHighlevelAuthority"
                class="relative top-2"
                src="@/assets/image/success.png"
                alt=""
              />
              <img
                class="w-20 h-20 relative top-2"
                v-else
                src="~@/assets/image/c2c/no.png"
                alt=""
              />
            </div>
          </div>
        </div>
@@ -44,75 +90,100 @@
      <div class="main-list" ref="main" :style="fullHeight">
        <div class="main-box">
          <div class="main-nav">
            <span class="info">{{ $t('信息') }}</span>
            <span class="info">{{ $t("信息") }}</span>
            <span class="gen" style="color: #868d9a" @click="linkToDetail">
              {{ $t('更多数据') }}
              {{ $t("更多数据") }}
              <img class="right" src="@/assets/image/icon-right.png" alt="" />
            </span>
          </div>
          <div class="shuju">
            <div>
              <p class="num">{{ c2cUser.thirtyDaysOrder }}</p>
              <p class="time">{{ $t('30日成单数') }}</p>
              <p class="time">{{ $t("30日成单数") }}</p>
            </div>
            <div>
              <p class="num">{{ c2cUser.thirtyDaysOrderRatio }}%</p>
              <p class="time">{{ $t('30日成单率') }}</p>
              <p class="time">{{ $t("30日成单率") }}</p>
            </div>
          </div>
          <p class="flex justify-between ping" @click="show = true">
            <span class="time">{{ $t('平均放行') }}</span>
            <span class="textColor">{{ c2cUser.thirtyDaysPassAverageTime }}{{ $t('分钟') }}</span>
            <span class="time">{{ $t("平均放行") }}</span>
            <span class="textColor"
              >{{ c2cUser.thirtyDaysPassAverageTime }}{{ $t("分钟") }}</span
            >
          </p>
          <p class="flex justify-between ping" @click="show = true">
            <span class="time">{{ $t('平均付款') }}</span>
            <span class="textColor">{{ c2cUser.thirtyDaysPayAverageTime }}{{ $t('分钟') }}</span>
            <span class="time">{{ $t("平均付款") }}</span>
            <span class="textColor"
              >{{ c2cUser.thirtyDaysPayAverageTime }}{{ $t("分钟") }}</span
            >
          </p>
        </div>
        <div class="guang">
          <p class="g-title">{{ $t('在线广告') }}</p>
          <p class="g-title">{{ $t("在线广告") }}</p>
          <!-- 
          
          <div v-show="buy.length === 0" class="g-box"></div> -->
          <div class="g-box">
            <p class="g-zai">{{ $t('在线出售广告') }}</p>
            <div v-if="advert.length === 0" class="g-data flex justify-center items-center">
            <p class="g-zai">{{ $t("在线出售广告") }}</p>
            <div
              v-if="advert.length === 0"
              class="g-data flex justify-center items-center"
            >
              <div class="text-align: center;">
                <img class="zanwu" :src="require('@/assets/image/c2c/Group1942.png')" alt="" />
                <img
                  class="zanwu"
                  :src="require('@/assets/image/c2c/Group1942.png')"
                  alt=""
                />
              </div>
            </div>
            <template v-else>
              <div class="g-data" v-for="(item, index) in advert" :key="index">
                <div class="usdt ">
                <div class="usdt">
                  <img src="@/assets/image/USDT.png" alt="" />
                  <span class="textColor">{{ item.symbol.toLocaleUpperCase() }}</span>
                  <span class="textColor">{{
                    item.symbol.toLocaleUpperCase()
                  }}</span>
                </div>
                <p>{{ $t('单价') }}</p>
                <p>{{ $t("单价") }}</p>
                <p class="g-dan textColor">
                  <span class="textColor">$</span><span class="textColor">{{ item.symbolValue }}</span>
                  <span class="textColor">$</span
                  ><span class="textColor">{{ item.symbolValue }}</span>
                </p>
                <p class="mar-9">
                  {{ $t('数量') }}<span style="color: #fff">{{ item.coinAmount }} USDT</span>
                  {{ $t("数量")
                  }}<span style="color: #fff">{{ item.coinAmount }} USDT</span>
                </p>
                <p class="mar-30">
                  {{ $t('限额') }}
                  <span style="color: #fff">${{ item.investmentMin }} - ${{ item.investmentMax }}</span>
                  {{ $t("限额") }}
                  <span style="color: #fff"
                    >${{ item.investmentMin }} - ${{ item.investmentMax }}</span
                  >
                </p>
                <div class="flex">
                  <div class="flex items-center mar-23">
                    <div class="shu-h"></div>
                    <span>{{ $t('银行卡') }}</span>
                    <span>{{ $t("银行卡") }}</span>
                  </div>
                  <div class="flex items-center">
                    <div class="shu-h" style="background: #4ba6eb"></div>
                    <span>{{ $t('币交易') }}</span>
                    <span>{{ $t("币交易") }}</span>
                  </div>
                </div>
                <div v-if="item.direction === 'sell'" class="buy" style="background: #e35461" @click="trade(item)">{{
                  $t('向Ta出售') }}</div>
                <div v-else class="buy" @click="trade(item)">{{ $t('向Ta购买') }}</div>
                <div
                  v-if="item.direction === 'sell'"
                  class="buy"
                  style="background: #e35461"
                  @click="trade(item)"
                >
                  {{ $t("向Ta出售") }}
                </div>
                <div v-else class="buy" @click="trade(item)">
                  {{ $t("向Ta购买") }}
                </div>
              </div>
            </template>
@@ -120,17 +191,27 @@
          </div>
          <p class="g-feng">
            {{ $t(' 风控提示:为了降低您的交易风险,认证广告方已向平台缴纳保证金,请放心交易。') }}
            {{
              $t(
                " 风控提示:为了降低您的交易风险,认证广告方已向平台缴纳保证金,请放心交易。"
              )
            }}
          </p>
        </div>
      </div>
    </div>
    <van-dialog v-model="show" :showConfirmButton="false" :closeOnClickOverlay="true">
    <van-dialog
      v-model="show"
      :showConfirmButton="false"
      :closeOnClickOverlay="true"
    >
      <div class="dia-main">
        <p>{{ $t('30日平均放行: 近30日卖币时收款后放币的平均确认时间。') }}</p>
        <p class="mar-70">{{ $t('30日平均放行: 近30日购买数字货币平均付款的时间。') }}</p>
        <div class="dia-btn" @click="show = false">{{ $t('好的') }}</div>
        <p>{{ $t("30日平均放行: 近30日卖币时收款后放币的平均确认时间。") }}</p>
        <p class="mar-70">
          {{ $t("30日平均放行: 近30日购买数字货币平均付款的时间。") }}
        </p>
        <div class="dia-btn" @click="show = false">{{ $t("好的") }}</div>
      </div>
    </van-dialog>
@@ -141,15 +222,15 @@
</template>
<script>
import { Icon, Dialog, Popup } from 'vant';
import { Icon, Dialog, Popup } from "vant";
import detail from "@/page/advertiserDetail/detail";
import otcApi from "@/API/otc";
import { nextTick } from 'process';
import { nextTick } from "process";
export default {
  name: 'advertiserDetail',
  props: ['uid'],
  name: "advertiserDetail",
  props: ["uid"],
  components: {
    [Icon.name]: Icon,
    [Dialog.name]: Dialog,
@@ -164,42 +245,44 @@
      userInfo: null,
      info: {
        singularNumber: 1045,
        singularBai: '99.24%',
        singularBai: "99.24%",
        release: 1.87,
        payment: 0.93,
      },
      sell: [
        {
          name: 'USDT',
          price: '0.970',
          count: '498.60',
          minCount: '200.00',
          maxCount: '483.64',
          name: "USDT",
          price: "0.970",
          count: "498.60",
          minCount: "200.00",
          maxCount: "483.64",
        },
      ],
      buy: [
        {
          name: 'USDT',
          price: '0.970',
          count: '498.60',
          minCount: '200.00',
          maxCount: '483.64',
          name: "USDT",
          price: "0.970",
          count: "498.60",
          minCount: "200.00",
          maxCount: "483.64",
        },
      ],
    }
    };
  },
  created() {
    console.log(this.uid);
    otcApi.ctcUserGet({ c2c_user_id: this.uid, language: this.$i18n.locale }).then(res => {
      this.userInfo = res.data;
    })
    otcApi
      .ctcUserGet({ c2c_user_id: this.uid, language: this.$i18n.locale })
      .then((res) => {
        this.userInfo = res.data;
      });
  },
  mounted() {
    nextTick(() => {
      setTimeout(() => {
        this.top = this.$refs.main.getBoundingClientRect().top;
      }, 1000)
    })
      }, 1000);
    });
  },
  methods: {
    linkToDetail() {
@@ -211,15 +294,15 @@
    },
    trade(item) {
      console.log(item);
      this.$store.commit('c2c/SET_DIRECTION', item.direction)
      this.$store.commit("c2c/SET_DIRECTION", item.direction);
      this.$router.push({
        name: 'c2cTrade',
        name: "c2cTrade",
        query: {
          id: item.id,
          type: item.direction,
        }
      })
    }
        },
      });
    },
  },
  computed: {
    c2cUser() {
@@ -233,11 +316,11 @@
    },
    fullHeight() {
      return {
        'height': `calc(100vh - ${this.top}px)`
      }
    }
  }
}
        height: `calc(100vh - ${this.top}px)`,
      };
    },
  },
};
</script>
<style lang="scss" scoped>
@@ -313,7 +396,7 @@
  }
}
.email>img {
.email > img {
  width: 23px;
  height: 23px;
  border-radius: 50%;
@@ -456,7 +539,7 @@
  .buy {
    width: 160px;
    height: 56px;
    background: #2EBD85;
    background: #2ebd85;
    color: #fff;
    font-size: 26px;
    text-align: center;