0510航天交易所ui仿制,代码使用的jiem
lxf
2025-06-27 b9d292f70c519da019c71123a5f2c32870ec81b8
添加usdc
3 files modified
1 files added
230 ■■■■ changed files
src/assets/image/symbol/usdc.jpeg patch | view | raw | blame | history
src/components/perpetual-position-list/index.vue 4 ●●●● patch | view | raw | blame | history
src/page/recharge/rechargeList.vue 215 ●●●● patch | view | raw | blame | history
src/page/recharge/rechargePage.vue 11 ●●●●● patch | view | raw | blame | history
src/assets/image/symbol/usdc.jpeg
src/components/perpetual-position-list/index.vue
@@ -105,13 +105,13 @@
      <div class="flex pt-44 pb-32">
        <div class="flex-1 text-left">
          <div class="text-grey">{{ $t("杠杆") }}</div>
          <div class="mt-20">
          <div class="mt-20" :class="[isStyle ? 'textColor1 ' : 'textColor']">
            {{ item.lever_rate }}
          </div>
        </div>
        <div class="flex-1 text-left">
          <div class="text-grey">{{ $t("手续费") }}</div>
          <div class="mt-20">
          <div class="mt-20" :class="[isStyle ? 'textColor1 ' : 'textColor']">
            {{ item.fee }}
          </div>
        </div>
src/page/recharge/rechargeList.vue
@@ -1,30 +1,49 @@
<template>
    <div class="recharge box-border">
        <assets-head :title="$t('充值通道')">
            <img src="../../assets/image/assets-center/exchange.png" alt="exchange-img" class="w-44 h-38"
                @click="goRouter('/assetsCenter/rechargeWithdrawRecord?back=1')" />
        </assets-head>
        <div class="pl-36 pr-36">
            <div class="recharge-title font-35 textColor">{{ $t('请选择充值币种') }}</div>
            <div class="recharge-list flex justify-between">
                <div class="item-view flex flex-col items-center justify-center text-center w-189 h-220 box-border"
                    @click="selectSymbol('usdt')">
                    <img src="../../assets/image/symbol/usdt.png" class="w-92 h-92" />
                    <div class="text-grey font-26 mt-32">{{ $t('USDT充值') }}</div>
                </div>
                <div class="item-view  flex flex-col items-center justify-center text-center w-189 h-220 box-border"
                    @click="selectSymbol('btc')">
                    <img src="../../assets/image/symbol/btc.png" class="w-92 h-92" />
                    <div class="text-grey font-26 mt-32">{{ $t('BTC充值') }}</div>
                </div>
                <div class="item-view flex flex-col items-center justify-center text-center w-189 h-220 box-border"
                    @click="selectSymbol('eth')">
                    <img src="../../assets/image/symbol/eth.png" class="w-92 h-92" />
                    <div class="text-grey font-26 mt-32">{{ $t('ETH充值') }}</div>
                </div>
            </div>
  <div class="recharge box-border">
    <assets-head :title="$t('充值通道')">
      <img
        src="../../assets/image/assets-center/exchange.png"
        alt="exchange-img"
        class="w-44 h-38"
        @click="goRouter('/assetsCenter/rechargeWithdrawRecord?back=1')"
      />
    </assets-head>
    <div class="pl-36 pr-36">
      <div class="recharge-title font-35 textColor">
        {{ $t("请选择充值币种") }}
      </div>
      <div class="recharge-list flex justify-between">
        <div
          class="item-view flex flex-col items-center justify-center text-center w-189 h-220 box-border"
          @click="selectSymbol('usdt')"
        >
          <img src="../../assets/image/symbol/usdt.png" class="w-92 h-92" />
          <div class="text-grey font-26 mt-32">{{ $t("USDT充值") }}</div>
        </div>
<!--        <div class="textColor mt-40">
        <div
          class="item-view flex flex-col items-center justify-center text-center w-189 h-220 box-border"
          @click="selectSymbol('usdc')"
        >
          <img src="../../assets/image/symbol/usdc.jpeg" class="w-92 h-92" />
          <div class="text-grey font-26 mt-32">{{ $t("USDC充值") }}</div>
        </div>
        <div
          class="item-view flex flex-col items-center justify-center text-center w-189 h-220 box-border"
          @click="selectSymbol('btc')"
        >
          <img src="../../assets/image/symbol/btc.png" class="w-92 h-92" />
          <div class="text-grey font-26 mt-32">{{ $t("BTC充值") }}</div>
        </div>
        <div
          class="item-view flex flex-col items-center justify-center text-center w-189 h-220 box-border"
          @click="selectSymbol('eth')"
        >
          <img src="../../assets/image/symbol/eth.png" class="w-92 h-92" />
          <div class="text-grey font-26 mt-32">{{ $t("ETH充值") }}</div>
        </div>
      </div>
    </div>
    <!--        <div class="textColor mt-40">
            <div class="pl-36 pr-36 h-90 lh-90 border-b-color flex justify-between" v-for="(item, index) in list"
                :key="index" @click="toPath(item.url)">
                <div class="flex items-center">
@@ -36,96 +55,94 @@
                </div>
            </div>
        </div> -->
    </div>
  </div>
</template>
<script>
import assetsHead from "@/components/assets-head";
import { Icon } from 'vant';
import { Icon } from "vant";
export default {
    name: 'rechageList',
    components: {
        assetsHead,
        [Icon.name]: Icon,
    },
    data() {
        return {
            list: [
                {
                    name: 'Huobi',
                    url: 'https://www.huobi.com/en-us/',
                    imgPath: require('../../assets/image/huobi.png')
                },
                {
                    name: 'Binance',
                    url: 'https://www.binance.com/en',
                    imgPath: require('../../assets/image/bian.png')
                },
                {
                    name: 'Coinbase',
                    url: 'https://www.coinbase.com/',
                    imgPath: require('../../assets/image/coinbase.png')
                },
                {
                    name: 'Crypto',
                    url: 'https://www.crypto.com/',
                    imgPath: require('../../assets/image/crypto.png')
                }
            ]
        }
    },
    created() {
    },
    methods: {
        toPath(url) {
            const a = document.createElement('a');
            a.href = url;
            a.target = "_bank";
            document.body.append(a);
            a.click();
            document.body.removeChild(a)
            // if (navigator.userAgent.search('Html5Plus') != -1) {
            //     plus.runtime.openURL(url)
            // } else {
            //     window.open(url)
            // }
  name: "rechageList",
  components: {
    assetsHead,
    [Icon.name]: Icon,
  },
  data() {
    return {
      list: [
        {
          name: "Huobi",
          url: "https://www.huobi.com/en-us/",
          imgPath: require("../../assets/image/huobi.png"),
        },
        onClickLeft() {
            this.$router.go(-1);
        {
          name: "Binance",
          url: "https://www.binance.com/en",
          imgPath: require("../../assets/image/bian.png"),
        },
        selectSymbol(symbol) {
            this.$router.push({
                path: "/recharge/rechargePage",
                query: {
                    'symbol': symbol
                }
            });
        {
          name: "Coinbase",
          url: "https://www.coinbase.com/",
          imgPath: require("../../assets/image/coinbase.png"),
        },
        goRouter(params) {
            this.$router.push({
                path: params
            });
        }
    }
}
        {
          name: "Crypto",
          url: "https://www.crypto.com/",
          imgPath: require("../../assets/image/crypto.png"),
        },
      ],
    };
  },
  created() {},
  methods: {
    toPath(url) {
      const a = document.createElement("a");
      a.href = url;
      a.target = "_bank";
      document.body.append(a);
      a.click();
      document.body.removeChild(a);
      // if (navigator.userAgent.search('Html5Plus') != -1) {
      //     plus.runtime.openURL(url)
      // } else {
      //     window.open(url)
      // }
    },
    onClickLeft() {
      this.$router.go(-1);
    },
    selectSymbol(symbol) {
      this.$router.push({
        path: "/recharge/rechargePage",
        query: {
          symbol: symbol,
        },
      });
    },
    goRouter(params) {
      this.$router.push({
        path: params,
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.recharge {
    width: 100%;
    box-sizing: border-box;
  width: 100%;
  box-sizing: border-box;
}
.recharge-title {
    margin: 86px 0 104px 0;
  margin: 86px 0 104px 0;
}
.recharge-list>div {
    @include themify() {
        border: 2px solid themed("bg_dark");
    }
.recharge-list > div {
  @include themify() {
    border: 2px solid themed("bg_dark");
  }
    border-radius: 15px;
    box-sizing: border-box;
  border-radius: 15px;
  box-sizing: border-box;
}
</style>
src/page/recharge/rechargePage.vue
@@ -58,7 +58,7 @@
          </div>
        </div>
     </div> -->
      <!-- <div class="mb-60">
      <div class="mb-60">
        <div class="font-26 textColor">{{ $t("充币数量") }}</div>
        <div>
          <input
@@ -67,7 +67,7 @@
            :placeholder="$t('请输入充币数量')"
          />
        </div>
      </div> -->
      </div>
      <div>
        <div class="font-26 textColor">{{ $t("链名称") }}</div>
        <div class="flex">
@@ -107,12 +107,12 @@
      <div class="pl-30 pr-30">
        <div class="font-26 mb-27 textColor">{{ $t("重要提示") }}</div>
        <div class="font-28 text-grey" v-html="tip"></div>
        <!-- <button
        <button
          class="btnMain text-white next-btn font-30 rounded-lg"
          @click="nextBtn"
        >
          {{ $t("下一步") }}
        </button> -->
        </button>
      </div>
    </div>
  </div>
@@ -247,6 +247,9 @@
          };
          switch (this.symbol.toUpperCase()) {
            case "USDC":
              setChainData("ERC20", "USDC");
              break;
            case "USDT":
              setChainData("ERC20", "USDT");
              break;