1
lxf
2025-07-15 59269b6839c57aeb0d547dfd6da38157180483fd
src/views/optional/index.vue
@@ -4,17 +4,20 @@
    <div class="text-17 font-medium block">{{ t('总额') }}</div>
    <div class="text-34 font-medium block">{{symbol}}</div>
    <div class="flex items-center mt-20">
      <div class="flex items-center rounded-14 bg-#3640f0 px-10">
      <div class="flex items-center rounded-14 bg-#3640f0 px-10" @click="goTo('/cryptos/recharge/rechargeList')">
        <div class="text-13 font-bold">{{ t('充值') }}</div>
      </div>
      <div class="flex items-center rounded-14 bg-#3640f0 px-10 ml-10">
      <div class="flex items-center rounded-14 bg-#3640f0 px-10 ml-10" @click="goTo('/cryptos/withdraw/withdrawPage')">
        <div class="text-13 font-bold">{{ t('提现') }}</div>
      </div>
      <div class="flex items-center rounded-14 bg-#3640f0 px-10 ml-10">
      <div class="flex items-center rounded-14 bg-#3640f0 px-10 ml-10" @click="goTo('/cryptos/exchangePage')">
        <div class="text-13 font-bold">{{ t('兑换') }}</div>
      </div>
     <div class="flex items-center rounded-14 bg-#3640f0 px-10 ml-10" @click="goTo('/cryptos/funds')">
       <div class="text-13 font-bold">{{ t('资产') }}</div>
     </div>
      <div class="flex flex-1 justify-end">
        <img src="@/assets/imgs/icon-order.png" class="w-14 h-15" draggable="false">
        <!-- <img src="@/assets/imgs/icon-order.png" class="w-14 h-15" draggable="false"> -->
      </div>
    </div>
  </div>
@@ -35,15 +38,15 @@
    <div class="text-12 pt-10">
      <div class="flex justify-between items-center">
        <div style="color: rgb(150, 150, 150);">{{t('可用')}}({{ currency.name }})</div>
        <div class="title text-blue-600">{{ currency.mark_price }}</div>
        <div class="title text-blue-600">{{ currency.usable }}</div>
      </div>
      <div class="my-16 flex justify-between items-center">
        <div style="color: rgb(150, 150, 150);">{{ t('处理中') }}({{ currency.name }})</div>
        <div>{{ 0 }}</div>
        <div>{{ currency.freeze_amount }}</div>
      </div>
      <div class="flex justify-between items-center">
        <div style="color: rgb(150, 150, 150);">{{ t('转换') }}(USDT)</div>
        <div></div>
        <div>{{ currency.usdt }}</div>
      </div>
    </div>
  </div>
@@ -56,9 +59,11 @@
<script setup>
import { ref, onMounted } from 'vue';
import { _getContractBySymbolType, _contractOrder } from '@/service/etf.api';
import { _getAllWallet } from '@/service/fund.api';
import { useI18n } from "vue-i18n";
import {useRouter} from 'vue-router';
const { t } = useI18n()
const router = useRouter();
onMounted(() => {
  getSymbol();
@@ -79,18 +84,23 @@
    symbol.value = response.money_contract || symbol.value;
};
const goTo = (url) => {
  router.push(url);
}
const getOrderList = async () => {
  const params = {
    type: 'orders',
    page_no: 1,
    page_size: 'all',
    // type: 'orders',
    // page_no: 1,
    // page_size: 'all',
    symbolType: 'cryptos'
  };
  const response = await _contractOrder(params);
  const response = await _getAllWallet(params);
    console.log(response, 'response')
    // 处理订单数据
    currencies.value = response
    currencies.value = response.extends
};
</script>