From f64693c0da5483d8670220bf3a5bf89a32e94a20 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期五, 07 十一月 2025 10:34:21 +0800
Subject: [PATCH] 解决线上打包问题
---
wx/pages/profile/profile.wxml | 245 ++++++++++++++++++-------------------------------
1 files changed, 90 insertions(+), 155 deletions(-)
diff --git a/wx/pages/profile/profile.wxml b/wx/pages/profile/profile.wxml
index fee46b7..6b3b802 100644
--- a/wx/pages/profile/profile.wxml
+++ b/wx/pages/profile/profile.wxml
@@ -8,187 +8,122 @@
<!-- 涓汉淇℃伅鍖哄煙 -->
<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 class="user-info">
+ <text class="user-name">{{userInfo.name || 'Ethan'}}</text>
+ <text class="user-role">{{userRoles.includes('JUDGE') ? '璇勫' : userRoles.includes('ORGANIZER') ? '涓诲姙鏂�' : '鍙傝禌鑰�'}}</text>
+ </view>
+ <view class="settings-btn" bindtap="goToPersonalInfo">
+ <text class="icon-settings">鈿欙笍</text>
</view>
</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>
- <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>
- </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>
- <view class="menu-grid">
+ <!-- 鎴戠殑椤圭洰鍖哄煙 -->
+ <view class="projects-section">
+ <text class="section-title">鎴戠殑椤圭洰</text>
+ <view class="project-list" wx:if="{{userProjects && userProjects.length > 0}}">
<view
- wx:for="{{judgeMenuItems}}"
- wx:key="path"
- class="menu-item"
- data-path="{{item.path}}"
- bindtap="onMenuItemTap"
+ class="project-card"
+ wx:for="{{userProjects}}"
+ wx:key="id"
+ bindtap="goToProjectDetail"
+ data-project-id="{{item.id}}"
>
- <view class="menu-icon-wrapper">
- <text class="icon {{item.iconName}}"></text>
- <view wx:if="{{item.badge > 0}}" class="badge">{{item.badge}}</view>
+ <view class="project-icon">
+ <!-- 濡傛灉鏈夌缉鐣ュ浘锛屾樉绀哄浘鐗� -->
+ <image
+ wx:if="{{item.thumbnailUrl}}"
+ class="project-thumbnail"
+ src="{{item.thumbnailUrl}}"
+ mode="aspectFill"
+ />
+ <!-- 鍚﹀垯鏄剧ず鍥炬爣 -->
+ <text wx:else class="icon {{item.icon}}"></text>
</view>
- <text class="menu-title">{{item.title}}</text>
- <text class="menu-desc">{{item.desc}}</text>
+ <view class="project-info">
+ <text class="project-title">{{item.projectName || '鏈懡鍚嶉」鐩�'}}</text>
+ <text class="project-subtitle">{{item.activityName || ''}}</text>
+ </view>
+ <view class="project-status">
+ <text class="status-text status-{{item.statusType}}">{{item.statusText}}</text>
+ </view>
+ <text class="project-arrow">></text>
</view>
+ </view>
+ <view class="empty-projects" wx:else>
+ <text class="empty-icon">馃搵</text>
+ <text class="empty-text">鏆傛棤椤圭洰</text>
+ <text class="empty-desc">鍙傚姞娲诲姩鍚庯紝鎮ㄧ殑椤圭洰灏嗗湪杩欓噷鏄剧ず</text>
</view>
</view>
- <!-- 涓诲姙鏂逛笓鍖� -->
- <view wx:if="{{isOrganizer}}" class="role-section">
+ <!-- 鎴戠殑璇勫鍖哄煙 - 浠呰瘎濮斿彲瑙� -->
+ <view class="review-section" wx:if="{{isJudge}}">
<view class="section-header">
- <text class="section-title">涓诲姙鏂逛笓鍖�</text>
- <view class="organizer-stats">
- <text class="active-count">娲昏穬娲诲姩: {{organizerStats.activeActivities}}</text>
+ <text class="section-title">鎴戠殑璇勫</text>
+ <view class="review-action-btn" bindtap="goToReviewPage">
+ <text class="action-text">璇勫</text>
+ <text class="action-arrow">></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 class="review-stats">
+ <view class="stat-item">
+ <text class="stat-number">{{judgeStats.pendingReviews || 0}}</text>
+ <text class="stat-label">寰呰瘎瀹�</text>
+ </view>
+ <view class="stat-divider"></view>
+ <view class="stat-item">
+ <text class="stat-number">{{judgeStats.completedReviews || 0}}</text>
+ <text class="stat-label">宸茶瘎瀹�</text>
+ </view>
+ <view class="stat-divider"></view>
+ <view class="stat-item">
+ <text class="stat-number">{{judgeStats.studentUnReviewedCount || 0}}</text>
+ <text class="stat-label">瀛﹀憳鏈瘎瀹�</text>
</view>
</view>
</view>
- <!-- 閫�鍑虹櫥褰� -->
- <view class="logout-section">
- <view class="logout-btn" bindtap="onLogout">
- <text class="logout-text">閫�鍑虹櫥褰�</text>
+ <!-- 鎴戠殑瀹℃牳鍖哄煙 - 浠呭憳宸ュ彲瑙� -->
+ <view class="review-section" wx:if="{{isEmployee}}">
+ <view class="section-header">
+ <text class="section-title">鎴戠殑瀹℃牳</text>
+ <view class="review-action-btn" bindtap="goToEmployeeReviewPage">
+ <text class="action-text">瀹℃牳</text>
+ <text class="action-arrow">></text>
+ </view>
+ </view>
+
+ <view class="review-stats">
+ <view class="stat-item">
+ <text class="stat-number">{{employeeReviewStats.pendingCount || 0}}</text>
+ <text class="stat-label">寰呭鏍�</text>
+ </view>
+ <view class="stat-divider"></view>
+ <view class="stat-item">
+ <text class="stat-number">{{employeeReviewStats.approvedCount || 0}}</text>
+ <text class="stat-label">宸插鏍�</text>
+ </view>
+ <view class="stat-divider"></view>
+ <view class="stat-item">
+ <text class="stat-number">{{employeeReviewStats.rejectedCount || 0}}</text>
+ <text class="stat-label">椹冲洖</text>
+ </view>
</view>
</view>
+
</view>
-</view>
\ No newline at end of file
+</view>
--
Gitblit v1.8.0