From b76de9a566e4435146a970aa22333a58f87b485b Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期四, 11 六月 2026 09:52:54 +0800
Subject: [PATCH] 青岛维护

---
 pages/my/index.vue |  103 ++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 88 insertions(+), 15 deletions(-)

diff --git a/pages/my/index.vue b/pages/my/index.vue
index 2e7d8ab..1ef6f7f 100644
--- a/pages/my/index.vue
+++ b/pages/my/index.vue
@@ -2,26 +2,41 @@
   <view class="my-container">
     <!-- 鐢ㄦ埛淇℃伅鍗$墖 -->
     <view class="user-card">
-      <view class="user-info" @tap="navigateTo('/pages/my/profile')">
+      <view class="user-info" @tap="navigateTo('/pagesSub/my/profile')">
         <image
-          src="@/static/avatar/default.png"
+        v-if="userInfo.sex == 1"
+          src="@/static/avatar/yisn.jpg"
           mode="aspectFill"
           class="avatar"
         />
+        <image
+        v-else
+          src="@/static/avatar/yisna.jpg"
+          mode="aspectFill"
+          class="avatar"
+        />
+        
         <view class="info">
-          <text class="name">{{ userInfo.name }}</text>
-          <text class="id">灏辫瘖鍗″彿锛歿{ userInfo.cardNo }}</text>
+          <text class="name">{{ userInfo.nickName }}</text>
+          <text class="id">璐﹀彿锛歿{ userInfo.createBy }}</text>
+          <!-- 娣诲姞鍗忚皟鍛樹俊鎭� -->
+          <text class="coordinator" v-if="userInfo.coordinatorName">
+            鍗忚皟鍛橈細{{ userInfo.coordinatorName }}
+            <text v-if="userInfo.coordinatorNo"
+              >锛堢紪鍙凤細{{ userInfo.coordinatorNo }}锛�</text
+            >
+          </text>
         </view>
       </view>
-      <view class="vip-info" @tap="navigateTo('/pages/my/vip')">
+      <!-- <view class="vip-info" @tap="navigateTo('/pagesSub/my/vip')">
         <text class="level">{{ userInfo.vipLevel }}</text>
         <text class="desc">鏌ョ湅浼氬憳鏉冪泭 ></text>
-      </view>
+      </view> -->
     </view>
 
     <!-- 蹇�熷叆鍙� -->
     <view class="quick-access">
-      <view
+      <!-- <view
         class="access-item"
         v-for="(item, index) in quickAccess"
         :key="index"
@@ -29,6 +44,18 @@
       >
         <text class="count">{{ item.count }}</text>
         <text class="label">{{ item.label }}</text>
+      </view> -->
+      <view class="access-item">
+        <text class="count">{{ stats.totalCases }}</text>
+        <text class="label">鎬讳笂鎶ラ噺</text>
+      </view>
+      <view class="access-item">
+        <text class="count">{{ stats.readCases }}</text>
+        <text class="label">宸查槄璇�</text>
+      </view>
+      <view class="access-item">
+        <text class="count">{{ stats.agreedCases }}</text>
+        <text class="label">宸插悓鎰�</text>
       </view>
     </view>
 
@@ -66,6 +93,9 @@
 
 <script setup>
 import { ref } from "vue";
+import { onLoad } from "@dcloudio/uni-app";
+
+import { useUserStore } from "@/stores/user";
 
 // 鐢ㄦ埛淇℃伅
 const userInfo = ref({
@@ -74,6 +104,13 @@
   cardNo: "1234567890",
   vipLevel: "VIP 99",
 });
+// 缁熻鏁版嵁
+const stats = ref({
+  totalCases: 0,
+  readCases: 0,
+  agreedCases: 0,
+});
+const userStore = useUserStore();
 
 // 蹇�熷叆鍙�
 const quickAccess = ref([
@@ -91,22 +128,22 @@
       {
         label: "涓婃姤妗堜緥",
         icon: "icon-record",
-        path: "/pages/case/CaseDetails",
+        path: "/pagesSub/case/CaseDetails",
       },
       {
         label: "鎴戠殑涓婃姤",
         icon: "icon-payment",
-        path: "/pages/case/index",
+        path: "/pagesSub/case/index",
       },
       {
         label: "杞繍鐧昏",
         icon: "icon-medical",
-        path: "/pages/case/transfer",
+        path: "/pagesSub/case/transfer",
       },
       {
         label: "瀹℃煡璁板綍",
         icon: "icon-contacts",
-        path: "/pages/ethicalReview/index",
+        path: "/pagesSub/ethicalReview/index",
       },
     ],
   },
@@ -143,7 +180,7 @@
       {
         label: "娑堟伅閫氱煡",
         icon: "icon-notification",
-        path: "/pages/my/notification",
+        path: "/pagesSub/my/notification",
       },
     ],
   },
@@ -162,7 +199,11 @@
   //   ],
   // },
 ]);
-
+onLoad(async () => {
+  console.log(userStore.userInfo, "userStore.userInfo");
+  userInfo.value = userStore.userInfo;
+  await donateTotal();
+});
 // 椤甸潰璺宠浆
 const navigateTo = (url) => {
   uni.navigateTo({
@@ -179,7 +220,23 @@
     },
   });
 };
-
+// 鑾峰彇缁熻鏁版嵁
+const donateTotal = async () => {
+  try {
+    const res = await uni.$uapi.post("/project/donatebaseinforeport/getTotal");
+    if (res.code === 200) {
+      stats.value = {
+        totalCases: res.data["all"] || 0,
+        readCases: res.data["2"] || 0,
+        agreedCases: res.data["3"] || 0,
+      };
+    } else {
+      throw new Error(res.msg || "鑾峰彇缁熻澶辫触");
+    }
+  } catch (error) {
+    console.error("鑾峰彇缁熻鏁版嵁澶辫触:", error);
+  }
+};
 // 閫�鍑虹櫥褰�
 const handleLogout = () => {
   uni.showModal({
@@ -236,6 +293,22 @@
         .id {
           font-size: 26rpx;
           color: rgba(255, 255, 255, 0.9);
+          margin-bottom: 4rpx;
+          display: block;
+        }
+
+        // 鏂板鍗忚皟鍛樻牱寮�
+        .coordinator {
+          font-size: 22rpx;
+          color: rgba(255, 255, 255, 0.75);
+          display: block;
+          margin-top: 4rpx;
+
+          // 缂栧彿鏂囧瓧鏇村皬涓�浜�
+          text {
+            font-size: 20rpx;
+            color: rgba(255, 255, 255, 0.65);
+          }
         }
       }
     }
@@ -264,7 +337,7 @@
     border-radius: $radius-lg;
     padding: 30rpx;
     display: grid;
-    grid-template-columns: repeat(4, 1fr);
+    grid-template-columns: repeat(3, 1fr);
     gap: 20rpx;
     box-shadow: $shadow-sm;
 

--
Gitblit v1.9.3