From b76de9a566e4435146a970aa22333a58f87b485b Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期四, 11 六月 2026 09:52:54 +0800
Subject: [PATCH] 青岛维护
---
unpackage/dist/dev/mp-weixin/pages/my/index.js | 87 ++++++++++++++++++++++++++++++-------------
1 files changed, 60 insertions(+), 27 deletions(-)
diff --git a/unpackage/dist/dev/mp-weixin/pages/my/index.js b/unpackage/dist/dev/mp-weixin/pages/my/index.js
index a3a503e..40ad35c 100644
--- a/unpackage/dist/dev/mp-weixin/pages/my/index.js
+++ b/unpackage/dist/dev/mp-weixin/pages/my/index.js
@@ -1,6 +1,7 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
+const stores_user = require("../../stores/user.js");
const _sfc_main = {
__name: "index",
setup(__props) {
@@ -10,7 +11,13 @@
cardNo: "1234567890",
vipLevel: "VIP 99"
});
- const quickAccess = common_vendor.ref([
+ const stats = common_vendor.ref({
+ totalCases: 0,
+ readCases: 0,
+ agreedCases: 0
+ });
+ const userStore = stores_user.useUserStore();
+ common_vendor.ref([
{ label: "寰呭氨璇�", count: 1, path: "/pages/appointment/record" },
{ label: "寰呬粯娆�", count: 2, path: "/pages/payment/record" },
{ label: "寰呰瘎浠�", count: 3, path: "/pages/my/reviews" },
@@ -23,22 +30,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"
}
]
},
@@ -75,7 +82,7 @@
{
label: "娑堟伅閫氱煡",
icon: "icon-notification",
- path: "/pages/my/notification"
+ path: "/pagesSub/my/notification"
}
]
}
@@ -94,19 +101,40 @@
// ],
// },
]);
+ common_vendor.onLoad(async () => {
+ common_vendor.index.__f__("log", "at pages/my/index.vue:203", userStore.userInfo, "userStore.userInfo");
+ userInfo.value = userStore.userInfo;
+ await donateTotal();
+ });
const navigateTo = (url) => {
common_vendor.index.navigateTo({
url,
fail: (err) => {
- common_vendor.index.__f__("error", "at pages/my/index.vue:171", "瀵艰埅澶辫触:", err);
+ common_vendor.index.__f__("error", "at pages/my/index.vue:212", "瀵艰埅澶辫触:", err);
common_vendor.index.redirectTo({
url,
fail: (err2) => {
- common_vendor.index.__f__("error", "at pages/my/index.vue:176", "閲嶅畾鍚戝け璐�:", err2);
+ common_vendor.index.__f__("error", "at pages/my/index.vue:217", "閲嶅畾鍚戝け璐�:", err2);
}
});
}
});
+ };
+ const donateTotal = async () => {
+ try {
+ const res = await common_vendor.index.$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) {
+ common_vendor.index.__f__("error", "at pages/my/index.vue:237", "鑾峰彇缁熻鏁版嵁澶辫触:", error);
+ }
};
const handleLogout = () => {
common_vendor.index.showModal({
@@ -123,22 +151,27 @@
});
};
return (_ctx, _cache) => {
- return {
- a: common_assets._imports_0$1,
- b: common_vendor.t(userInfo.value.name),
- c: common_vendor.t(userInfo.value.cardNo),
- d: common_vendor.o(($event) => navigateTo("/pages/my/profile")),
- e: common_vendor.t(userInfo.value.vipLevel),
- f: common_vendor.o(($event) => navigateTo("/pages/my/vip")),
- g: common_vendor.f(quickAccess.value, (item, index, i0) => {
- return {
- a: common_vendor.t(item.count),
- b: common_vendor.t(item.label),
- c: index,
- d: common_vendor.o(($event) => navigateTo(item.path), index)
- };
- }),
- h: common_vendor.f(functionList.value, (section, idx, i0) => {
+ return common_vendor.e({
+ a: userInfo.value.sex == 1
+ }, userInfo.value.sex == 1 ? {
+ b: common_assets._imports_0$1
+ } : {
+ c: common_assets._imports_1
+ }, {
+ d: common_vendor.t(userInfo.value.nickName),
+ e: common_vendor.t(userInfo.value.createBy),
+ f: userInfo.value.coordinatorName
+ }, userInfo.value.coordinatorName ? common_vendor.e({
+ g: common_vendor.t(userInfo.value.coordinatorName),
+ h: userInfo.value.coordinatorNo
+ }, userInfo.value.coordinatorNo ? {
+ i: common_vendor.t(userInfo.value.coordinatorNo)
+ } : {}) : {}, {
+ j: common_vendor.o(($event) => navigateTo("/pagesSub/my/profile")),
+ k: common_vendor.t(stats.value.totalCases),
+ l: common_vendor.t(stats.value.readCases),
+ m: common_vendor.t(stats.value.agreedCases),
+ n: common_vendor.f(functionList.value, (section, idx, i0) => {
return common_vendor.e({
a: section.title
}, section.title ? {
@@ -163,9 +196,9 @@
d: idx
});
}),
- i: common_vendor.o(handleLogout),
- j: common_vendor.gei(_ctx, "")
- };
+ o: common_vendor.o(handleLogout),
+ p: common_vendor.gei(_ctx, "")
+ });
};
}
};
--
Gitblit v1.9.3