| | |
| | | <div class="pl-33 pr-33 total_wrap"> |
| | | <div class="flex justify-between text-grey relative"> |
| | | <div class="flex"> |
| | | <span class="text-grey font-30">{{ $t('总资产') }}(USDT)</span> |
| | | <span class="text-grey font-30">{{ $t("总资产") }}(USDT)</span> |
| | | <div @click.stop="changeEyes"> |
| | | <img :src="require('../../assets/image/assets-center/eye-open.png')" class="w-32 h-18" v-show="!eyetel" /> |
| | | <img :src="require('../../assets/image/assets-center/eye-close.png')" class="w-32 h-18" v-show="eyetel" /> |
| | | <img |
| | | :src="require('../../assets/image/assets-center/eye-open.png')" |
| | | class="w-32 h-18" |
| | | v-show="!eyetel" |
| | | /> |
| | | <img |
| | | :src="require('../../assets/image/assets-center/eye-close.png')" |
| | | class="w-32 h-18" |
| | | v-show="eyetel" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="right-clock" @click="goRouter('/exchange/exchangeHistory')"> |
| | | <img :src="require('../../assets/image/assets-center/Subtract.png')" class="w-44 h-38" /> |
| | | <img |
| | | :src="require('../../assets/image/assets-center/Subtract.png')" |
| | | class="w-44 h-38" |
| | | /> |
| | | </div> |
| | | </div> |
| | | <div class="font-700 font-66 mt-18 textColor" v-if="!eyetel"> |
| | | {{ funds.money_all_coin || '--' }} |
| | | <span class="font-40 text-grey">≈{{ currency.currency_symbol |
| | | }}{{ |
| | | funds.money_all_coin |
| | | ? (funds.money_all_coin * currency.rate).toFixed(2) |
| | | : ' --' |
| | | }}</span> |
| | | {{ funds.money_all_coin || "--" }} |
| | | <span class="font-40 text-grey" |
| | | >≈{{ currency.currency_symbol |
| | | }}{{ |
| | | funds.money_all_coin |
| | | ? (funds.money_all_coin * currency.rate).toFixed(2) |
| | | : " --" |
| | | }}</span |
| | | > |
| | | </div> |
| | | <div class="font-70 font-66 mt-18 textColor" v-else>********</div> |
| | | </div> |
| | | <div class="pl-33 pr-33 btn-box flex justify-between"> |
| | | <div class="text-white font-25 textColor tabBackground" @click="goRouter('/recharge/rechargeList')"> |
| | | <div |
| | | class="text-white font-25 textColor tabBackground" |
| | | @click="goRouter('/recharge/rechargePage?symbol=usdt')" |
| | | > |
| | | <div class="word-wrap"> |
| | | <img :src="require(`@/assets/theme/${theme}/image/assets/up.png`)" alt="" /> |
| | | <span> {{ $t('充币') }}</span> |
| | | <img |
| | | :src="require(`@/assets/theme/${theme}/image/assets/up.png`)" |
| | | alt="" |
| | | /> |
| | | <span> {{ $t("充币") }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="text-white font-25 textColor tabBackground" @click="withdrawBtn"> |
| | | <div |
| | | class="text-white font-25 textColor tabBackground" |
| | | @click="withdrawBtn" |
| | | > |
| | | <div class="word-wrap"> |
| | | <img :src="require(`@/assets/theme/${theme}/image/assets/down.png`)" alt="" /> |
| | | <span>{{ $t('提币') }}</span> |
| | | <img |
| | | :src="require(`@/assets/theme/${theme}/image/assets/down.png`)" |
| | | alt="" |
| | | /> |
| | | <span>{{ $t("提币") }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="text-white font-25 textColor tabBackground" @click="goRouter('/exchange/exchangePage')"> |
| | | <div |
| | | class="text-white font-25 textColor tabBackground" |
| | | @click="goRouter('/exchange/exchangePage')" |
| | | > |
| | | <div class="word-wrap"> |
| | | <img :src="require(`@/assets/theme/${theme}/image/assets/l_r.png`)" alt="" /> |
| | | <span>{{ $t('闪兑') }}</span> |
| | | <img |
| | | :src="require(`@/assets/theme/${theme}/image/assets/l_r.png`)" |
| | | alt="" |
| | | /> |
| | | <span>{{ $t("闪兑") }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="divider-line"></div>--> |
| | | <div class="pl-30 pr-30"> |
| | | <div class="assets-content-title font-35 titleColor"> |
| | | {{ $t('投资组合') }} |
| | | {{ $t("投资组合") }} |
| | | </div> |
| | | <div class="assets-list font-30" v-for="(item, index) in list" :key="index"> |
| | | <div |
| | | class="assets-list font-30" |
| | | v-for="(item, index) in list" |
| | | :key="index" |
| | | > |
| | | <div class="flex justify-between"> |
| | | <div class="flex items-center"> |
| | | <img :src="item.symbol |
| | | ? `${HOST_URL}/symbol/${item.symbol}.png` |
| | | : require('@/assets/loading-default.png') |
| | | " class="w-72 h-72 rounded-full" /> |
| | | <img |
| | | :src=" |
| | | item.symbol |
| | | ? `${HOST_URL}/symbol/${item.symbol}.png` |
| | | : require('@/assets/loading-default.png') |
| | | " |
| | | class="w-72 h-72 rounded-full" |
| | | /> |
| | | <div class="text-grey symbol-name font-30 textColor2"> |
| | | {{ item.symbol.toUpperCase() }}/USDT |
| | | </div> |
| | | </div> |
| | | <div class="flex-col font-30 text-right" v-if="!eyetel"> |
| | | <div class="textColor" v-if="item.symbol == 'btc'"> |
| | | {{ item.volume.toFixed(8) || '0.0' }} |
| | | {{ item.volume.toFixed(8) || "0.0" }} |
| | | </div> |
| | | <div class="textColor" v-else-if="item.symbol == 'eth'"> |
| | | {{ item.volume.toFixed(8) || '0.0' }} |
| | | {{ item.volume.toFixed(8) || "0.0" }} |
| | | </div> |
| | | <div class="textColor" v-else-if="item.symbol == 'usdt'"> |
| | | {{ item.volume.toFixed(2) || '0.0' }} |
| | | {{ item.volume.toFixed(2) || "0.0" }} |
| | | </div> |
| | | <div class="textColor" v-else> |
| | | {{ item.volume.toFixed(8) || '0.0' }} |
| | | {{ item.volume.toFixed(8) || "0.0" }} |
| | | </div> |
| | | <div class="text-grey font-30 font-400 mb-0"> |
| | | ≈{{ currency.currency_symbol }} |
| | | {{ item.usdt ? item.usdt.toFixed(2) : '0.0' }} |
| | | {{ item.usdt ? item.usdt.toFixed(2) : "0.0" }} |
| | | </div> |
| | | </div> |
| | | <div class="flex-col font-30 text-right" v-else> |
| | |
| | | <div class="flex justify-between mt-40 pl-94"> |
| | | <template> |
| | | <div class="flex-col font-30" v-if="!eyetel"> |
| | | <div class="text-grey">{{ $t('可用') }}</div> |
| | | <div class="text-grey">{{ $t("可用") }}</div> |
| | | <div class="textColor" v-if="item.symbol == 'btc'"> |
| | | {{ item.usable.toFixed(8) || '0.0' }} |
| | | {{ item.usable.toFixed(8) || "0.0" }} |
| | | </div> |
| | | <div class="textColor" v-else-if="item.symbol == 'eth'"> |
| | | {{ item.usable.toFixed(8) || '0.0' }} |
| | | {{ item.usable.toFixed(8) || "0.0" }} |
| | | </div> |
| | | <div class="textColor" v-else-if="item.symbol == 'usdt'"> |
| | | {{ item.usable.toFixed(2) || '0.0' }} |
| | | {{ item.usable.toFixed(2) || "0.0" }} |
| | | </div> |
| | | <div class="textColor" v-else> |
| | | {{ item.usable.toFixed(8) || '0.0' }} |
| | | {{ item.usable.toFixed(8) || "0.0" }} |
| | | </div> |
| | | </div> |
| | | <div class="flex-col font-30" v-else> |
| | | <div class="text-grey">{{ $t('可用') }}</div> |
| | | <div class="text-grey">{{ $t("可用") }}</div> |
| | | <div class="textColor"> |
| | | {{ currency.currency_symbol }} ******** |
| | | </div> |
| | |
| | | </template> |
| | | <template> |
| | | <div class="flex-col font-30" v-if="!eyetel"> |
| | | <div class="text-grey">{{ $t('锁仓') }}</div> |
| | | <div class="text-grey">{{ $t("锁仓") }}</div> |
| | | <div class="textColor" v-if="item.symbol === 'btc'"> |
| | | {{ item.lock_amount.toFixed(8) || '0.0' }} |
| | | {{ item.lock_amount.toFixed(8) || "0.0" }} |
| | | </div> |
| | | <div class="textColor" v-else-if="item.symbol === 'eth'"> |
| | | {{ item.lock_amount.toFixed(8) || '0.0' }} |
| | | {{ item.lock_amount.toFixed(8) || "0.0" }} |
| | | </div> |
| | | <div class="textColor" v-else-if="item.symbol == 'usdt'"> |
| | | {{ item.lock_amount.toFixed(2) || '0.0' }} |
| | | {{ item.lock_amount.toFixed(2) || "0.0" }} |
| | | </div> |
| | | <div class="textColor" v-else> |
| | | {{ item.lock_amount.toFixed(8) || '0.0' }} |
| | | {{ item.lock_amount.toFixed(8) || "0.0" }} |
| | | </div> |
| | | </div> |
| | | <div class="flex-col font-30" v-else> |
| | | <div class="text-grey">{{ $t('锁仓') }}</div> |
| | | <div class="text-grey">{{ $t("锁仓") }}</div> |
| | | <div class="textColor"> |
| | | {{ currency.currency_symbol }} ******** |
| | | </div> |
| | |
| | | </template> |
| | | <template> |
| | | <div class="flex-col font-30 text-right" v-if="!eyetel"> |
| | | <div class="text-grey">{{ $t('冻结') }}</div> |
| | | <div class="text-grey">{{ $t("冻结") }}</div> |
| | | <div class="textColor" v-if="item.symbol == 'btc'"> |
| | | {{ (item.frozenAmount + item.freeze_amount).toFixed(8) || '0.0' }} |
| | | {{ |
| | | (item.frozenAmount + item.freeze_amount).toFixed(8) || "0.0" |
| | | }} |
| | | </div> |
| | | <div class="textColor" v-else-if="item.symbol == 'eth'"> |
| | | {{ (item.frozenAmount + item.freeze_amount).toFixed(8) || '0.0' }} |
| | | {{ |
| | | (item.frozenAmount + item.freeze_amount).toFixed(8) || "0.0" |
| | | }} |
| | | </div> |
| | | <div class="textColor" v-else-if="item.symbol == 'usdt'"> |
| | | {{ (item.frozenAmount + item.freeze_amount).toFixed(2) || '0.0' }} |
| | | {{ |
| | | (item.frozenAmount + item.freeze_amount).toFixed(2) || "0.0" |
| | | }} |
| | | </div> |
| | | <div class="textColor" v-else> |
| | | {{ (item.frozenAmount + item.freeze_amount).toFixed(8) || '0.0' }} |
| | | {{ |
| | | (item.frozenAmount + item.freeze_amount).toFixed(8) || "0.0" |
| | | }} |
| | | </div> |
| | | </div> |
| | | <div class="flex-col font-30 text-right" v-else> |
| | | <div class="text-grey">{{ $t('冻结') }}</div> |
| | | <div class="text-grey">{{ $t("冻结") }}</div> |
| | | <div class="textColor"> |
| | | {{ currency.currency_symbol }} ******** |
| | | </div> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { _getAllWallet } from '@/API/fund.api'; |
| | | import { Dialog } from 'vant'; |
| | | import { mapGetters } from 'vuex'; |
| | | import { HOST_URL } from '@/config'; |
| | | import { _getAllWallet } from "@/API/fund.api"; |
| | | import { Dialog } from "vant"; |
| | | import { mapGetters } from "vuex"; |
| | | import { HOST_URL } from "@/config"; |
| | | export default { |
| | | name: 'Assets', |
| | | name: "Assets", |
| | | components: { |
| | | [Dialog.name]: Dialog |
| | | [Dialog.name]: Dialog, |
| | | }, |
| | | props: ['funds', 'tab'], |
| | | props: ["funds", "tab"], |
| | | computed: { |
| | | ...mapGetters('home', ['currency', 'theme']) |
| | | ...mapGetters("home", ["currency", "theme"]), |
| | | }, |
| | | data() { |
| | | return { |
| | | HOST_URL, |
| | | list: [], |
| | | total: '', |
| | | status: '', //身份认证状态 0已申请未审核,1审核中,2审核通过,3审核未通过 |
| | | total: "", |
| | | status: "", //身份认证状态 0已申请未审核,1审核中,2审核通过,3审核未通过 |
| | | eyetel: false, |
| | | active: 0 |
| | | active: 0, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | this.$router.go(-1); |
| | | }, |
| | | goRouter(parmas) { |
| | | if (parmas === '/exchange/exchangeHistory') { |
| | | if (parmas === "/exchange/exchangeHistory") { |
| | | this.$router.push({ path: parmas, query: { type: 1 } }); |
| | | } else { |
| | | this.$router.push(parmas); |
| | |
| | | if (a == b) { |
| | | return; |
| | | } |
| | | if (type == 'up') { |
| | | if (type == "up") { |
| | | return b - a; //升序 |
| | | } else if (type == 'down') { |
| | | } else if (type == "down") { |
| | | return a - b; //降序 |
| | | } else { |
| | | return a - b; |
| | |
| | | getList() { |
| | | _getAllWallet().then((res) => { |
| | | let list = res.extends; |
| | | this.list = [...list].sort(this.compare('usdt', 'up')); |
| | | this.list = [...list].sort(this.compare("usdt", "up")); |
| | | }); |
| | | }, |
| | | changeEyes() { |
| | | this.eyetel = !this.eyetel; |
| | | }, |
| | | beforeClose(action, done) { |
| | | if (action === 'confirm') { |
| | | if (action === "confirm") { |
| | | setTimeout(done, 1000); |
| | | } else { |
| | | done(); |
| | |
| | | // }); |
| | | // } |
| | | this.$router.push({ |
| | | path: '/withdraw/withdrawPage' |
| | | path: "/withdraw/withdrawPage", |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | margin-top: 44px; |
| | | } |
| | | |
| | | .btn-box>div { |
| | | .btn-box > div { |
| | | width: 234px; |
| | | padding: 20px 15px; |
| | | box-sizing: border-box; |
| | |
| | | margin-bottom: 70px; |
| | | } |
| | | |
| | | .assets-list>div { |
| | | .assets-list > div { |
| | | display: flex; |
| | | } |
| | | |
| | | .assets-list>div:nth-child(2) div:nth-child(1) { |
| | | .assets-list > div:nth-child(2) div:nth-child(1) { |
| | | margin-bottom: 16px; |
| | | font-size: 30px; |
| | | font-weight: 700; |