From 02a3d94d359b34e915f34abec024cbc1504a6a7c Mon Sep 17 00:00:00 2001
From: lxf <1371462558@qq.com>
Date: Fri, 18 Apr 2025 11:00:14 +0800
Subject: [PATCH] feat
---
src/views/wallet/exchange.vue | 58 ++++++++++++++++++++++++++++++----------------------------
1 files changed, 30 insertions(+), 28 deletions(-)
diff --git a/src/views/wallet/exchange.vue b/src/views/wallet/exchange.vue
index 0055f6c..7e135b2 100644
--- a/src/views/wallet/exchange.vue
+++ b/src/views/wallet/exchange.vue
@@ -36,9 +36,9 @@
<div class="css-fqmucm" v-if="walletList.length > 0">
{{ $t("message.user.dui5") }}
<div class="balance css-vurnku">
- {{ itemChoose?.value }}
+ {{ itemChoose?.volume }}
</div>
- {{ itemChoose?.name }}
+ {{ itemChoose?.name?.split("/")[0] }}
</div>
</div>
<!-- 卖出 -->
@@ -63,10 +63,10 @@
v-if="walletList.length > 0"
>
<img
- :src="handleSymbolImg(itemChoose?.name)"
+ :src="handleSymbolImg(itemChoose?.symbol)"
class="css-1bmz5aq"
/>
- {{ itemChoose?.name }}
+ {{ itemChoose?.name?.split("/")[0] }}
</div>
<el-icon><CaretBottom /></el-icon>
</div>
@@ -103,10 +103,10 @@
<div class="css-1pysja1">
<div class="css-176wmh3">
<img
- :src="handleSymbolImg(item.name)"
+ :src="handleSymbolImg(item.symbol)"
class="css-1m0agl6"
/>
- {{ item.name }}
+ {{ item.name?.split("/")[0] }}
</div>
</div>
</div>
@@ -155,10 +155,10 @@
>
<div class="css-9wgib6 pl-16" v-if="walletList.length > 0">
<img
- :src="handleSymbolImg(itemChoose1?.name)"
+ :src="handleSymbolImg(itemChoose1?.symbol)"
class="css-1bmz5aq"
/>
- {{ itemChoose1?.name }}
+ {{ itemChoose1?.name?.split("/")[0] }}
</div>
<el-icon><CaretBottom /></el-icon>
<!-- </div> -->
@@ -188,10 +188,10 @@
<div class="css-1pysja1">
<div class="css-176wmh3">
<img
- :src="handleSymbolImg(item.name)"
+ :src="handleSymbolImg(item.symbol)"
class="css-1m0agl6"
/>
- {{ item.name }}
+ {{ item.name?.split("/")[0] }}
</div>
</div>
</div>
@@ -288,6 +288,7 @@
</template>
<script>
import Axios2 from "@/api/wallet.js";
+import Axios from "@/utils/http";
import { handleSymbolImg } from "@/utils";
import { Search, ArrowLeftBold, CaretBottom } from "@element-plus/icons-vue";
export default {
@@ -342,23 +343,24 @@
this.InputMoney = "";
},
OnClickMax() {
- this.InputMoney = this.itemChoose?.value;
+ this.InputMoney = this.itemChoose?.volume;
},
//获取所有币种及其价值
getWalletList() {
- Axios2.getWalletList().then((res) => {
- var jsonArray = res;
- this.walletList = [{ name: "USDT", value: 0 }];
- for (var i in jsonArray.data) {
- if (i == "USDT") {
- this.walletList[0].value = jsonArray.data[i].money;
- } else {
- this.walletList.push({
- name: i,
- value: jsonArray.data[i].amount,
- });
- }
- }
+ // Axios2.getWalletList()
+ Axios.fetch("wap/api/wallet!getAll.action").then((res) => {
+ this.walletList = res.data.extends;
+ // this.walletList = [{ name: "USDT", value: 0 }];
+ // for (var i in jsonArray.data) {
+ // if (i == "USDT") {
+ // this.walletList[0].value = jsonArray.data[i].volume;
+ // } else {
+ // this.walletList.push({
+ // name: i,
+ // value: jsonArray.data[i].amount,
+ // });
+ // }
+ // }
this.showWallet1 = this.walletList;
this.showWallet2 = this.walletList;
@@ -368,8 +370,8 @@
},
getFee() {
const params = {
- symbol: this.itemChoose.name,
- symbol_to: this.itemChoose1.name,
+ symbol: this.itemChoose.symbol,
+ symbol_to: this.itemChoose1.symbol,
volume: this.InputMoney,
};
@@ -408,8 +410,8 @@
},
getTrans() {
var params = {
- symbol: this.itemChoose?.name,
- symbol_to: this.itemChoose1?.name,
+ symbol: this.itemChoose?.symbol,
+ symbol_to: this.itemChoose1?.symbol,
volume: this.InputMoney,
session_token: this.session_token,
};
--
Gitblit v1.9.3