From 0f6b38dfdfe93a1d630d984417af2fbb03c7e0ff Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Mon, 15 Sep 2025 15:29:26 +0800
Subject: [PATCH] 2

---
 src/page/user/account.vue |  104 ++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 84 insertions(+), 20 deletions(-)

diff --git a/src/page/user/account.vue b/src/page/user/account.vue
index a9faea6..8d49f1c 100644
--- a/src/page/user/account.vue
+++ b/src/page/user/account.vue
@@ -11,7 +11,11 @@
           alt=""
           @click="$store.dispatch('CustomerService')"
         />
-        <img src="@/assets/img/setting.png" alt="" />
+        <img
+          src="@/assets/img/setting.png"
+          alt=""
+          @click="$router.push('/setting')"
+        />
       </div>
     </div>
 
@@ -24,34 +28,64 @@
           </div>
         </div>
       </div>
-      <div class="all-assets flex-between">
+      <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>
         </div>
-        <div class="assets-item flex-center">
-          <div class="all-size">{{ $t("账户盈亏") }}</div>
+        <div class="assets-item flex-center" style="align-items: end;">
+          <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">
-      <div class="tui-rightItem flex-center" v-for="i in tabs" :key="i.name">
+    <div class="tui-spendMoney flex-between-start">
+      <div class="tui-rightItem flex-center" @click="czts">
+        <img src="@/assets/img/account_1.png" />
+        <div class="text">{{ this.$t("hj172") }}</div>
+      </div>
+      <div
+        class="tui-rightItem flex-center"
+        v-for="i in tabs"
+        :key="i.name"
+        @click="toPage(i.path)"
+      >
         <img :src="i.img" />
         <div class="text">{{ i.name }}</div>
       </div>
     </div>
 
-    <my-order></my-order>
+    <!-- <my-order :Operation="true"></my-order> -->
   </div>
 </template>
 
 <script>
+import { Toast } from "vant";
 import tabHead from "@/components/tabHead.vue";
 import myOrder from "@/page/user/myOrder.vue";
 import * as api from "@/axios/api";
@@ -66,12 +100,28 @@
       userInfo: {}, // 用户信息
       moneyData: {}, // 账户金额
       positionData: {}, // 账户持仓数据
+      weeklyProfit: 0, // 每周盈利数据
       tabs: [
-        { name: this.$t("hj172"), img: require("@/assets/img/account_1.png") },
-        { name: this.$t("hj177"), img: require("@/assets/img/account_2.png") },
-        { name: this.$t("hj168"), img: require("@/assets/img/account_3.png") },
-        { name: this.$t("hj162"), img: require("@/assets/img/account_4.png") },
-        { name: this.$t("hj247"), img: require("@/assets/img/account_5.png") }
+        {
+          name: this.$t("hj177"),
+          img: require("@/assets/img/account_2.png"),
+          path: "/RechargeSure"
+        },
+        {
+          name: this.$t("hj168"),
+          img: require("@/assets/img/account_3.png"),
+          path: "/rechargelist"
+        },
+        {
+          name: this.$t("hj162"),
+          img: require("@/assets/img/account_4.png"),
+          path: "/cashlist"
+        },
+        {
+          name: this.$t("hj247"),
+          img: require("@/assets/img/account_5.png"),
+          path: "/banklist"
+        }
       ]
     };
   },
@@ -81,6 +131,13 @@
       let data = await api.getMoney();
       if (data.status === 0) {
         this.moneyData = data.data[0];
+      }
+    },
+    // 获取账户每周盈利
+    async getWeeklyProfit() {
+      let data = await api.getWeeklyProfit();
+      if (data.status === 0) {
+        this.weeklyProfit = data.data;
       }
     },
     // 获取账户持仓数据
@@ -106,11 +163,16 @@
     toPage(url) {
       if (!url) return;
       this.$router.push(url);
+    },
+    // 充值提示
+    czts() {
+      Toast(this.$t("充值提示"));
     }
   },
   created() {
     this.getUserInfo();
     this.getMoney();
+    this.getWeeklyProfit();
     // this.getMyPositionProfitAndLose();
   }
 };
@@ -131,7 +193,7 @@
       flex-direction: column;
       .text {
         width: 100%;
-        font-size: 0.35rem;
+        font-size: 0.3rem;
         font-weight: 500;
         padding-top: 0.15rem;
         text-align: center;
@@ -152,9 +214,11 @@
       padding: 0.225rem 0 0.35rem;
       justify-content: space-evenly;
       .assets-item {
-        width: 33.33%;
+        width: 50%;
         flex-shrink: 0;
         flex-direction: column;
+        align-items: start;
+        padding: 0 0.3rem;
         .big-size {
           font-size: 0.4rem;
           color: #fff;
@@ -172,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;

--
Gitblit v1.9.3