1
李凌
2025-10-22 5af05bde840f4617311003bb184a5828161ed1ec
1
4 files modified
146 ■■■■ changed files
src/views/homePage/index.vue 51 ●●●● patch | view | raw | blame | history
src/views/my/index.vue 64 ●●●● patch | view | raw | blame | history
src/views/register/identity.vue 25 ●●●●● patch | view | raw | blame | history
src/views/register/step.vue 6 ●●●● patch | view | raw | blame | history
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,20 +113,20 @@
_getNewsList1({
    language: useI18n().locale.value,
}).then(res => {
        getcustomer()
    getcustomer()
    announceList.value = res
})
  // onMounted(() => {
  //     getcustomer()
  // })
// onMounted(() => {
//     getcustomer()
// })
const getcustomer = () => {
  _customer().then((data) => {
      if(data.code==0){
          customer_service_url.value = data.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) => {
@@ -137,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)
}
src/views/my/index.vue
@@ -1,33 +1,34 @@
<template>
  <section class="my-index" >
  <section class="my-index">
    <!-- <fx-header  back="false" :title="$t('my')">
      <template v-slot:right>
        <van-icon name="service-o" size="24" @click="$router.push('/customerService')"></van-icon>
      </template> -->
    <!-- </fx-header> -->
    <div>
        <assets-head :goHome='true' :title="$t('my')">
        </assets-head>
    </div>
    <div>
      <assets-head :goHome='true' :title="$t('my')">
      </assets-head>
    </div>
    <div class="px-8 mt-4">
      <h1 class="text-2xl font-bold title" v-if="!(userStore.userInfo && userStore.userInfo.token)">{{
        $t('welcome')
        }}&nbsp;{{ $title }}!
      }}&nbsp;{{ $title }}!
      </h1>
      <p class="sub-text" v-if="!(userStore.userInfo && userStore.userInfo.token)">{{ $t('全球最大的区块链资产平台') }}</p>
      <p class="w-full flex mt-4 gap-x-4" v-if="!(userStore.userInfo && userStore.userInfo.token)">
        <van-button class="flex-1" round @click="onRoute('/register')">{{ $t('register') }}</van-button>
        <van-button class="flex-1" type="primary" round color="#f7b600" @click="onRoute('/login')">{{ $t('login')
          }}</van-button>
        }}</van-button>
      </p>
      <div class="mt-4 flex items-start" v-else>
        <img class="w-24 h-24" src="@/assets/image/avatar.png" alt="avatar" />
        <div class="ml-5 pt-1 flex flex-col justify-center">
          <div class="font-bold text-lg name" style="width: 200px;overflow-wrap: break-word;">{{ userStore.userInfo && userStore.userInfo.username }}</div>
          <div class="font-bold text-lg name" style="width: 200px;overflow-wrap: break-word;">{{ userStore.userInfo &&
            userStore.userInfo.username }}</div>
          <div class="text-sm text-gray-400 mt-5 flex items-center id-text">
            ID:{{ userStore.userInfo && userStore.userInfo.usercode }}<img class="w-8 h-8 ml-4"
              src="@/assets/image/idcopy.png" alt="id" @click="copy" /></div>
@@ -41,7 +42,7 @@
            <div class="label pl-2 pr-2 ml-3" :class="{ 'green': kycHighStatus == 2 }">
              {{ kycHighStatus == 2 ? $t('高级用户') : $t('普通用户') }}
            </div>
            <div class="pl-2 pr-2 ml-3" style="font-size: 12px;">{{$t('信用分')}} : {{userdata.creditScore}}</div>
            <div class="pl-2 pr-2 ml-3" style="font-size: 12px;">{{ $t('信用分') }} : {{ userdata.creditScore }}</div>
          </div>
        </div>
      </div>
@@ -56,7 +57,7 @@
            <img src="@/assets/imgs/my/安全.png" alt="">
            <div>{{ t('安全') }}</div>
          </div>
<!--          <div class="label_item flex flex-col items-center justify-center mt-8" @click="onRoute('/changePassword')">
          <!--          <div class="label_item flex flex-col items-center justify-center mt-8" @click="onRoute('/changePassword')">
            <img src="@/assets/imgs/my/密码.png" alt="">
            <div>{{ t('修改密码') }}</div>
          </div> -->
@@ -104,7 +105,7 @@
      <div class="px-4 mt-4">
        <p class="w-full flex mt-4 gap-x-4">
          <van-button type="primary" class="flex-1" round color="#f7b600" @click="loginOut">{{ $t('loginOut')
            }}</van-button>
          }}</van-button>
        </p>
      </div>
    </template>
@@ -114,7 +115,7 @@
<script setup>
import { reactive, onMounted, ref, computed } from 'vue';
import { useRouter } from 'vue-router';
import { _getIdentify, _getKycHighLevel, _logOut,_info ,_customer } from "@/service/user.api.js";
import { _getIdentify, _getKycHighLevel, _logOut, _info, _customer } from "@/service/user.api.js";
import { useUserStore } from '@/store/user';
import { useI18n } from "vue-i18n";
import useClipboard from "vue-clipboard3";
@@ -152,22 +153,23 @@
  ]
})
const onRoute = (path) => {
  if(path=='/customerService'){
      if(customer_service_url.value){
          window.location.href = customer_service_url.value;
      }else{
          router.push(path)
      }
  }else{
      router.push(path)
  if (path == '/customerService') {
    if (customer_service_url.value) {
      // window.location.href = customer_service_url.value;
      window.location.href = 'https://chatlink.ichatlinks.net/widget/standalone.html?eid=31416ce0b42869d3360f56a6d3fe4e8c&language=ja';
    } else {
      router.push(path)
    }
  } else {
    router.push(path)
  }
}
onMounted(() => {
  if (userStore.userInfo && userStore.userInfo.token) {
    getIdentify()
    getKycHighLevel()
    getinfo()
    getcustomer()
    getinfo()
    getcustomer()
  }
})
const cellList = computed(() => {
@@ -223,8 +225,8 @@
}
const getcustomer = () => {
  _customer().then((data) => {
    customer_service_url.value = data.customer_service_url
    console.log(customer_service_url);
    customer_service_url.value = data.customer_service_url
    console.log(customer_service_url);
  }).catch(error => {
    console.error('Error fetching data:', error);
  });
@@ -320,9 +322,11 @@
  .label_item {
    width: 33%;
    font-size: 12px;
    div{
        text-align: center;
    }
    div {
      text-align: center;
    }
    img {
      width: 32%;
      margin-bottom: 3px;
src/views/register/identity.vue
@@ -4,7 +4,8 @@
        <div class="header">
            <div class="flex items-center" @click="$router.go(-1)"><img
                    src="../../assets/image/assets-center/left-arrow.png" alt="" class="leftReturn" /></div>
            <div class="textColor" @click="$router.push('/gooleVerify')">{{ $t('skip') }}</div>
            <!-- <div class="textColor" @click="$router.push('/gooleVerify')">{{ $t('skip') }}</div> -->
            <div class="textColor" @click="$router.push('/finish')">{{ $t('skip') }}</div>
        </div>
        <Step :step="2"></Step>
        <div class="title textColor">{{ $t('realNameVertify') }}</div>
@@ -58,7 +59,7 @@
                        </div>
                        <div class="mt-3 font-13 h-5 textColor">{{ $t('credentObverse') }}</div>
                    </div>
                    <div class="flex-1 flex flex-col text-center justify-center items-center">
                    <!-- <div class="flex-1 flex flex-col text-center justify-center items-center">
                        <div class="upload-wrap">
                            <img src="@/assets/image/kyc/2.png" alt="" class="w-full"
                                v-if="[1, 2].includes(status) && fileList.length === 0" />
@@ -67,21 +68,13 @@
                                @click-upload="onClickUpload('fileList')" v-else />
                        </div>
                        <div class="mt-3 font-13 h-5 textColor">{{ $t('handCredent') }}</div>
                    </div>
                    </div> -->
                </div>
            </div>
            <template v-if="!disabled()">
            <!-- <template v-if="!disabled()">
                <div class="mb-4 textColor">{{ $t('photoExample') }}</div>
                <img src="@/assets/image/kyc/kyc-demo.png" alt="" style="width:100%;height:auto;" class="w-756 h-220 mb-100">
                <!-- <div class="mb-100 flex justify-center">
                    <div class="flex flex-1 justify-center">
                        <img src="../../assets/image/kyc/kyc_demo1.png" alt="" class="w-220 h-220" />
                    </div>
                    <div class="flex flex-1 justify-center">
                        <img src="../../assets/image/kyc/kyc_demo2.png" alt="" class="w-220 h-220" />
                    </div>
                </div> -->
            </template>
            </template> -->
            <van-button class="w-full" style="margin-top:10px;" type="primary" @click="onSubmit">{{ $t('nextStep') }}
            </van-button>
            <nationality-list ref='controlChildRef' :title="$t('selectNation')" @getName="getName" v-if="!disabled()">
@@ -205,7 +198,8 @@
        return
    }
    if (status.value !== 0) {
        router.push('/gooleVerify');
        // router.push('/gooleVerify');
        router.push('/finish');
    } else {
        _applyIdentify({
            name: name.value,
@@ -216,7 +210,8 @@
            countryName: countryCode.value // countryName 存储的 code, 回来再遍历
        }).then(() => {
            showToast(t('submitSuccess'))
            router.push('/gooleVerify');
            // router.push('/gooleVerify');
            router.push('/finish');
            //this.fetchInfo()
        }).catch(err => {
            console.log(err)
src/views/register/step.vue
@@ -6,13 +6,13 @@
            <div class="step" :class="step == 2 || step == 3 || step == 4 ?'green':''">2</div>
            <div class="line" :class="step == 3 || step == 4 ?'green':''"></div>
            <div class="step" :class="step == 3 || step == 4 ?'green':''">3</div>
            <div class="line" :class="step == 4 ?'green':''"></div>
            <div class="step" :class="step == 4 ?'green':''">4</div>
            <!-- <div class="line" :class="step == 4 ?'green':''"></div>
            <div class="step" :class="step == 4 ?'green':''">4</div> -->
        </div>
        <div class="stepsText textColor">
            <div>{{ $t('accountRegister') }}</div>
            <div>{{ $t('realNameVertify') }}</div>
            <div>{{ $t('safeBind') }}</div>
            <!-- <div>{{ $t('safeBind') }}</div> -->
            <div>{{ $t('toExchange') }}</div>
        </div>
    </div>