From 58b0f1e9bd03a472321acf1dfc4e89fc4ce9df7a Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Mon, 29 Sep 2025 01:14:10 +0800
Subject: [PATCH] 9.28更换api
---
src/page/trading/buy.vue | 79 +++++++++++++++++++++++----------------
1 files changed, 47 insertions(+), 32 deletions(-)
diff --git a/src/page/trading/buy.vue b/src/page/trading/buy.vue
index 1d8fec6..3ca4e80 100644
--- a/src/page/trading/buy.vue
+++ b/src/page/trading/buy.vue
@@ -4,10 +4,10 @@
<div class="top_cny">
<div class="top_back">
<div class="left_back" @click="handleBack()">
- <img src="../../assets/img/zuojiantou.png" alt />
+ <img src="../../assets/img/backs.png" alt />
</div>
<div class="right_title">
- <div class="t_t" style="white-space: nowrap">
+ <div class="t_t" style="white-space: pre-wrap">
<span>{{ name }}({{ gid }})</span>
</div>
<div class="b_t">
@@ -129,16 +129,16 @@
(nowPrice * selectCycle.replace("X", "") * num)
| _toLocaleString
}}
- <span v-if="bayType == 'US'">
- ≈ MX$
+ <span v-if="bayType != 'US'">
+ ≈ $
{{
- (nowPrice * selectCycle.replace("X", "") * num * utm)
+ (nowPrice * selectCycle.replace("X", "") * num * rate)
| _toLocaleString
}}
</span>
</span>
<span style="white-space: nowarp">
- MX$ {{ moneyData.availableBalance | _toLocaleString }}
+ $ {{ moneyData.availableBalance | _toLocaleString }}
</span>
</div>
</div>
@@ -155,10 +155,14 @@
2
)
}}
- <span v-if="bayType == 'US'">
- ≈ MX$
+ <span v-if="bayType != 'US'">
+ ≈ $
{{
- (nowPrice * selectCycle.replace("X", "") * num * sxf * utm)
+ (nowPrice *
+ selectCycle.replace("X", "") *
+ num *
+ sxf *
+ rate)
| _toLocaleString
}}
</span>
@@ -218,8 +222,10 @@
</div>
</div> -->
<div class="btn_buy" @click="gdOrSetBuy()">
- <!-- <div :class="tabsCurrentIndex == 0 ? 'maichu' : ''">#c4d600 -->
- <div class="maichu" style="background-color:#c4d600">
+ <div
+ :class="tabsCurrentIndex == 0 ? 'maichu' : ''"
+ style="background-color:#287dff"
+ >
<span>{{ tabsCurrentIndex == 0 ? $t("hj84") : $t("gm") }}</span>
</div>
</div>
@@ -334,7 +340,16 @@
gid: ""
};
},
-
+ computed: {
+ // 计算当前汇率
+ rate() {
+ let rate = 1;
+ if (this.bayType == "HK") rate = this.htu;
+ else if (this.bayType == "IN") rate = this.itu;
+ else if (this.bayType == "TW") rate = this.ttu;
+ return rate;
+ }
+ },
mounted() {
this.bayType = this.$route.query.bayType;
this.gid = this.$route.query.gid;
@@ -397,7 +412,7 @@
},
async getMoneyData() {
let data = await api.getMoney();
- let type = this.bayType === "SZHB" ? "US" : this.bayType;
+ // let type = this.bayType === "SZHB" ? "US" : this.bayType;
if (data.status === 0) {
// const newArr = data.data.filter(item => item.accectType === type);
// this.moneyData = newArr[0] || {};
@@ -559,7 +574,7 @@
});
this.getUserInfo();
// this.$router.push("/warehouse?index=1&buyType=" + this.bayType);
- this.$router.push("/tradeNew?index=1&buyType=" + this.bayType);
+ this.$router.push("/markets-list");
} else {
this.$store.commit("elAlertShow", {
elAlertShow: true,
@@ -639,7 +654,7 @@
buyType = 0;
}
// this.$router.push("/warehouse?index=1&buyType=" + this.bayType);
- this.$router.push("/tradeNew?index=1&buyType=" + this.bayType);
+ this.$router.push("/markets-list");
} else {
if (data.msg.indexOf("不在交易时段内") > -1) {
this.$store.commit("elAlertShow", {
@@ -667,7 +682,7 @@
});
this.getUserInfo();
// this.$router.push("/warehouse?index=1&buyType=" + this.bayType);
- this.$router.push("/tradeNew?index=1&buyType=" + this.bayType);
+ this.$router.push("/markets-list");
} else {
this.$store.commit("elAlertShow", {
elAlertShow: true,
@@ -747,13 +762,13 @@
.buy_page {
width: 100%;
min-height: 100vh;
- background-color: #fff;
+ // background-color: #fff;
> .content {
width: 100%;
height: calc(100% - 1.6rem);
position: relative;
- background-color: rgb(241, 242, 246);
+ background-color: #222;
}
}
@@ -782,12 +797,12 @@
}
.right_title {
- width: 3rem;
+ width: 80vw;
height: 80%;
.t_t {
width: 100%;
- height: 70%;
+ // height: 70%;
display: flex;
align-items: center;
font-size: 0.4615rem;
@@ -859,7 +874,7 @@
> div {
width: 45%;
height: 70%;
- background: rgb(236, 236, 236);
+ background: #444;
display: flex;
justify-content: center;
align-items: center;
@@ -868,7 +883,7 @@
}
.active {
- background: #fff;
+ background: #333;
color: rgb(110, 169, 118);
span {
@@ -877,7 +892,7 @@
}
.actives {
- background: #fff;
+ background: #333;
color: rgb(212, 71, 78);
span {
@@ -894,14 +909,14 @@
width: 100%;
height: auto;
padding: 0.2rem 0.8rem;
- background: #fff;
+ // background: #fff;
margin-top: 0.1rem;
border-radius: 0.3rem;
.tabs {
width: 100%;
height: 0.8205rem;
- background: rgb(247, 247, 247);
+ background: #555;
display: flex;
align-items: center;
justify-content: center;
@@ -917,7 +932,7 @@
}
.active {
- background: #fff;
+ background: #333;
span {
font-weight: 600;
@@ -972,7 +987,7 @@
}
.bottom_bzz {
- color: #000;
+ // color: #000;
font-size: 0.3846rem;
span {
@@ -994,7 +1009,7 @@
border-bottom: 0.05rem solid rgb(236, 236, 236);
> div {
- color: #000;
+ // color: #000;
}
}
}
@@ -1036,7 +1051,7 @@
width: 100%;
height: auto;
bottom: 0;
- background: #fff;
+ // background: #fff;
padding: 0.8rem 0.8rem;
display: flex;
align-items: flex-end;
@@ -1106,7 +1121,7 @@
}
.maichu {
- // background-color: rgb(225, 59, 69) !important;
+ background-color: rgb(225, 59, 69) !important;
}
.mr {
@@ -1122,7 +1137,7 @@
left: -0.1rem;
z-index: 10000;
background: rgba(255, 255, 255, 0);
- border-left: 0.12rem solid rgb(241, 242, 246);
+ border-left: 0.12rem solid #555;
transform-origin: bottom right;
-ms-transform: skew(-10deg, 0deg);
-webkit-transform: skew(-10deg, 0deg);
@@ -1143,7 +1158,7 @@
left: 0;
z-index: 10000;
background: rgba(255, 255, 255, 0);
- border-right: 0.1rem solid rgb(241, 242, 246);
+ border-right: 0.1rem solid #555;
transform-origin: bottom left;
-ms-transform: skew(-10deg, 0deg);
-webkit-transform: skew(-10deg, 0deg);
--
Gitblit v1.9.3