1
李凌
5 days ago 349c48e168b9f2580334422228acde7d1b21bede
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
<template>
  <div class="order-list">
    <div
      class="order-card contBackground"
      v-for="(item, index) in list"
      :key="index"
      @click="handleGoOrderDetail(item)"
    >
      <div class="order-card-main">
        <img
          v-if="type == 0"
          :src="item.img ? item.img : '../../page/financialManagement/images/fund5.png'"
          alt=""
          class="order-thumb"
        />
        <img
          v-else
          :src="item.img ? item.img : '../../page/financialManagement/images/machine_fpga.png'"
          alt=""
          class="order-thumb"
        />
        <div class="order-info">
          <div class="order-name textColor" v-if="type == 0">
            {{ $i18n.locale === 'CN' ? item.financeName_cn : ($i18n.locale === 'zh-CN' ? item.financeName : item.financeName_en) }}
          </div>
          <div class="order-name textColor" v-else>
            {{ $i18n.locale === 'CN' ? item.miner_name_cn : ($i18n.locale === 'zh-CN' ? item.miner_name : item.miner_name_en) }}
          </div>
          <div class="order-meta textColor1">
            {{ $t('数量') }}
            <span class="textColor">{{ item.amount }}</span>
            {{ item.buyCurrency ? item.buyCurrency.toUpperCase() : 'USDT' }}
          </div>
          <div class="order-meta textColor1">
            {{ type == 0 ? $t('周期') : (isMinerTest(item.test) ? $t('周期') : $t('可解锁周期')) }}
            <span class="textColor">
              {{ item.cycle == 0 ? $t('无限期') : item.cycle + (type == 0 || isMinerTest(item.test) ? $t('天') : $t('分钟')) }}
            </span>
          </div>
        </div>
      </div>
      <div class="order-profit">
        <div class="profit-num" :class="item.profit / 1 >= 0 ? 'text-green' : 'text-red'">
          {{ (item.profit / 1).toFixed(2) }}
        </div>
        <div class="profit-label textColor">
          {{ $t('累计收益') }}({{ item.outputCurrency ? item.outputCurrency.toUpperCase() : 'USDT' }})
        </div>
        <van-icon class="order-arrow textColor" name="arrow" />
      </div>
    </div>
  </div>
</template>
 
<script>
import { Icon } from 'vant'
import { isMinerTest } from '@/utils/index.js'
 
export default {
  name: 'financialList',
  props: ['list', 'btnShow', 'goBack', 'type'],
  components: {
    [Icon.name]: Icon
  },
  methods: {
    isMinerTest,
    handleGoOrderDetail(item) {
      if (this.type === 0) {
        this.$router.push({
          path: '/cryptos/financialOrder',
          query: {
            order_no: item.order_no,
            showBtn: this.btnShow,
            id: item.id,
            goBack: true
          }
        })
      } else {
        this.$router.push({
          path: '/cryptos/miningMachineOrder',
          query: {
            order_no: item.order_no,
            showBtn: this.btnShow,
            goBack: true
          }
        })
      }
    }
  }
}
</script>
 
<style scoped lang="scss">
.order-list {
  padding: 0 32px 24px;
}
 
.order-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  padding: 28px 24px;
  border-radius: 20px;
}
 
.order-card-main {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
 
.order-thumb {
  width: 120px;
  height: 120px;
  margin-right: 24px;
  flex-shrink: 0;
  object-fit: contain;
}
 
.order-info {
  flex: 1;
  min-width: 0;
}
 
.order-name {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}
 
.order-meta {
  margin-top: 16px;
  font-size: 30px;
  line-height: 1.4;
}
 
.order-profit {
  position: relative;
  flex-shrink: 0;
  padding-right: 36px;
  text-align: center;
}
 
.profit-num {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.2;
}
 
.profit-label {
  margin-top: 12px;
  font-size: 26px;
  line-height: 1.3;
  max-width: 180px;
}
 
.order-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
}
</style>