dcc
2024-06-13 cfdf967764dc6747a7b414b33fb993aeede1294d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<template>
  <div class="asset-box">
    <div class="assets-title flex-row-center">
      <p>{{ $t("message.user.zongzicanguzhi") }}</p>
      <div class="margin-left10 mouse-cursor" @click.stop="smallEyes">
        <img
          src="../../../assets/myImages/icon-image/wallet-overview/eyeClose.png"
          style="width: 28px;height: 28px;"
          v-show="eyetel"
        />
        <img
          src="../../../assets/myImages/icon-image/wallet-overview/eyeOpen.png"
          style="width: 28px;height: 28px;"
          v-show="!eyetel"
        />
      </div>
    </div>
    <div class="assets-size" v-if="!eyetel">
      <span class="assets-black">{{ total }}</span>
      <span class="assets-grey">≈ $ {{ total }}</span>
    </div>
    <div class="assets-size" v-else>
      <span class="assets-black">********</span>
      <span class="assets-grey">≈ $ ********</span>
    </div>
  </div>
</template>
 
<script>
import Axios2 from "@/api/wallet.js";
export default {
  props: {
    pageType: {
      type: String,
      default: "etf", //页面类型
    },
    paramsType: {
      type: String,
      default: "indices", //
    },
  },
  data() {
    return {
      total: 0,
      eyetel: false,
    };
  },
  mounted() {
    this.getAssetsAll();
  },
  methods: {
    getAssetsAll() {
      Axios2.getAllAssets({}).then((res) => {
        if (res.code == 0) {
          if (this.pageType === "financial") {
            // const { money_miner, money_finance } = res.data?.all;
            // this.total = Number(money_miner) + Number(money_finance);
            this.total = res.data.total
            return;
          }
          // this.total = res.data?.[this.paramsType]?.symbol_type_asserts;
          this.total = res.data.total
        }
      });
    },
    smallEyes() {
      this.eyetel = !this.eyetel;
    },
  },
};
</script>