lxf
2025-07-16 8588fe30f17d0d28190a279aab8675de0dbf1a5b
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<template>
  <div>
    <assets-head :title="t('资金账户')" :back-func="backFunc"></assets-head>
 
    <div class="px-17">
      <div class="flex items-center justify-between">
        <div class="text-25 font-bold">{{ $t('Defi质押流动性挖矿') }}</div>
        <img class="w-64 h-57 ml-90 flex-none" src="@/assets/imgs/icon-mining.png" draggable="false">
      </div>
 
      <div class="h-182 mt-20 pt-28 px-19 box-border text-white bgimg">
        <div class="flex justify-between items-center">
          <div class="text-11">{{ t('托管金额') }}</div>
          <img class="w-17 h-17" src="@/assets/imgs/icon-income.png" draggable="false">
        </div>
        <div class="text-34 font-bold mt-5 block">{{ statiscis.amount_sum || 0 }}</div>
 
        <div class="flex justify-between my-20 text-center text-16">
          <div>
            <div>{{ t('累计收益') }}</div>
            <div class="text-20">{{ statiscis.aready_profit || 0 }}</div>
          </div>
          <div>
            <div>{{ t('预计日收益') }}</div>
            <div class="text-20">{{ statiscis.today_profit || 0 }}</div>
          </div>
          <div>
            <div>{{ t('托管订单') }}</div>
            <div class="text-20">{{ statiscis.order_sum || 0 }}</div>
          </div>
        </div>
      </div>
 
      <div class="mt-15">
        <div class="text-16">{{ $t('去挖矿') }}</div>
 
        <div class="mt-15">
          <div class="h-100 box-border p-15 mb-10 bgimg1" @click="() => { onShow1 = true }">
            <div class="flex items-center justify-between">
              <div class="text-17 font-bold">01</div>
              <div class="text-16 font-bold">5{{ $t('天') }}</div>
            </div>
            <div class="flex mt-5">
              <div>
                <div class="text-11">{{ $t('效益') }}</div>
                <div class="text-16">0.003% - 0.004%</div>
              </div>
              <div class="ml-30">
                <div class="text-11">{{ $t('可投金额') }}</div>
                <div class="text-16">1000 - 100000</div>
              </div>
            </div>
          </div>
 
          <van-action-sheet v-model:show="onShow1">
            <div class="content">
              <div class="py-25 px-18 bg-white rounded-t-20">
                <span class="text-27 font-bold">
                  <span>01</span>
                </span>
                <div class="mt-10 pb-15 border-b-1 border-b-dashed border-#ccc">
                  <div class="flex items-center justify-between text-15">
                    <span data-i18n="cycle" style="font-weight: 600;">{{ $t('周期') }}</span>
                    <span>5</span>
                  </div>
                  <div class="flex items-center justify-between text-15">
                    <span data-i18n="benefit" style="font-weight: 600;">{{ $t('效益') }}</span>
                    <span>0.003-0.004%</span>
                  </div>
                  <div class="flex items-center justify-between text-15">
                    <span data-i18n="purchaseLimit" style="font-weight: 600;">{{ $t("购买数量") }}</span>
                    <span>99999</span>
                  </div>
                </div>
                <div class="mt-15">
                  <div class="flex items-center justify-between text-15">
                    <span data-i18n="amountLimit" style="font-weight: 600;">{{ $t('限额') }}</span>
                    <span>1000-100000</span>
                  </div>
                  <input class="mt-5 rounded-5 py-9 px-16 text-right text-24 font-700"
                    style="border: 0.5px solid rgba(0, 0, 0, 0.2);width: 100%;" type="number" maxlength="140" step="any"
                    enterkeyhint="done" autocomplete="off" id="investmentAmount" name="investmentAmount" />
                </div>
                <div class="mt-60">
                  <span class="text-15 text-#9c9c9c ">
                    <span data-i18n="expectedReturn">
                      {{ $t('预期收益') }}:
                    </span>0</span>
                  <div class="mt-5 h-55 leading-55 bg-#333 text-19 rounded-5 text-center text-white"
                    @click="openPopup(1)">
                    {{ $t('购买') }}
                  </div>
                </div>
              </div>
            </div>
          </van-action-sheet>
 
          <div class="h-100 box-border p-15 mb-10 bgimg1" @click="() => { onShow2 = true }">
            <div class="flex items-center justify-between">
              <div class="text-17 font-bold">02</div>
              <div class="text-16 font-bold">17{{ $t('天') }}</div>
            </div>
            <div class="flex mt-5">
              <div>
                <div class="text-11">{{ $t('效益') }}</div>
                <div class="text-16">0.004% - 0.005%</div>
              </div>
              <div class="ml-30">
                <div class="text-11">{{ $t('可投金额') }}</div>
                <div class="text-16">10000 - 10000000</div>
              </div>
            </div>
          </div>
 
          <van-action-sheet v-model:show="onShow2" title="标题">
            <div class="content">
              <div class="py-25 px-18 bg-white rounded-t-20">
                <span class="text-27 font-bold">
                  <span>02</span>
                </span>
                <div class="mt-10 pb-15 border-b-1 border-b-dashed border-#ccc">
                  <div class="flex items-center justify-between text-15">
                    <span data-i18n="cycle" style="font-weight: 600;">{{ $t('周期') }}</span>
                    <span>17</span>
                  </div>
                  <div class="flex items-center justify-between text-15">
                    <span data-i18n="benefit" style="font-weight: 600;">{{ $t('效益') }}</span>
                    <span>0.004-0.005%</span>
                  </div>
                  <div class="flex items-center justify-between text-15">
                    <span data-i18n="purchaseLimit" style="font-weight: 600;">{{ $t("购买数量") }}</span>
                    <span>99999</span>
                  </div>
                </div>
                <div class="mt-15">
                  <div class="flex items-center justify-between text-15">
                    <span data-i18n="amountLimit" style="font-weight: 600;">{{ $t('限额') }}</span>
                    <span>10000-10000000</span>
                  </div>
                  <input class="mt-5 rounded-5 py-9 px-16 text-right text-24 font-700"
                    style="border: 0.5px solid rgba(0, 0, 0, 0.2);width: 100%;" type="number" maxlength="140" step="any"
                    enterkeyhint="done" autocomplete="off" id="investmentAmount" name="investmentAmount" />
                </div>
                <div class="mt-60">
                  <span class="text-15 text-#9c9c9c ">
                    <span data-i18n="expectedReturn">
                      {{ $t('预期收益') }}:
                    </span>0</span>
                  <div class="mt-5 h-55 leading-55 bg-#333 text-19 rounded-5 text-center text-white"
                    @click="openPopup(2)">
                    {{ $t('购买') }}
                  </div>
                </div>
              </div>
            </div>
          </van-action-sheet>
        </div>
      </div>
    </div>
  </div>
 
</template>
 
<script setup>
import { financeStatics } from '@/service/financialManagement.api.js'
import { ref, onMounted } from 'vue';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
import { useRouter } from 'vue-router';
import fa from '../../../i18n/fa';
const router = useRouter();
 
const statiscis = ref({});
const amount = ref('');
const onShow1 = ref(false);
const onShow2 = ref(false);
 
onMounted(() => {
  getFinancialData();
});
 
const backFunc = () => {
  router.back();
}
 
const handleBuy = () => {
  if (!amount.value) {
    uni.showToast({ title: t('请输入购买金额'), icon: 'none' });
    return;
  }
  // 这里可以添加购买逻辑的API调用
  console.log('购买金额:', amount.value);
}
 
 
const getFinancialData = () => {
  // 获取理财数据
  financeStatics().then(res => {
    //console.log('理财统计', res)
    statiscis.value = res
  })
}
 
const openPopup = (type) => {
  if (type === 1) {
    onShow1.value = false
  } else if (type === 2) {
    onShow2.value = false
  }
}
 
</script>
 
<style lang="scss" scoped>
@import '@/assets/css/deepseek_css_20250625_30ff932.css';
 
.bgimg {
  background: url('@/assets/imgs/mining-card.png') no-repeat;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
 
.bgimg1 {
  background: url('@/assets/imgs/mining-bg.png') no-repeat;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
</style>