lrj
2 天以前 49c254ed5bdc8348551d808ee72579a6d2221e3b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!--pages/profile/profile.wxml-->
<view class="container">
  <!-- 加载状态 -->
  <view wx:if="{{loading}}" class="loading-wrapper">
    <view class="loading"></view>
    <text class="loading-text">加载中...</text>
  </view>
 
  <!-- 个人信息区域 -->
  <view wx:else class="profile-content">
    <!-- 用户信息区域 -->
    <view class="user-section">
      <view class="user-avatar-wrapper">
        <image 
          wx:if="{{userInfo.avatar}}"
          class="user-avatar" 
          src="{{userInfo.avatar}}" 
          mode="aspectFill"
        />
        <view wx:else class="user-avatar-placeholder">
          <text class="avatar-text">{{avatarText}}</text>
        </view>
      </view>
      <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="projects-section">
      <text class="section-title">我的项目</text>
      <view class="project-list" wx:if="{{userProjects && userProjects.length > 0}}">
        <view 
          class="project-card" 
          wx:for="{{userProjects}}" 
          wx:key="id"
          bindtap="goToProjectDetail"
          data-project-id="{{item.id}}"
        >
          <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>
          <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 class="review-section" wx:if="{{isJudge}}">
      <view class="section-header">
        <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="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>
</view>