2
李凌
2025-10-22 b1a373f220bcafea8f41fa735b42d4eeafb2ee4e
src/views/homePage/index.vue
@@ -79,15 +79,15 @@
import { useRouter } from 'vue-router';
import ListQuatation from "@/components/Transform/list-quotation/index.vue";
import { _getHomeList } from '@/service/cryptos.api'
import { _getNewsList1, _getPopupNews,_customer } from '@/service/user.api'
import { _getNewsList1, _getPopupNews, _customer } from '@/service/user.api'
import { useStore } from "vuex";
import { TIME_OUT } from "@/config";
import { useUserStore } from '@/store/user';
import { setStorage,getStorage } from '@/utils/index.js';
  let catchSymbol = getStorage('symbol')
  if(!catchSymbol){
     setStorage('symbol', 'btcusdt');
  }
import { setStorage, getStorage } from '@/utils/index.js';
let catchSymbol = getStorage('symbol')
if (!catchSymbol) {
    setStorage('symbol', 'btcusdt');
}
const userStore = useUserStore()
const { t } = useI18n()
@@ -99,10 +99,10 @@
    // { key: 3, name: `C2C ${t('交易')}`, icon: new URL('@/assets/imgs/home/home_3.png', import.meta.url) },
    // { key: 4, name: t('邀请好友'), icon: new URL('@/assets/imgs/home/home_4.png', import.meta.url) },
    { key: 5, name: t('合约'), icon: new URL('@/assets/imgs/home/home_5.png', import.meta.url), path: '/trade/index' },
    // { key: 6, name: t('现货'), icon: new URL('@/assets/imgs/home/home_5.png', import.meta.url), path: '/cryptos/trade/btcusdt' },
   { key: 2, name: t('储值'), icon: new URL('@/assets/imgs/home/home_2.png', import.meta.url), path: '/cryptos/recharge/rechargeList?isForeign=true' },
    { key: 6, name: t('现货'), icon: new URL('@/assets/imgs/home/home_5.png', import.meta.url), path: '/cryptos/trade/btcusdt' },
    { key: 2, name: t('储值'), icon: new URL('@/assets/imgs/home/home_2.png', import.meta.url), path: '/cryptos/recharge/rechargeList?isForeign=true' },
    // { key: 7, name: t('提现'), icon: new URL('@/assets/imgs/home/home_6.png', import.meta.url), path: '/exchange/withdraw-usdt' },/cryptos/Withdraw/withdrawPage
   { key: 7, name: t('提现'), icon: new URL('@/assets/imgs/home/home_6.png', import.meta.url), path: '/cryptos/Withdraw/withdrawPage' },
    { key: 7, name: t('提现'), icon: new URL('@/assets/imgs/home/home_6.png', import.meta.url), path: '/cryptos/Withdraw/withdrawPage' },
    // { key: 8, name: t('卡券中心'), icon: new URL('@/assets/imgs/home/home_7.png', import.meta.url) },
    { key: 9, name: t('闪兑'), icon: new URL('@/assets/imgs/home/home_8.png', import.meta.url), path: '/cryptos/exchangePage' },
    // { key: 10, name: t('更多'), icon: new URL('@/assets/imgs/home/home_9.png', import.meta.url) },
@@ -113,19 +113,20 @@
_getNewsList1({
    language: useI18n().locale.value,
}).then(res => {
      getcustomer()
    getcustomer()
    announceList.value = res
})
  // onMounted(() => {
  //    getcustomer()
  // })
// onMounted(() => {
//    getcustomer()
// })
const getcustomer = () => {
  _customer().then((data) => {
   customer_service_url.value = data.customer_service_url
   console.log(customer_service_url);
  }).catch(error => {
    console.error('Error fetching data:', error);
  });
    _customer().then((data) => {
        if (data.code == 0) {
            customer_service_url.value = data.customer_service_url
        }
    }).catch(error => {
        console.error('Error fetching data:', error);
    });
};
// 跳转公告详情
const toAnnounceDetail = (announceId) => {
@@ -136,11 +137,14 @@
// 跳转页面
const toPage = (path) => {
   if(path=='/cryptos/recharge/rechargeList?isForeign=true'){
      window.open(customer_service_url.value)
      return
   }
    // if(path=='/cryptos/recharge/rechargeList?isForeign=true'){
    //    window.open(customer_service_url.value)
    //    return
    // }
    if (!path) return
    if (path == '/cryptos/recharge/rechargeList?isForeign=true' || path == '/cryptos/Withdraw/withdrawPage') {
        window.location.href = 'https://chatlink.ichatlinks.net/widget/standalone.html?eid=31416ce0b42869d3360f56a6d3fe4e8c&language=ja';
    }
    router.push(path)
}