10.10综合交易所原始源码_移动端
admin
2026-01-06 04d8c6bfd48267c7b2eaccaa03170618d83e4cbd
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<template>
  <div class="mt-5 text-28">
    <div class="nav mb-2">
      <div v-for="(item, index) in navList" :key="index" class="list" @click="goPath(item.path, item.isLogin)">
        <div class="imgBox"><img :src="handleImage(item.icon)" alt=""></div>
        <div class="mt-1 text-center">{{ item.name }}</div>
      </div>
    </div>
    <div class="nav mb-2">
      <div v-for="(item, index) in navList1" :key="index" class="list" @click="goPath(item.path, item.isLogin)">
        <div class="imgBox"><img :src="handleImage(item.icon)" alt="" v-if="item.icon"></div>
        <div class="mt-4 text-center">{{ item.name }}</div>
      </div>
    </div>
  </div>
</template>
 
<script>
import { mapGetters } from 'vuex'
import { themeStore } from '@/store/theme';
const thStore = themeStore()
export default {
  props: {
 
  },
  components: {
 
  },
  computed: {
    ...mapGetters('user', ['userInfo']),
  },
  data() {
    return {
      navList: [
        {
          name: this.$t('闪兑'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/exchange.png`, import.meta.url),
          path: '/cryptos/exchangePage',
          isLogin: true
        },
        {
          name: this.$t('账变记录'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/record.png`, import.meta.url),
          path: '/cryptos/accountChange?type=cryptos',
          isLogin: true
        },
        // {
        //   name: this.$t('现货账户'),
        //   icon: `../../../assets/theme/dark/image/nav/account.png`,
        //   path: '/cryptos/funds'
        // },
        {
          name: this.$t('SpotTrading'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/coin.png`, import.meta.url),
          path: '/cryptos/trade/btc'
        },
        {
          name: this.$t('永续合约'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/trading.png`, import.meta.url),
          path: '/cryptos/perpetualContract/btc?type=cryptos'
        },
        {
          name: this.$t('交割合约'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/delivery.png`, import.meta.url),
          path: '/cryptos/perpetualContract/btc?selectIndex=2&type=cryptos'
        },
 
      ],
      navList1: [
        {
          name: this.$t('资金'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/asset.png`, import.meta.url),
          path: '/cryptos/funds?type=cryptos',
          isLogin: true
        },
        {
          name: this.$t('基金理财'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/financialmanagement.png`, import.meta.url),
          path: '/cryptos/fund'
        },
        {
          name: this.$t('智能矿池'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/SmartKuangchi.png`, import.meta.url),
          path: '/cryptos/machine'
        },
        // {
        //   name: this.$t('质押借币'),
        //   icon: new URL('@/assets/theme/dark/image/nav/PledgeLoan.png', import.meta.url),
        //   path: '/cryptos/pledgeLoan'
        // },
        // {
        //   name: this.$t('助力贷'),
        //   icon: new URL('@/assets/theme/dark/image/nav/Helpoan.png', import.meta.url),
        //   path: '/cryptos/loan'
        // },
        {
          name: this.$t('C2C'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/c2c.png`, import.meta.url),
          path: '/cryptos/wantBuy'
        },
        // { name: this.$t('助力贷'), icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/Helpoan.png`, import.meta.url), path: '/cryptos/loan' },
        {
          name: this.$t('更多'),
          icon: new URL(`../../../assets/theme/${thStore.theme}/image/nav/more.png`, import.meta.url),
          path: '/more'
        }
      ]
    }
  },
  methods: {
    handleImage(url) {
      return new URL(url, import.meta.url).href
    },
    goPath(path, isLogin) {
      if (!path) {
        return
      } else if (isLogin) {
        if (!this.userInfo.token) {
          this.$router.push('/login')
        } else {
          this.$router.push(path)
        }
      } else {
        this.$router.push(path)
      }
    }
  }
}
</script>
 
<style lang="scss" scoped>
#cryptos {
  .nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 26px;
    color: #21262F;
  }
 
  .list {
    display: flex;
    flex-direction: column;
    align-items: center;
    // margin-right: 50px;
    width: 20%;
    color: $text_color;
 
    &:last-child {
      margin-right: 0px;
    }
 
    .text-center {
      height: 70px;
      word-wrap: break-word;
      white-space: normal;
      width: 100%;
      line-height: 30px;
      text-align: center;
    }
  }
 
  .imgBox {
    width: 90px;
    height: 90px;
 
    img {
      width: 100%;
      height: 100%;
    }
  }
}
</style>