From abb6c7bb45448fd8b3ca0e64900b9c4751e1d139 Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Tue, 26 Aug 2025 17:07:47 +0800
Subject: [PATCH] 2
---
src/page/user/myOrder.vue | 2
src/locales/en.json | 3 +
src/locales/zh.json | 3 +
src/axios/api.js | 4 ++
src/locales/cht.json | 3 +
src/page/user/account.vue | 47 +++++++++++++++++++----
6 files changed, 49 insertions(+), 13 deletions(-)
diff --git a/src/axios/api.js b/src/axios/api.js
index b124f8e..6313b7b 100644
--- a/src/axios/api.js
+++ b/src/axios/api.js
@@ -671,3 +671,7 @@
export function getIndexData() {
return post(`/api/stock/getIndexData.do`);
}
+// 账户每周盈利获取
+export function getWeeklyProfit() {
+ return post(`/user/getWeeklyProfit.do`);
+}
diff --git a/src/locales/cht.json b/src/locales/cht.json
index 1b7ab2f..6e7d275 100644
--- a/src/locales/cht.json
+++ b/src/locales/cht.json
@@ -708,5 +708,6 @@
"充值提示": "尊敬的會員您好,充值請聯繫客服",
"市值": "市值",
"持股": "持股",
- "可卖": "可賣"
+ "可卖": "可賣",
+ "每週盈利": "每週盈利"
}
diff --git a/src/locales/en.json b/src/locales/en.json
index e1b2a5f..0651b02 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -708,5 +708,6 @@
"充值提示": "Dear member, please contact customer service for recharging",
"市值": "Market capitalization",
"持股": "Shareholding",
- "可卖": "For sale"
+ "可卖": "For sale",
+ "每週盈利": "Weekly profit"
}
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 137e944..d21c133 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -708,5 +708,6 @@
"充值提示": "尊敬的会员您好,充值请联系客服",
"市值": "市值",
"持股": "持股",
- "可卖": "可卖"
+ "可卖": "可卖",
+ "每週盈利": "每周盈利"
}
\ No newline at end of file
diff --git a/src/page/user/account.vue b/src/page/user/account.vue
index cac7b5f..82d23d2 100644
--- a/src/page/user/account.vue
+++ b/src/page/user/account.vue
@@ -28,7 +28,31 @@
</div>
</div>
</div>
- <div class="all-assets flex-center">
+ <div class="normal flex-between">
+ <div>
+ <div class="text-xs">{{ $t("每週盈利") }}</div>
+ <div class="price" style="font-size: .6rem;">
+ {{ moneyData.symbol }} {{ weeklyProfit }}
+ </div>
+ </div>
+ </div>
+ <div class="normal flex-between">
+ <div>
+ <div class="text-xs">{{ $t("hj48") }}</div>
+ <div class="price" style="font-size: .3rem;">
+ {{ moneyData.symbol }} {{ moneyData.availableBalance }}
+ </div>
+ </div>
+ </div>
+ <div class="normal flex-between">
+ <div>
+ <div class="text-xs">{{ $t("账户盈亏") }}</div>
+ <div class="price" style="font-size: .3rem;">
+ {{ moneyData.symbol }} {{ moneyData.cumulativeProfitAndLoss }}
+ </div>
+ </div>
+ </div>
+ <!-- <div class="all-assets flex-center">
<div class="assets-item flex-center">
<div class="all-size">{{ $t("hj48") }}</div>
<div class="big-size">{{ moneyData.availableBalance }}</div>
@@ -37,11 +61,7 @@
<div class="all-size">{{ $t("账户盈亏") }}</div>
<div class="big-size">{{ moneyData.cumulativeProfitAndLoss }}</div>
</div>
- <!-- <div class="assets-item flex-center">
- <div class="all-size">{{ $t("今日盈亏") }}</div>
- <div class="big-size">0.00</div>
- </div> -->
- </div>
+ </div> -->
</div>
<div class="tui-spendMoney flex-between-start">
@@ -60,7 +80,7 @@
</div>
</div>
- <my-order :Operation="true"></my-order>
+ <!-- <my-order :Operation="true"></my-order> -->
</div>
</template>
@@ -80,6 +100,7 @@
userInfo: {}, // 用户信息
moneyData: {}, // 账户金额
positionData: {}, // 账户持仓数据
+ weeklyProfit: 0, // 每周盈利数据
tabs: [
{
name: this.$t("hj177"),
@@ -112,6 +133,13 @@
this.moneyData = data.data[0];
}
},
+ // 获取账户每周盈利
+ async getWeeklyProfit() {
+ let data = await api.getWeeklyProfit();
+ if (data.status === 0) {
+ this.weeklyProfit = data.data;
+ }
+ },
// 获取账户持仓数据
async getMyPositionProfitAndLose() {
let data = await api.getMyPositionProfitAndLose();
@@ -139,11 +167,12 @@
// 充值提示
czts() {
Toast(this.$t("充值提示"));
- },
+ }
},
created() {
this.getUserInfo();
this.getMoney();
+ this.getWeeklyProfit();
// this.getMyPositionProfitAndLose();
}
};
@@ -207,7 +236,7 @@
position: relative;
.price {
font-size: 0.825rem;
- line-height: 0.825rem;
+ // line-height: 0.825rem;
font-weight: 500;
padding-top: 0.3rem;
color: #fff;
diff --git a/src/page/user/myOrder.vue b/src/page/user/myOrder.vue
index 04d521d..755052c 100644
--- a/src/page/user/myOrder.vue
+++ b/src/page/user/myOrder.vue
@@ -401,7 +401,7 @@
}
},
open(i, index) {
- if (!this.Operation) return;
+ // if (!this.Operation) return;
this.actObj = i;
this.actIndex = index;
},
--
Gitblit v1.9.3