交易所前端蓝色ui, 4.5 jiem
jhzh
2024-04-08 67357c691325dc3cf743267f1ef0e1f5c93d7528
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<template>
  <div class="poolLock">
    <assets-head :title="$t('矿池锁仓')"></assets-head>
    <div class="px-32 pb-40">
      <div class="swiper">
        <div class="flex items-center ">
          <!-- <img class="w-128 h-128" src="./images/machine1.png" alt=""> -->
          <img class="w-128 h-128" :src="require(`@/page/financialManagement/images/${ImageStyle(data.mine_index)}.png`)"
            alt="">
          <span class="ml-28 text-white font-600 font-52">
            <template v-if="$i18n.locale === 'CN'">
              {{ data.name_cn }}
            </template>
            <template v-if="$i18n.locale === 'zh-CN'">
              {{ data.name }}
            </template>
            <template v-else>
              {{ data.name_en }}
            </template>
          </span>
        </div>
        <div class="mt-50 flex">
          <div class="flex flex-col items-start">
            <span class="font-26 text-grey h-60">{{ $t('适用算法') }}</span>
            <span class="font-40 font-700 text-white mt-16">{{ data.algorithm }}</span>
          </div>
          <div class="flex flex-col items-start ml-60">
            <span class="font-26 text-grey h-60">{{ $t('官方功耗') }}</span>
            <span class="font-40 font-700 text-white mt-16">{{ data.power }}w</span>
          </div>
          <div class="flex flex-col items-start ml-60">
            <span class="font-26 text-grey h-60">{{ $t('额定算力') }}</span>
            <span class="font-40 font-700 text-white mt-16">{{ data.computing_power + data.computing_power_unit }}</span>
          </div>
        </div>
      </div>
      <div class="mt-60 mb-20 text-black font-30 textColor">{{ $t('挖矿收益') }}</div>
      <div class="mb-40">
        <div class="flex greyBg textColor font-26 py-26">
          <span class="flex-1 text-center">{{ $t('币种') }}</span>
          <span class="flex-1 text-center">{{ $t('预计日收益') }}</span>
          <!-- <span class="flex-1 text-center">{{$t('净利润/天')}}</span> -->
          <span class="flex-1 text-center">{{ $t('预计净利润') }}</span>
          <span class="flex-1 text-center">{{ $t('操作') }}</span>
        </div>
        <div class="borderColor flex mainBackground font-26 py-26 textColor">
          <span class="flex-1 flex items-center justify-center">{{ data.miner_profit_symbol }}</span>
          <span class="flex-1 flex items-center justify-center">{{ data.daily_rate }}{{ data.test === true ? '' : '%'
          }}</span>
          <!-- <span class="flex-1 flex items-center justify-center text-green">{{ data.all_rate }}</span> -->
          <span class="flex-1 flex items-center justify-center text-green">{{
            calcMiniProfit(data.test, data.daily_rate, data.investment_min, data.investment_max) }}</span>
          <span class="flex-1 flex justify-center">
            <div @click="data.on_sale === '0' ? null : $router.push({
              path: '/machine-buy',
              //query: data
              query: { obj: JSON.stringify(data) }
            })" class="btn w-160 h-60 text-center text-white" :class="data.on_sale === '0' ? 'inactive' : 'active'">
              {{ data.on_sale === '0' ? $t('已锁定') : data.test === true ? $t('体验') : $t('租用') }}
            </div>
          </span>
        </div>
        <div class="mt-44 mb-20 text-black font-30 textColor">{{ $t('基础数据') }}</div>
        <div>
          <div class="borderColor flex justify-between items-center font-30 py-34 px-34">
            <span class="text-grey">{{ $t('生产厂家') }}</span>
            <span class="textColor">{{ data.product_factory }}</span>
          </div>
          <div class="border-round flex justify-between items-center font-30 py-34 px-34">
            <span class="text-grey">{{ $t('额定算力') }}</span>
            <span class="textColor">{{ data.computing_power + data.computing_power_unit }}</span>
          </div>
          <div class="border-round flex justify-between items-center font-30 py-34 px-34">
            <span class="text-grey">{{ $t('墙上功耗') }}</span>
            <span class="textColor">{{ data.power }}</span>
          </div>
          <div class="border-round flex justify-between items-center font-30 py-34 px-34">
            <span class="text-grey">{{ $t('外箱尺寸') }}</span>
            <span class="textColor">{{ data.product_size }}</span>
          </div>
          <div class="border-round flex justify-between items-center font-30 py-34 px-34">
            <span class="text-grey">{{ $t('整机重量') }}</span>
            <span class="textColor">{{ data.weight }}KG</span>
          </div>
          <div class="border-round flex justify-between items-center font-30 py-34 px-34">
            <span class="text-grey">{{ $t('工作温度') }}</span>
            <span class="textColor">{{ data.work_temperature_min }}℃ ~ {{ data.work_temperature_max }}℃</span>
          </div>
          <div class="border-round flex justify-between items-center font-30 py-34 px-34">
            <span class="text-grey">{{ $t('工作湿度') }}</span>
            <span class="textColor">{{ data.work_humidity_min }}%RH ~ {{ data.work_humidity_max }}%RH</span>
          </div>
          <div class="border-round flex justify-between items-center font-30 py-34 px-34">
            <span class="text-grey">{{ $t('网络链接') }}</span>
            <span class="textColor">{{ data.internet }}</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
import assetsHead from "@/components/assets-head";
export default {
  name: "PooLock",
  data() {
    return {
      data: {}
    }
  },
  components: {
    assetsHead,
  },
  created() {
    //this.data = this.$route.query;
    this.data = this.$route.query.obj && JSON.parse(this.$route.query.obj)
  },
  methods: {
    calcMiniProfit(test, daily_rate, invest_min, invest_max) {
      if (test) {
        return daily_rate;
      }
      let daily_base = daily_rate * 0.01;
      let daily_min = (daily_base * invest_min).toFixed(1);
      let daily_max = (daily_base * invest_max).toFixed(1);
      return daily_min + '-' + daily_max;
    },
    ImageStyle(index_id) {
      switch (index_id) {
        case 1: {
          return 'machine_asic'
        }
        case 2: {
          return 'machine_ex'
        }
        case 3: {
          return 'machine_fpga'
        }
        case 4: {
          return 'machine_ipfs'
        }
        case 5: {
          return 'machine_gpu'
        }
        case 6: {
          return 'machine_ck6'
        }
        case 0:
        default: {
          return 'machine1'
        }
      }
    }
  }
}
</script>
 
<style lang="scss" scoped>
.active {
  background: #1194F7;
}
 
.inactive {
  background: #474B62;
}
 
.poolLock {
  width: 100%;
  box-sizing: border-box;
}
 
.swiper {
  background: url("./images/machine-bg.png") no-repeat center center;
  padding: 32px 32px 50px 32px;
  box-sizing: border-box;
  border-radius: 9px;
}
 
.btn {
  border-radius: 6px;
  line-height: 60px
}
 
.border-round {
  @include themify() {
    border-bottom: 1px solid themed("border_color");
  }
 
  @include themify() {
    border-right: 1px solid themed("border_color");
  }
 
  @include themify() {
    border-left: 1px solid themed("border_color");
  }
}
</style>