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 | 202 ++++++++++++++++++++++++++++++++++---------------
1 files changed, 139 insertions(+), 63 deletions(-)
diff --git a/pages/my/index.vue b/pages/my/index.vue
index ac6920e..1ef6f7f 100644
--- a/pages/my/index.vue
+++ b/pages/my/index.vue
@@ -2,22 +2,41 @@
<view class="my-container">
<!-- 鐢ㄦ埛淇℃伅鍗$墖 -->
<view class="user-card">
- <view class="user-info" @tap="navigateTo('/pages/my/profile')">
- <image src="@/static/avatar/default.png" mode="aspectFill" class="avatar" />
+ <view class="user-info" @tap="navigateTo('/pagesSub/my/profile')">
+ <image
+ 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"
@@ -25,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>
@@ -62,6 +93,9 @@
<script setup>
import { ref } from "vue";
+import { onLoad } from "@dcloudio/uni-app";
+
+import { useUserStore } from "@/stores/user";
// 鐢ㄦ埛淇℃伅
const userInfo = ref({
@@ -70,6 +104,13 @@
cardNo: "1234567890",
vipLevel: "VIP 99",
});
+// 缁熻鏁版嵁
+const stats = ref({
+ totalCases: 0,
+ readCases: 0,
+ agreedCases: 0,
+});
+const userStore = useUserStore();
// 蹇�熷叆鍙�
const quickAccess = ref([
@@ -82,84 +123,87 @@
// 鍔熻兘鍒楄〃
const functionList = ref([
{
- title: "灏卞尰鏈嶅姟",
+ title: "妗堜緥鏈嶅姟",
items: [
{
- label: "鎸傚彿璁板綍",
+ label: "涓婃姤妗堜緥",
icon: "icon-record",
- path: "/pages/appointment/record",
+ path: "/pagesSub/case/CaseDetails",
},
{
- label: "缂磋垂璁板綍",
+ label: "鎴戠殑涓婃姤",
icon: "icon-payment",
- path: "/pages/payment/record",
+ path: "/pagesSub/case/index",
},
{
- label: "灏卞尰璁板綍",
+ label: "杞繍鐧昏",
icon: "icon-medical",
- path: "/pages/records/medical",
+ path: "/pagesSub/case/transfer",
},
{
- label: "灏辫瘖浜虹鐞�",
+ label: "瀹℃煡璁板綍",
icon: "icon-contacts",
- path: "/pages/patient/list",
- value: "宸叉坊鍔�3浜�",
+ path: "/pagesSub/ethicalReview/index",
},
],
},
- {
- title: "鍋ュ悍鏈嶅姟",
- items: [
- {
- label: "鍋ュ悍妗f",
- icon: "icon-health",
- path: "/pages/my/health-records",
- },
- {
- label: "妫�鏌ユ姤鍛�",
- icon: "icon-report",
- path: "/pages/records/reports",
- tag: "鏂�",
- },
- ],
- },
+ // {
+ // title: "鍋ュ悍鏈嶅姟",
+ // items: [
+ // {
+ // label: "鍋ュ悍妗f",
+ // icon: "icon-health",
+ // path: "/pages/my/health-records",
+ // },
+ // {
+ // label: "妫�鏌ユ姤鍛�",
+ // icon: "icon-report",
+ // path: "/pages/records/reports",
+ // tag: "鏂�",
+ // },
+ // ],
+ // },
{
title: "璐︽埛璁剧疆",
items: [
- {
- label: "瀹炲悕璁よ瘉",
- icon: "icon-verify",
- path: "/pages/my/verify",
- value: "宸茶璇�",
- },
- {
- label: "鏀粯鏂瑰紡",
- icon: "icon-wallet",
- path: "/pages/my/payment-method",
- },
+ // {
+ // label: "瀹炲悕璁よ瘉",
+ // icon: "icon-verify",
+ // path: "/pages/my/verify",
+ // value: "宸茶璇�",
+ // },
+ // {
+ // label: "鏀粯鏂瑰紡",
+ // icon: "icon-wallet",
+ // path: "/pages/my/payment-method",
+ // },
{
label: "娑堟伅閫氱煡",
icon: "icon-notification",
- path: "/pages/my/notification",
+ path: "/pagesSub/my/notification",
},
],
},
- {
- items: [
- {
- label: "瀹㈡湇涓績",
- icon: "icon-service",
- path: "/pages/my/service",
- },
- {
- label: "璁剧疆",
- icon: "icon-settings",
- path: "/pages/my/settings",
- },
- ],
- },
+ // {
+ // items: [
+ // {
+ // label: "瀹㈡湇涓績",
+ // icon: "icon-service",
+ // path: "/pages/my/service",
+ // },
+ // {
+ // label: "璁剧疆",
+ // icon: "icon-settings",
+ // path: "/pages/my/settings",
+ // },
+ // ],
+ // },
]);
-
+onLoad(async () => {
+ console.log(userStore.userInfo, "userStore.userInfo");
+ userInfo.value = userStore.userInfo;
+ await donateTotal();
+});
// 椤甸潰璺宠浆
const navigateTo = (url) => {
uni.navigateTo({
@@ -176,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({
@@ -233,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);
+ }
}
}
}
@@ -261,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;
@@ -285,7 +361,7 @@
.function-list {
margin-top: 20rpx;
-
+ margin-left: 5rpx;
.section {
margin-bottom: 20rpx;
--
Gitblit v1.9.3