hku-class/miniprogram/pages/mine/index.wxml
2026-05-12 23:10:05 +08:00

56 lines
2.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<view class="page">
<view class="hero">
<view class="eyebrow">MY CLASSHUB</view>
<view class="hero-title">{{user.name || "我的"}}</view>
<view class="hero-subtitle">学号:{{user.student_id || "未填写"}}</view>
<view class="mine-class-pill">{{activeClassName}}</view>
</view>
<view class="section">
<view class="menu-card" bindtap="openProfile">
<view class="list-row">
<view class="row-mark">人</view>
<view class="row-body">
<view class="card-title">个人资料</view>
<view class="muted">{{user.company || "公司未填写"}} · {{user.position || "职位未填写"}}</view>
</view>
<view class="chevron"></view>
</view>
</view>
<view class="menu-card">
<view class="list-row">
<view class="row-mark">号</view>
<view class="row-body">
<view class="card-title">手机号</view>
<view class="muted">{{user.phone || "未绑定"}}</view>
</view>
</view>
</view>
<view class="menu-card">
<view class="list-row">
<view class="row-mark">微</view>
<view class="row-body">
<view class="card-title">微信绑定</view>
<view class="muted">{{user.wechat_bound ? "已绑定微信" : "未绑定微信"}}</view>
</view>
</view>
</view>
</view>
<view wx:if="{{classes.length > 1}}" class="section">
<view class="section-title">我的班级</view>
<view wx:for="{{classes}}" wx:key="id" class="menu-card" data-id="{{item.id}}" bindtap="switchClass">
<view class="list-row">
<view class="row-mark">班</view>
<view class="row-body">
<view class="card-title">{{item.name}}</view>
<view class="muted">{{item.is_active ? "当前班级" : "点击切换"}} · {{item.cohort_year}}</view>
</view>
<view wx:if="{{item.is_active}}" class="pill">当前</view>
</view>
</view>
</view>
<button class="button secondary" bindtap="logout">退出登录</button>
</view>