- 修改数据库配置将MYSQL_DB从mys_info_v3改为mys_info_test - 新增auth_users表wechat_openid字段并建立唯一索引 - 为plan_checkins表添加计划性能索引(idx_plan_period_student) - 将checkin_records_old表关联方式从student_id改为user_id - 将plan_checkins表关联方式从student_id改为user_id并更新附件路径 - 移除routes/auth.py中的uuid导入使用安全token生成函数 - 重构routes/checkin.py打卡逻辑去除course_type字段并优化返回结构 - 添加打卡时间限制验证功能防止过期打卡操作 - 实现小组统计功能支持老师查看各组打卡情况 - 更新主页index.html界面适配新的打卡和计划功能 - 调整计划提交时间规则为周五至周四周期 - 添加月度和年度计划提交状态验证机制
117 lines
4.5 KiB
Plaintext
117 lines
4.5 KiB
Plaintext
<view class="page" wx:if="{{view === 'loading'}}">
|
|
<view class="card skeleton-card">
|
|
<view class="skeleton skeleton-avatar"></view>
|
|
<view class="skeleton-line w-60"></view>
|
|
<view class="skeleton-line w-40"></view>
|
|
<view class="skeleton-line w-80"></view>
|
|
<view class="skeleton-line w-70"></view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="page" wx:elif="{{view === 'loadError'}}">
|
|
<view class="error-card">
|
|
<view class="error-icon">!</view>
|
|
<view class="error-title">{{loadError || '加载失败,请稍后再试'}}</view>
|
|
<button class="btn-retry btn-primary" hover-class="btn-hover" bindtap="onRetry">重新加载</button>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="page" wx:elif="{{view === 'phoneLogin'}}">
|
|
<view class="login-wrap">
|
|
<view class="login-card">
|
|
<view class="login-icon">👤</view>
|
|
<view class="login-title">手机号快捷登录</view>
|
|
<view class="login-desc">未找到你的账号,请使用手机号登录。手机号仅用于账号绑定,不会公开展示。</view>
|
|
<button
|
|
class="btn-phone btn-primary"
|
|
open-type="getPhoneNumber"
|
|
bindgetphonenumber="onGetPhoneNumber"
|
|
loading="{{phoneLoading}}"
|
|
disabled="{{phoneLoading}}"
|
|
hover-class="btn-hover"
|
|
>{{phoneLoading ? '登录中...' : '手机号快捷登录'}}</button>
|
|
<view class="privacy-row">
|
|
<view class="checkbox {{privacyAgreed ? 'checked' : ''}}" bindtap="togglePrivacy">
|
|
<text wx:if="{{privacyAgreed}}" class="check-icon">✓</text>
|
|
</view>
|
|
<view class="privacy-text">
|
|
我已阅读并同意
|
|
<text class="link" data-type="agreement" catchtap="openPrivacy">《用户协议》</text>
|
|
和
|
|
<text class="link" data-type="privacy" catchtap="openPrivacy">《隐私政策》</text>
|
|
</view>
|
|
</view>
|
|
<view class="error" wx:if="{{phoneError}}">{{phoneError}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<block wx:elif="{{profile}}">
|
|
<view class="page has-bottom">
|
|
<view class="card profile-card">
|
|
<view class="profile-head">
|
|
<view class="avatar-click">
|
|
<button
|
|
class="avatar-btn"
|
|
open-type="chooseAvatar"
|
|
bindchooseavatar="onChooseAvatar"
|
|
disabled="{{avatarUploading}}"
|
|
hover-class="avatar-hover"
|
|
>
|
|
<image wx:if="{{avatarSrc}}" class="avatar" src="{{avatarSrc}}" mode="aspectFill"></image>
|
|
<text wx:else class="avatar avatar-fallback">{{avatarFallback}}</text>
|
|
</button>
|
|
<view class="avatar-camera" wx:if="{{!avatarUploading}}">📷</view>
|
|
</view>
|
|
<view class="profile-meta">
|
|
<view class="profile-row">
|
|
<text class="profile-name">{{profile.display_name}}</text>
|
|
<text class="badge role" wx:if="{{roleLabel}}">{{roleLabel}}</text>
|
|
</view>
|
|
<view class="profile-sub">{{profile.student_id}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="card info-card">
|
|
<view class="info-title">个人信息</view>
|
|
<view class="info-row">
|
|
<text class="info-label">姓名</text>
|
|
<text class="info-value">{{profile.name}}</text>
|
|
</view>
|
|
<view class="info-row">
|
|
<text class="info-label">学号</text>
|
|
<text class="info-value">{{profile.student_id}}</text>
|
|
</view>
|
|
<view class="info-row">
|
|
<text class="info-label">手机号</text>
|
|
<text class="info-value">{{profile.phone || '未绑定'}}</text>
|
|
</view>
|
|
<view class="info-row">
|
|
<text class="info-label">角色</text>
|
|
<text class="info-value">{{roleLabel}}</text>
|
|
</view>
|
|
<view class="info-row">
|
|
<text class="info-label">小组</text>
|
|
<text class="info-value">{{profile.group || '未分组'}}</text>
|
|
</view>
|
|
<view class="info-row">
|
|
<text class="info-label">登录方式</text>
|
|
<text class="info-value">{{loginTypeLabel}}</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="card classlist-card" wx:if="{{classGroups.length}}">
|
|
<view class="info-title">小组分组</view>
|
|
<view class="class-row" wx:for="{{classGroups}}" wx:key="class_id">
|
|
<text class="info-label">{{item.period || item.class_code}}</text>
|
|
<text class="info-value">{{item.group}} · {{item.role}}</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="bottom-actions">
|
|
<button class="btn-logout" hover-class="btn-hover" bindtap="logoutAccount">退出登录</button>
|
|
</view>
|
|
</view>
|
|
|
|
</block> |