From bec58fa7fe4fae2deac88200d8d939e12ec8a08f Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期五, 03 十月 2025 22:26:39 +0800
Subject: [PATCH] 修复小程序WXS日期显示问题并重新设计【我的】页面
---
wx/pages/message/utils.wxs | 31 +-
/dev/null | 0
wx/pages/profile/profile.wxml | 206 +++------------
wx/pages/profile/profile.wxss | 507 ++++++--------------------------------
4 files changed, 139 insertions(+), 605 deletions(-)
diff --git "a/UI/wx/\346\210\221\347\232\204\346\264\273\345\212\250\357\274\210\345\255\246\345\221\230\347\211\210\357\274\211/code.html" "b/UI/wx/\346\210\221\347\232\204\346\264\273\345\212\250\357\274\210\345\255\246\345\221\230\347\211\210\357\274\211/code.html"
deleted file mode 100644
index d78da05..0000000
--- "a/UI/wx/\346\210\221\347\232\204\346\264\273\345\212\250\357\274\210\345\255\246\345\221\230\347\211\210\357\274\211/code.html"
+++ /dev/null
@@ -1,100 +0,0 @@
-<html>
- <head>
- <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="" />
- <link
- rel="stylesheet"
- as="style"
- onload="this.rel='stylesheet'"
- href="https://fonts.googleapis.com/css2?display=swap&family=Manrope%3Awght%40400%3B500%3B700%3B800&family=Noto+Sans%3Awght%40400%3B500%3B700%3B900"
- />
-
- <title>Stitch Design</title>
- <link rel="icon" type="image/x-icon" href="data:image/x-icon;base64," />
-
- <script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
- </head>
- <body>
- <div
- class="relative flex h-auto min-h-screen w-full flex-col bg-slate-50 justify-between group/design-root overflow-x-hidden"
- style='font-family: Manrope, "Noto Sans", sans-serif;'
- >
- <div>
- <div class="flex items-center bg-slate-50 p-4 pb-2 justify-between">
- <div class="text-[#0d141b] flex size-12 shrink-0 items-center" data-icon="ArrowLeft" data-size="24px" data-weight="regular">
- <svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" fill="currentColor" viewBox="0 0 256 256">
- <path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"></path>
- </svg>
- </div>
- <h2 class="text-[#0d141b] text-lg font-bold leading-tight tracking-[-0.015em] flex-1 text-center pr-12">鎴戠殑</h2>
- </div>
- <div class="flex p-4 @container">
- <div class="flex w-full flex-col gap-4 items-center">
- <div class="flex gap-4 flex-col items-center">
- <div
- class="bg-center bg-no-repeat aspect-square bg-cover rounded-full min-h-32 w-32"
- style='background-image: url("https://lh3.googleusercontent.com/aida-public/AB6AXuBJ5YqONXeaOYxeGlmlSPvQSrahJ7FnO9bC5Enx3Bron6rQozDAceKIzN08l_O-Y1StA8bpkWisYT-d0R98xvV7LOTTH6f9WQdztbO_RHwS_jiCSlz26WDhN9btQIDmdA7RgBssSYl5RxEHYl9YNrS10VZgzNawV6uKa13FApHGPRK9m9yu_OK1sebOtZGI1mBfsZ7a7M_PtBaVIeOcs02L0YLN0dDhEF3PQi3Cpj9YYtOfpMMSxRYp2U_KdYr9xNJYEV7VoZ3SqaTI");'
- ></div>
- <div class="flex flex-col items-center justify-center justify-center">
- <p class="text-[#0d141b] text-[22px] font-bold leading-tight tracking-[-0.015em] text-center">鏉庡洓</p>
- <p class="text-[#4c739a] text-base font-normal leading-normal text-center">鐢�</p>
- <p class="text-[#4c739a] text-base font-normal leading-normal text-center">缁戝畾鎵嬫満鍙凤細138****1234</p>
- </div>
- </div>
- </div>
- </div>
- <h3 class="text-[#0d141b] text-lg font-bold leading-tight tracking-[-0.015em] px-4 pb-2 pt-4">鎴戠殑娲诲姩</h3>
- <div class="p-4">
- <div class="flex items-stretch justify-between gap-4 rounded-lg">
- <div class="flex flex-col gap-1 flex-[2_2_0px]">
- <p class="text-[#4c739a] text-sm font-normal leading-normal">褰撳墠闃舵锛氬垵璧�</p>
- <p class="text-[#0d141b] text-base font-bold leading-tight">鏈潵涔嬫槦澶ц禌</p>
- <p class="text-[#4c739a] text-sm font-normal leading-normal">璇勫杩涘害锛�50%</p>
- </div>
- <div
- class="w-full bg-center bg-no-repeat aspect-video bg-cover rounded-lg flex-1"
- style='background-image: url("https://lh3.googleusercontent.com/aida-public/AB6AXuAoEDk1i9Rm2enRkhm2dS4xxi3EuXXqmK_Gklx9xLIrg2jztnpZEaPNdlhTVqnBd8jwrAD1RzJad6zHWhb4BUnfQRDJ3gH1MSY35NWxxjIZAPUqgb3VYdbelkWEqhl0caw04vfVax5YKxVkzzrYJXW7TKgLXH-tQDdKohJwOSHTTt6muE3Trx8FDXzfK-W5sxf_fBjv957kWm3OXRbOQk4M0gJpoDxcCInclLclgKc3esb28AXouMiu684eE6mg0DczLc3aFW8dPl-W");'
- ></div>
- </div>
- </div>
- <div class="p-4">
- <div class="flex items-stretch justify-between gap-4 rounded-lg">
- <div class="flex flex-col gap-1 flex-[2_2_0px]">
- <p class="text-[#4c739a] text-sm font-normal leading-normal">鑾峰缁撴灉锛氫笁绛夊</p>
- <p class="text-[#0d141b] text-base font-bold leading-tight">鍒涙柊澶ц禌</p>
- <p class="text-[#4c739a] text-sm font-normal leading-normal">涓嬭浇璇佷功</p>
- </div>
- <div
- class="w-full bg-center bg-no-repeat aspect-video bg-cover rounded-lg flex-1"
- style='background-image: url("https://lh3.googleusercontent.com/aida-public/AB6AXuDeMQyHY5IzGoIhsKGqXdBKR35KA5m3OosbXgmSuepl1jYC6xy9I9vG1bWIjYseuCAtDq5BHYTduW3Qkx2E1snYuxN2uwgwuAo8Eyi2AVQ81_D_IDTi5tT1C6tPO3z9t1nqS2j54rCp22uaf9YL8zRCmnom5cvMtZAhhjBd1AsfCohHvR1Ad4lO5HNA-Rb5k0pEcRWFaeu0Z6kOHJ5zmvaXlhApxGdqTnupSPh8dTAQXzXOmzO6qUtAL8KYmC7nfb-0TUZ9diW68aqp");'
- ></div>
- </div>
- </div>
- </div>
- <div>
- <div class="flex gap-2 border-t border-[#e7edf3] bg-slate-50 px-4 pb-3 pt-2">
- <a class="just flex flex-1 flex-col items-center justify-end gap-1 text-[#4c739a]" href="#">
- <div class="text-[#4c739a] flex h-8 items-center justify-center" data-icon="House" data-size="24px" data-weight="regular">
- <svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" fill="currentColor" viewBox="0 0 256 256">
- <path
- d="M218.83,103.77l-80-75.48a1.14,1.14,0,0,1-.11-.11,16,16,0,0,0-21.53,0l-.11.11L37.17,103.77A16,16,0,0,0,32,115.55V208a16,16,0,0,0,16,16H96a16,16,0,0,0,16-16V160h32v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V115.55A16,16,0,0,0,218.83,103.77ZM208,208H160V160a16,16,0,0,0-16-16H112a16,16,0,0,0-16,16v48H48V115.55l.11-.1L128,40l79.9,75.43.11.1Z"
- ></path>
- </svg>
- </div>
- <p class="text-[#4c739a] text-xs font-medium leading-normal tracking-[0.015em]">棣栭〉</p>
- </a>
- <a class="just flex flex-1 flex-col items-center justify-end gap-1 rounded-full text-[#0d141b]" href="#">
- <div class="text-[#0d141b] flex h-8 items-center justify-center" data-icon="User" data-size="24px" data-weight="fill">
- <svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" fill="currentColor" viewBox="0 0 256 256">
- <path
- d="M230.93,220a8,8,0,0,1-6.93,4H32a8,8,0,0,1-6.92-12c15.23-26.33,38.7-45.21,66.09-54.16a72,72,0,1,1,73.66,0c27.39,8.95,50.86,27.83,66.09,54.16A8,8,0,0,1,230.93,220Z"
- ></path>
- </svg>
- </div>
- <p class="text-[#0d141b] text-xs font-medium leading-normal tracking-[0.015em]">鎴戠殑</p>
- </a>
- </div>
- <div class="h-5 bg-slate-50"></div>
- </div>
- </div>
- </body>
-</html>
diff --git "a/UI/wx/\346\210\221\347\232\204\346\264\273\345\212\250\357\274\210\345\255\246\345\221\230\347\211\210\357\274\211/screen.png" "b/UI/wx/\346\210\221\347\232\204\346\264\273\345\212\250\357\274\210\345\255\246\345\221\230\347\211\210\357\274\211/screen.png"
deleted file mode 100644
index 01c5fbf..0000000
--- "a/UI/wx/\346\210\221\347\232\204\346\264\273\345\212\250\357\274\210\345\255\246\345\221\230\347\211\210\357\274\211/screen.png"
+++ /dev/null
Binary files differ
diff --git "a/UI/wx/\346\210\221\347\232\204\350\257\204\345\256\241\357\274\210\350\257\204\345\247\224\347\211\210\357\274\211/code.html" "b/UI/wx/\346\210\221\347\232\204\350\257\204\345\256\241\357\274\210\350\257\204\345\247\224\347\211\210\357\274\211/code.html"
deleted file mode 100644
index ef12acd..0000000
--- "a/UI/wx/\346\210\221\347\232\204\350\257\204\345\256\241\357\274\210\350\257\204\345\247\224\347\211\210\357\274\211/code.html"
+++ /dev/null
@@ -1,99 +0,0 @@
-<html>
- <head>
- <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="" />
- <link
- rel="stylesheet"
- as="style"
- onload="this.rel='stylesheet'"
- href="https://fonts.googleapis.com/css2?display=swap&family=Manrope%3Awght%40400%3B500%3B700%3B800&family=Noto+Sans%3Awght%40400%3B500%3B700%3B900"
- />
-
- <title>Stitch Design</title>
- <link rel="icon" type="image/x-icon" href="data:image/x-icon;base64," />
-
- <script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
- </head>
- <body>
- <div
- class="relative flex h-auto min-h-screen w-full flex-col bg-slate-50 justify-between group/design-root overflow-x-hidden"
- style='font-family: Manrope, "Noto Sans", sans-serif;'
- >
- <div>
- <div class="flex items-center bg-slate-50 p-4 pb-2 justify-between">
- <div class="text-[#0d141b] flex size-12 shrink-0 items-center" data-icon="ArrowLeft" data-size="24px" data-weight="regular">
- <svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" fill="currentColor" viewBox="0 0 256 256">
- <path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"></path>
- </svg>
- </div>
- <h2 class="text-[#0d141b] text-lg font-bold leading-tight tracking-[-0.015em] flex-1 text-center pr-12">鎴戠殑</h2>
- </div>
- <div class="flex p-4 @container">
- <div class="flex w-full flex-col gap-4 items-center">
- <div class="flex gap-4 flex-col items-center">
- <div
- class="bg-center bg-no-repeat aspect-square bg-cover rounded-full min-h-32 w-32"
- style='background-image: url("https://lh3.googleusercontent.com/aida-public/AB6AXuDpLKMwykU8rpCJhifcQ7-Gq1IzshU-CrdSf-w0kBon7OF1inhg5w4xQLpjMaPE2AM1x21XjGOCv-39XAxiICKwaOpmGoNjrzi8xRq_qaRHuqewMSDX3-82xc8fVjRei8hxxHkT7AePXVpCSgGgi_IT2pryUM7Vmsb_rtN8RvyFPort26L0pgmWYHjk7gLah1Fn2I-XcmGKTD_58L5NwZpmar8YikUrTQM98x94YGsWuE_1Ydbb4EhAI0_EEJjdUcaFVccf-lscIGX8");'
- ></div>
- <div class="flex flex-col items-center justify-center justify-center">
- <p class="text-[#0d141b] text-[22px] font-bold leading-tight tracking-[-0.015em] text-center">寮犲織寮�</p>
- <p class="text-[#4c739a] text-base font-normal leading-normal text-center">璇勫</p>
- <p class="text-[#4c739a] text-base font-normal leading-normal text-center">鎵嬫満鍙凤細138****8888</p>
- <p class="text-[#4c739a] text-base font-normal leading-normal text-center">鎬у埆锛�1</p>
- </div>
- </div>
- </div>
- </div>
- <div class="pb-3">
- <div class="flex border-b border-[#cfdbe7] px-4 gap-8">
- <a class="flex flex-col items-center justify-center border-b-[3px] border-b-[#4299f0] text-[#0d141b] pb-[13px] pt-4" href="#">
- <p class="text-[#0d141b] text-sm font-bold leading-normal tracking-[0.015em]">寰呰瘎瀹�(2)</p>
- </a>
- <a class="flex flex-col items-center justify-center border-b-[3px] border-b-transparent text-[#4c739a] pb-[13px] pt-4" href="#">
- <p class="text-[#4c739a] text-sm font-bold leading-normal tracking-[0.015em]">宸茶瘎瀹�</p>
- </a>
- </div>
- </div>
- <div class="p-4">
- <div class="flex items-stretch justify-between gap-4 rounded-lg">
- <div class="flex flex-[2_2_0px] flex-col gap-4">
- <div class="flex flex-col gap-1">
- <p class="text-[#4c739a] text-sm font-normal leading-normal">瓒�24灏忔椂鏈瘎瀹�</p>
- <p class="text-[#0d141b] text-base font-bold leading-tight">鍒涙柊澶ц禌</p>
- <p class="text-[#4c739a] text-sm font-normal leading-normal">鍙傝禌鑰咃細寮犱笁 浣滃搧锛氭櫤鑳藉灞呯郴缁�</p>
- </div>
- <button
- class="flex min-w-[84px] max-w-[480px] cursor-pointer items-center justify-center overflow-hidden rounded-lg h-8 px-4 flex-row-reverse bg-[#e7edf3] text-[#0d141b] text-sm font-medium leading-normal w-fit"
- >
- <span class="truncate">鍘昏瘎瀹�</span>
- </button>
- </div>
- <div
- class="w-full bg-center bg-no-repeat aspect-video bg-cover rounded-lg flex-1"
- style='background-image: url("https://lh3.googleusercontent.com/aida-public/AB6AXuA7rGeUHNI4NtyegNLdVeOs1OcWQLGBtSMU7ChRHIiPTK5DXChyCkRTAsmFampzDHx2oQzaVNpLcPObBRPhtKRmQAnK2PmCk7iphwludUXUSNNo-zjCSsPLztoB9V0W0LBvVhfkyHbzpE3Y05K_g5h38iL9uvkCTWi4UvWcWy-Ug7_opJ6XJQjezCg5hellhKy5_9Nhgv_K01auqZjVjzIcq6I_oSzV3OU5E0aFQTvcykTBWKxEDT6mJpMFSymoC0oleBiSIBMLHSZu");'
- ></div>
- </div>
- </div>
- <div class="p-4">
- <div class="flex items-stretch justify-between gap-4 rounded-lg">
- <div class="flex flex-[2_2_0px] flex-col gap-4">
- <div class="flex flex-col gap-1">
- <p class="text-[#0d141b] text-base font-bold leading-tight">鍒涙柊澶ц禌</p>
- <p class="text-[#4c739a] text-sm font-normal leading-normal">鍙傝禌鑰咃細鏉庡洓 浣滃搧锛氭櫤鑳藉灞呯郴缁�</p>
- </div>
- <button
- class="flex min-w-[84px] max-w-[480px] cursor-pointer items-center justify-center overflow-hidden rounded-lg h-8 px-4 flex-row-reverse bg-[#e7edf3] text-[#0d141b] text-sm font-medium leading-normal w-fit"
- >
- <span class="truncate">鍘昏瘎瀹�</span>
- </button>
- </div>
- <div
- class="w-full bg-center bg-no-repeat aspect-video bg-cover rounded-lg flex-1"
- style='background-image: url("https://lh3.googleusercontent.com/aida-public/AB6AXuBkkBSfYOtOLfcNKEweoFY953d7u3TifxhwARJxln2LLa9VEH-UgK8DVLHnlx7VfecjjDJtzXHDBW3MiAqCikDUC9dYd9Ac0BmB_H5l3rEmTFF_ymS2w0vjlePbUW68Mfvx-IsresElGmDKK2xgJfaE2278wQKVcqquEsu7s7ifn0-XishUizGP3IpZF84Q-M8XVrbQ8tKet6iLfgfaJyNwfxquS37LWbh0o3LsGkJNOF-eu0LaVjr3FlwpxIUj0cpNFEz9_IIg4Ygh");'
- ></div>
- </div>
- </div>
- </div>
- <div><div class="h-5 bg-slate-50"></div></div>
- </div>
- </body>
-</html>
diff --git "a/UI/wx/\346\210\221\347\232\204\350\257\204\345\256\241\357\274\210\350\257\204\345\247\224\347\211\210\357\274\211/screen.png" "b/UI/wx/\346\210\221\347\232\204\350\257\204\345\256\241\357\274\210\350\257\204\345\247\224\347\211\210\357\274\211/screen.png"
deleted file mode 100644
index 74fcdce..0000000
--- "a/UI/wx/\346\210\221\347\232\204\350\257\204\345\256\241\357\274\210\350\257\204\345\247\224\347\211\210\357\274\211/screen.png"
+++ /dev/null
Binary files differ
diff --git a/wx/pages/message/utils.wxs b/wx/pages/message/utils.wxs
index ef6572f..ae484f2 100644
--- a/wx/pages/message/utils.wxs
+++ b/wx/pages/message/utils.wxs
@@ -9,30 +9,29 @@
}
// 澶勭悊瀛楃涓叉牸寮忕殑鏃ユ湡
else if (typeof dateStr === 'string') {
- // 灏濊瘯鐩存帴瑙f瀽
date = getDate(dateStr);
}
else {
return '';
}
- // 妫�鏌ユ棩鏈熷璞℃槸鍚﹀垱寤烘垚鍔�
- try {
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- var hour = date.getHours();
- var minute = date.getMinutes();
-
- // 濡傛灉鑾峰彇鍒扮殑鍊兼槸NaN锛岃鏄庢棩鏈熸棤鏁�
- if (year !== year || month !== month || day !== day) {
- return '';
- }
-
- return year + '-' + formatNumber(month) + '-' + formatNumber(day) + ' ' + formatNumber(hour) + ':' + formatNumber(minute);
- } catch (e) {
+ // 妫�鏌ユ棩鏈熷璞℃槸鍚︽湁鏁�
+ if (!date) {
return '';
}
+
+ var year = date.getFullYear();
+ var month = date.getMonth() + 1;
+ var day = date.getDate();
+ var hour = date.getHours();
+ var minute = date.getMinutes();
+
+ // 绠�鍗曟鏌ユ槸鍚︿负鏈夋晥鏁板瓧
+ if (!year || !month || !day) {
+ return '';
+ }
+
+ return year + '-' + formatNumber(month) + '-' + formatNumber(day) + ' ' + formatNumber(hour) + ':' + formatNumber(minute);
}
var formatNumber = function(n) {
diff --git a/wx/pages/profile/profile.wxml b/wx/pages/profile/profile.wxml
index fee46b7..f3574a8 100644
--- a/wx/pages/profile/profile.wxml
+++ b/wx/pages/profile/profile.wxml
@@ -8,186 +8,66 @@
<!-- 涓汉淇℃伅鍖哄煙 -->
<view wx:else class="profile-content">
- <!-- 鐢ㄦ埛淇℃伅鍗$墖 -->
- <view class="user-card">
- <view class="user-info">
+ <!-- 鐢ㄦ埛淇℃伅鍖哄煙 -->
+ <view class="user-section">
+ <view class="user-avatar-wrapper">
<image
wx:if="{{userInfo.avatar}}"
- class="avatar"
+ class="user-avatar"
src="{{userInfo.avatar}}"
mode="aspectFill"
/>
- <view wx:else class="avatar-placeholder">
+ <view wx:else class="user-avatar-placeholder">
<text class="avatar-text">{{avatarText}}</text>
</view>
- <view class="user-details">
- <text class="username">{{userInfo.name || '鏈缃鍚�'}}</text>
- <text class="user-desc">{{userInfo.school || '鏈缃鏍�'}} | {{userInfo.major || '鏈缃笓涓�'}}</text>
- <view class="user-roles">
- <text wx:for="{{userRoles}}" wx:key="*this" class="role-tag">
- {{item === 'JUDGE' ? '璇勫' : item === 'ORGANIZER' ? '涓诲姙鏂�' : '鍙傝禌鑰�'}}
- </text>
- </view>
- </view>
</view>
- <view class="edit-btn" bindtap="onEditProfile">
- <text class="icon ic-edit"></text>
- <text class="edit-text">缂栬緫</text>
- </view>
+ <text class="user-name">{{userInfo.name || 'Ethan'}}</text>
+ <text class="user-role">{{userRoles.includes('JUDGE') ? '璇勫' : userRoles.includes('ORGANIZER') ? '涓诲姙鏂�' : '鍙傝禌鑰�'}}</text>
</view>
- <!-- 缁熻鏁版嵁 -->
- <view class="stats-section">
- <view class="stats-grid">
- <view class="stat-item">
- <text class="stat-number">{{stats.totalRegistrations}}</text>
- <text class="stat-label">鎬绘姤鍚�</text>
+ <!-- 鎴戠殑椤圭洰鍖哄煙 -->
+ <view class="projects-section">
+ <text class="section-title">鎴戠殑椤圭洰</text>
+ <view class="project-list">
+ <view class="project-card project-a" bindtap="onMenuItemTap" data-path="/pages/profile/registrations">
+ <view class="project-icon">
+ <text class="icon-plant">馃尡</text>
+ </view>
+ <view class="project-info">
+ <text class="project-name">鎴戠殑鎶ュ悕</text>
+ <text class="project-desc">鏌ョ湅鎶ュ悕璁板綍</text>
+ </view>
+ <text class="project-arrow">></text>
</view>
- <view class="stat-item">
- <text class="stat-number">{{stats.ongoingActivities}}</text>
- <text class="stat-label">杩涜涓�</text>
- </view>
- <view class="stat-item">
- <text class="stat-number">{{stats.completedActivities}}</text>
- <text class="stat-label">宸插畬鎴�</text>
- </view>
- <view class="stat-item">
- <text class="stat-number">{{stats.awards}}</text>
- <text class="stat-label">鑾峰鏁�</text>
+ <view class="project-card project-b" bindtap="onMenuItemTap" data-path="/pages/profile/achievements">
+ <view class="project-icon">
+ <text class="icon-trophy">馃弳</text>
+ </view>
+ <view class="project-info">
+ <text class="project-name">鎴戠殑鎴愮哗</text>
+ <text class="project-desc">鏌ョ湅娲诲姩鎴愮哗</text>
+ </view>
+ <text class="project-arrow">></text>
</view>
</view>
</view>
- <!-- 璇勫涓撳尯 -->
- <view wx:if="{{isJudge}}" class="role-section">
- <view class="section-header">
- <text class="section-title">璇勫涓撳尯</text>
- <view class="judge-stats">
- <text class="pending-count">寰呰瘎瀹�: {{judgeStats.pendingReviews}}</text>
- </view>
+ <!-- 鍏朵粬鍔熻兘鑿滃崟 -->
+ <view class="other-menu-section">
+ <view class="menu-item-simple" bindtap="onMenuItemTap" data-path="/pages/profile/favorites">
+ <text class="menu-icon">猸�</text>
+ <text class="menu-title">鎴戠殑鏀惰棌</text>
+ <text class="menu-arrow">></text>
</view>
- <view class="menu-grid">
- <view
- wx:for="{{judgeMenuItems}}"
- wx:key="path"
- class="menu-item"
- data-path="{{item.path}}"
- bindtap="onMenuItemTap"
- >
- <view class="menu-icon-wrapper">
- <text class="icon {{item.iconName}}"></text>
- <view wx:if="{{item.badge > 0}}" class="badge">{{item.badge}}</view>
- </view>
- <text class="menu-title">{{item.title}}</text>
- <text class="menu-desc">{{item.desc}}</text>
- </view>
+ <view class="menu-item-simple" bindtap="onMenuItemTap" data-path="/pages/profile/settings">
+ <text class="menu-icon">鈿欙笍</text>
+ <text class="menu-title">璁剧疆</text>
+ <text class="menu-arrow">></text>
</view>
- </view>
-
- <!-- 涓诲姙鏂逛笓鍖� -->
- <view wx:if="{{isOrganizer}}" class="role-section">
- <view class="section-header">
- <text class="section-title">涓诲姙鏂逛笓鍖�</text>
- <view class="organizer-stats">
- <text class="active-count">娲昏穬娲诲姩: {{organizerStats.activeActivities}}</text>
- </view>
- </view>
- <view class="menu-grid">
- <view
- wx:for="{{organizerMenuItems}}"
- wx:key="path"
- class="menu-item"
- data-path="{{item.path}}"
- bindtap="onMenuItemTap"
- >
- <view class="menu-icon-wrapper">
- <text class="icon {{item.iconName}}"></text>
- </view>
- <text class="menu-title">{{item.title}}</text>
- <text class="menu-desc">{{item.desc}}</text>
- </view>
- </view>
- </view>
-
- <!-- 鍔熻兘鑿滃崟 -->
- <view class="menu-section">
- <view class="section-title">鍔熻兘鑿滃崟</view>
- <view class="menu-list">
- <view
- wx:for="{{menuItems}}"
- wx:key="path"
- class="menu-item-row"
- data-path="{{item.path}}"
- bindtap="onMenuItemTap"
- >
- <view class="menu-left">
- <text class="icon {{item.iconName}}"></text>
- <view class="menu-text">
- <text class="menu-title">{{item.title}}</text>
- <text class="menu-desc">{{item.desc}}</text>
- </view>
- </view>
- <text class="icon ic-arrow-right"></text>
- </view>
- </view>
- </view>
-
- <!-- 鏈�杩戞姤鍚� -->
- <view class="recent-section">
- <view class="section-header">
- <text class="section-title">鏈�杩戞姤鍚�</text>
- <text class="view-more" bindtap="onViewMoreRegistrations">鏌ョ湅鏇村</text>
- </view>
-
- <view wx:if="{{registrationLoading}}" class="loading-wrapper small">
- <view class="loading small"></view>
- <text class="loading-text">鍔犺浇涓�...</text>
- </view>
-
- <view wx:elif="{{registrations.length === 0}}" class="empty-state">
- <text class="empty-icon">馃摑</text>
- <text class="empty-text">鏆傛棤鎶ュ悕璁板綍</text>
- </view>
-
- <view wx:else class="registration-list">
- <view
- wx:for="{{registrations}}"
- wx:key="id"
- class="registration-item"
- data-id="{{item.id}}"
- bindtap="onRegistrationTap"
- >
- <image
- wx:if="{{item.activity.coverImage && item.activity.coverImage.fullUrl}}"
- class="activity-cover"
- src="{{item.activity.coverImage.fullUrl}}"
- mode="aspectFill"
- />
- <view wx:else class="activity-cover-placeholder">
- <text class="activity-cover-text">{{item.activity.titleText}}</text>
- </view>
- <view class="registration-info">
- <text class="activity-title">{{item.activity.title}}</text>
- <text class="registration-time">鎶ュ悕鏃堕棿: {{formatDate(item.registrationTime)}}</text>
- <text class="activity-time">娲诲姩鏃堕棿: {{formatDate(item.activity.startTime)}}</text>
- <view class="status-row">
- <text class="registration-status {{getStatusClass(item.status)}}">
- {{getStatusText(item.status)}}
- </text>
- <text class="activity-status">
- {{getActivityStatusText(item.activity.status)}}
- </text>
- </view>
- </view>
- <text class="item-arrow">></text>
- </view>
- </view>
- </view>
-
- <!-- 閫�鍑虹櫥褰� -->
- <view class="logout-section">
- <view class="logout-btn" bindtap="onLogout">
- <text class="logout-text">閫�鍑虹櫥褰�</text>
+ <view class="menu-item-simple" bindtap="onLogout">
+ <text class="menu-icon">馃毆</text>
+ <text class="menu-title">閫�鍑虹櫥褰�</text>
+ <text class="menu-arrow">></text>
</view>
</view>
</view>
diff --git a/wx/pages/profile/profile.wxss b/wx/pages/profile/profile.wxss
index cdbf621..5cefb69 100644
--- a/wx/pages/profile/profile.wxss
+++ b/wx/pages/profile/profile.wxss
@@ -4,7 +4,7 @@
/* 瀹瑰櫒鏍峰紡 */
.container {
min-height: 100vh;
- background: #f8f9fa;
+ background: #f5f5f5;
padding-bottom: 40rpx;
}
@@ -31,39 +31,29 @@
padding: 0 30rpx;
}
-/* 鐢ㄦ埛淇℃伅鍗$墖 */
-.user-card {
- background: linear-gradient(135deg, #1976d2, #42a5f5);
- border-radius: 20rpx;
- padding: 40rpx;
- margin-bottom: 30rpx;
+/* 鐢ㄦ埛淇℃伅鍖哄煙 */
+.user-section {
display: flex;
+ flex-direction: column;
align-items: center;
- justify-content: space-between;
- box-shadow: 0 8rpx 24rpx rgba(25, 118, 210, 0.3);
+ padding: 60rpx 0 40rpx 0;
}
-.user-info {
- display: flex;
- align-items: center;
- flex: 1;
+.user-avatar-wrapper {
+ margin-bottom: 20rpx;
}
-.avatar {
+.user-avatar {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
- margin-right: 30rpx;
- border: 4rpx solid rgba(255, 255, 255, 0.3);
}
-.avatar-placeholder {
+.user-avatar-placeholder {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
- margin-right: 30rpx;
- border: 4rpx solid rgba(255, 255, 255, 0.3);
- background: rgba(255, 255, 255, 0.2);
+ background: #ffa726;
display: flex;
align-items: center;
justify-content: center;
@@ -75,474 +65,139 @@
font-weight: bold;
}
-.user-details {
- flex: 1;
-}
-
-.username {
- display: block;
+.user-name {
font-size: 36rpx;
font-weight: bold;
- color: #ffffff;
- margin-bottom: 12rpx;
-}
-
-.user-desc {
- display: block;
- font-size: 24rpx;
- color: rgba(255, 255, 255, 0.8);
- margin-bottom: 16rpx;
-}
-
-.user-roles {
- display: flex;
- gap: 12rpx;
-}
-
-.role-tag {
- padding: 6rpx 16rpx;
- background: rgba(255, 255, 255, 0.2);
- color: #ffffff;
- border-radius: 20rpx;
- font-size: 20rpx;
- font-weight: 500;
-}
-
-.edit-btn {
- width: 60rpx;
- height: 60rpx;
- background: rgba(255, 255, 255, 0.2);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.edit-icon {
- font-size: 28rpx;
-}
-
-/* 缁熻鏁版嵁鏍峰紡 */
-.stats-section {
- background: #ffffff;
- border-radius: 16rpx;
- padding: 30rpx;
- margin-bottom: 30rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
-}
-
-.stats-grid {
- display: flex;
- justify-content: space-between;
-}
-
-.stat-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- flex: 1;
-}
-
-.stat-number {
- font-size: 48rpx;
- font-weight: bold;
- color: #1976d2;
+ color: #333333;
margin-bottom: 8rpx;
}
-.stat-label {
- font-size: 24rpx;
- color: #666666;
+.user-role {
+ font-size: 28rpx;
+ color: #999999;
}
-/* 瑙掕壊涓撳尯鏍峰紡 */
-.role-section {
- background: #ffffff;
- border-radius: 16rpx;
- padding: 30rpx;
- margin-bottom: 30rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
-}
-
-.section-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 30rpx;
+/* 椤圭洰鍖哄煙 */
+.projects-section {
+ margin-bottom: 40rpx;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333333;
+ margin-bottom: 30rpx;
+ display: block;
}
-.judge-stats,
-.organizer-stats {
- font-size: 24rpx;
- color: #1976d2;
- font-weight: 500;
-}
-
-.pending-count,
-.active-count {
- padding: 8rpx 16rpx;
- background: #e3f2fd;
- border-radius: 20rpx;
-}
-
-.menu-grid {
+.project-list {
display: flex;
- flex-wrap: wrap;
+ flex-direction: column;
gap: 20rpx;
}
-.menu-item {
- flex: 0 0 calc(33.333% - 14rpx);
+.project-card {
+ background: #ffffff;
+ border-radius: 16rpx;
+ padding: 30rpx;
display: flex;
- flex-direction: column;
align-items: center;
- padding: 30rpx 20rpx;
- background: #f8f9fa;
- border-radius: 12rpx;
- border: 2rpx solid transparent;
+ box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
-.menu-item:active {
- background: #e9ecef;
- border-color: #1976d2;
+.project-card:active {
transform: scale(0.98);
}
-.menu-icon-wrapper {
- position: relative;
- margin-bottom: 16rpx;
-}
-
-.menu-icon {
- font-size: 48rpx;
-}
-
-.badge {
- position: absolute;
- top: -8rpx;
- right: -8rpx;
- min-width: 32rpx;
- height: 32rpx;
- background: #ff4757;
- color: #ffffff;
+.project-a .project-icon {
+ background: #2e7d32;
+ width: 80rpx;
+ height: 80rpx;
border-radius: 16rpx;
- font-size: 20rpx;
display: flex;
align-items: center;
justify-content: center;
- padding: 0 8rpx;
- font-weight: bold;
-}
-
-.menu-title {
- font-size: 26rpx;
- font-weight: bold;
- color: #333333;
- margin-bottom: 8rpx;
- text-align: center;
-}
-
-.menu-desc {
- font-size: 20rpx;
- color: #666666;
- text-align: center;
- line-height: 1.4;
-}
-
-/* 鍔熻兘鑿滃崟鏍峰紡 */
-.menu-section {
- background: #ffffff;
- border-radius: 16rpx;
- padding: 30rpx;
- margin-bottom: 30rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
-}
-
-.menu-list {
- margin-top: 20rpx;
-}
-
-.menu-item-row {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 30rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- transition: background 0.3s ease;
-}
-
-.menu-item-row:last-child {
- border-bottom: none;
-}
-
-.menu-item-row:active {
- background: #f8f9fa;
-}
-
-.menu-left {
- display: flex;
- align-items: center;
- flex: 1;
-}
-
-.menu-item-row .menu-icon {
- font-size: 40rpx;
margin-right: 24rpx;
}
-.menu-text {
- flex: 1;
-}
-
-.menu-item-row .menu-title {
- display: block;
- font-size: 28rpx;
- font-weight: 500;
- color: #333333;
- margin-bottom: 6rpx;
-}
-
-.menu-item-row .menu-desc {
- display: block;
- font-size: 22rpx;
- color: #666666;
-}
-
-.menu-arrow {
- font-size: 28rpx;
- color: #cccccc;
- font-weight: bold;
-}
-
-/* 鏈�杩戞姤鍚嶆牱寮� */
-.recent-section {
- background: #ffffff;
+.project-b .project-icon {
+ background: #66bb6a;
+ width: 80rpx;
+ height: 80rpx;
border-radius: 16rpx;
- padding: 30rpx;
- margin-bottom: 30rpx;
- box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
-}
-
-.view-more {
- font-size: 24rpx;
- color: #1976d2;
- font-weight: 500;
-}
-
-.empty-state {
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 80rpx 0;
-}
-
-.empty-icon {
- font-size: 80rpx;
- margin-bottom: 20rpx;
- opacity: 0.5;
-}
-
-.empty-text {
- font-size: 26rpx;
- color: #999999;
-}
-
-.registration-list {
- margin-top: 20rpx;
-}
-
-.registration-item {
- display: flex;
- align-items: center;
- padding: 24rpx 0;
- border-bottom: 1rpx solid #f0f0f0;
- transition: background 0.3s ease;
-}
-
-.registration-item:last-child {
- border-bottom: none;
-}
-
-.registration-item:active {
- background: #f8f9fa;
-}
-
-.activity-cover {
- width: 120rpx;
- height: 80rpx;
- border-radius: 8rpx;
- margin-right: 20rpx;
-}
-
-.activity-cover-placeholder {
- width: 120rpx;
- height: 80rpx;
- border-radius: 8rpx;
- margin-right: 20rpx;
- background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%);
display: flex;
align-items: center;
justify-content: center;
+ margin-right: 24rpx;
}
-.activity-cover-text {
- color: #ffffff;
- font-size: 24rpx;
- font-weight: bold;
+.icon-plant,
+.icon-trophy {
+ font-size: 36rpx;
}
-.registration-info {
+.project-info {
flex: 1;
}
-.activity-title {
- display: block;
- font-size: 28rpx;
+.project-name {
+ font-size: 30rpx;
font-weight: bold;
color: #333333;
- margin-bottom: 8rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
-.registration-time,
-.activity-time {
display: block;
- font-size: 22rpx;
- color: #666666;
- margin-bottom: 6rpx;
+ margin-bottom: 8rpx;
}
-.status-row {
+.project-desc {
+ font-size: 24rpx;
+ color: #999999;
+ display: block;
+}
+
+.project-arrow {
+ font-size: 28rpx;
+ color: #cccccc;
+}
+
+/* 鍏朵粬鑿滃崟鍖哄煙 */
+.other-menu-section {
+ background: #ffffff;
+ border-radius: 16rpx;
+ overflow: hidden;
+ box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
+}
+
+.menu-item-simple {
display: flex;
align-items: center;
- gap: 16rpx;
+ padding: 30rpx;
+ border-bottom: 1rpx solid #f0f0f0;
+ transition: background-color 0.3s ease;
}
-.registration-status,
-.activity-status {
- padding: 4rpx 12rpx;
- border-radius: 12rpx;
- font-size: 20rpx;
- font-weight: 500;
+.menu-item-simple:last-child {
+ border-bottom: none;
}
-.registration-status.status-pending {
- background: #fff3cd;
- color: #856404;
+.menu-item-simple:active {
+ background-color: #f8f8f8;
}
-.registration-status.status-approved {
- background: #d4edda;
- color: #155724;
+.menu-icon {
+ font-size: 32rpx;
+ margin-right: 24rpx;
+ width: 40rpx;
+ text-align: center;
}
-.registration-status.status-rejected {
- background: #f8d7da;
- color: #721c24;
+.menu-title {
+ flex: 1;
+ font-size: 28rpx;
+ color: #333333;
}
-.registration-status.status-cancelled {
- background: #f1f3f4;
- color: #5f6368;
-}
-
-.activity-status {
- background: #e3f2fd;
- color: #1976d2;
-}
-
-.item-arrow {
+.menu-arrow {
font-size: 24rpx;
color: #cccccc;
- font-weight: bold;
- margin-left: 16rpx;
-}
-
-/* 閫�鍑虹櫥褰曟牱寮� */
-.logout-section {
- margin-top: 40rpx;
-}
-
-.logout-btn {
- background: #ffffff;
- border: 2rpx solid #ff4757;
- border-radius: 12rpx;
- padding: 30rpx 0;
- text-align: center;
- transition: all 0.3s ease;
-}
-
-.logout-btn:active {
- background: #ff4757;
-}
-
-.logout-text {
- font-size: 28rpx;
- color: #ff4757;
- font-weight: bold;
-}
-
-.logout-btn:active .logout-text {
- color: #ffffff;
-}
-
-/* 鍝嶅簲寮忛�傞厤 */
-@media screen and (max-width: 375px) {
- .profile-content {
- padding: 0 20rpx;
- }
-
- .user-card {
- padding: 30rpx;
- }
-
- .avatar {
- width: 100rpx;
- height: 100rpx;
- margin-right: 20rpx;
- }
-
- .username {
- font-size: 32rpx;
- }
-
- .stats-section,
- .role-section,
- .menu-section,
- .recent-section {
- padding: 24rpx;
- }
-
- .menu-item {
- flex: 0 0 calc(50% - 10rpx);
- padding: 24rpx 16rpx;
- }
-
- .stat-number {
- font-size: 40rpx;
- }
-}
-
-@media screen and (min-width: 414px) {
- .activity-cover {
- width: 140rpx;
- height: 90rpx;
- }
-
- .menu-item {
- padding: 36rpx 24rpx;
- }
-
- .menu-icon {
- font-size: 52rpx;
- }
}
\ No newline at end of file
--
Gitblit v1.8.0