2026-05-07 18:04:49 +08:00

212 lines
9.0 KiB
Plaintext

<view class="loadding" wx:if="{{isLoading}}">加载中...</view>
<view class="login-container" wx:else="">
<!-- appbar -->
<view style="padding-top:{{top}}px"></view>
<view class="appbar" style="height:{{height}}px">
<view style="height:{{height}}px;line-height: {{height}}px;color: #fff;">训练</view>
</view>
<!-- Logo -->
<view class="logo-box" wx:if="{{isSureLogin}}">
<view>
<image class="login-logo" src="../../static/logo.png" class="logo-img"></image>
<view>
<view style="font-weight: bold;">欢迎使用</view>
<view>跃动体育!</view>
</view>
</view>
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/child-play.png" class="logo-play" />
</view>
<view class="login-content" wx:if="{{isSureLogin}}">
<!-- 角色选择 -->
<view class="role-tabs ">
<!-- <view
class="tab tab-1 {{currentRole === 'user' ? 'active bluebg' : currentRole === 'teacher' ? 'fffbg' :currentRole === 'parent' ? 'bluebg' :''}}"
bindtap="switchRole" data-role="user">
<view
class="tab-box {{currentRole === 'user' ? 'tab-active-1': currentRole === 'teacher' ? 'bluebg tab-active-2-1':''}}">
<view class="tab-left-box {{currentRole === 'user' ? 'box-active' : ''}}"></view>
用户
</view>
</view> -->
<view
class="tab {{currentRole === 'teacher' ? 'active bluebg' :currentRole === 'user' ? 'fffbg' : currentRole === 'parent' ? 'fffbg': ''}}"
bindtap="switchRole" data-role="teacher">
<view
class="tab-box {{currentRole === 'user'? 'tab-active-1-2 bluebg': currentRole === 'teacher' ? 'fffbg tab-active-2' : currentRole === 'parent' ? 'bluebg tab-active-3-2':''}}">
<view class="tab-left-box {{currentRole === 'teacher' ? 'box-active' : ''}}"></view>
教师
</view>
</view>
<view class="tab tab-3 {{currentRole === 'parent' ? 'active bluebg ' :currentRole === 'teacher' ? 'fffbg': ''}}"
bindtap="switchRole" data-role="parent">
<view
class="tab-box tab-3 {{currentRole === 'user' ? 'bluebg' : currentRole === 'teacher' ? 'bluebg tab-active-2-3':currentRole === 'parent' ? 'fffbg tab-active-3' : ''}}">
<view class="tab-left-box {{currentRole === 'parent' ? 'box-active' : ''}}"></view>
家长
</view>
</view>
</view>
<!-- 用户登录表单 -->
<view class="login-card" wx:if="{{currentRole === 'user'}}">
<image src="../../static/logo.png" class="weixin" />
<view class="agreement" bind:tap="agree" style="justify-content: center;">
<view style="padding-bottom: 4rpx;margin-right: 4rpx;">
<icon class="icon-small" type="circle" size="20" wx:if="{{!agreed}}"></icon>
<icon class="icon-small" color="#0082FF" type="success" size="20" wx:else></icon>
</view> 我同意<text class="bule-text" catch:tap="goToPrivacy">用户协议 </text> 与 <text class="bule-text"
catch:tap="goToPrivacy"> 隐私政策</text>
</view>
<view class="login-btn" bind:tap="back" wx:if="{{!agreed}}">手机号快速登录</view>
<button class="login-btn wechat-login-btn" open-type="getPhoneNumber" wx:else type="primary"
bindgetphonenumber="getPhoneNumber" style="width: 100%;">
手机号快速登录
</button>
</view>
<!-- 教师登录表单 -->
<view class="login-card" wx:if="{{currentRole === 'teacher'}}">
<view class="input-group">
<input placeholder="请输入手机号" value="{{teacherPhone}}" bindinput="onTeacherPhoneInput" />
</view>
<view class="input-group">
<input placeholder="请输入密码" password value="{{teacherPassword}}" bindinput="onTeacherPasswordInput" />
</view>
<!-- <view class="remember-group">
<checkbox-group bindchange="onRememberChange">
<label><checkbox checked="{{rememberPassword}}"/> 记住密码</label>
</checkbox-group>
</view> -->
<view class="agreement" bind:tap="agree">
<view style="padding-bottom: 4rpx;margin-right: 4rpx;">
<icon class="icon-small" type="circle" size="20" wx:if="{{!agreed}}"></icon>
<icon class="icon-small" color="#0082FF" type="success" size="20" wx:else></icon>
</view> 我同意<text class="bule-text" catch:tap="goToPrivacy">用户协议 </text> 与 <text class="bule-text"
catch:tap="goToPrivacy"> 隐私政策</text>
</view>
<view class="login-btn" bindtap="onTeacherLogin">立即登录</view>
</view>
<!-- 家长登录表单 -->
<view class="login-card" wx:if="{{currentRole === 'parent'}}">
<view class="input-group">
<input placeholder="请输入学生姓名" value="{{studentName}}" bindinput="onStudentNameInput" />
</view>
<view class="input-group">
<input placeholder="请输入学生学号" value="{{studentId}}" bindinput="onStudentIdInput" />
</view>
<view class="agreement" bind:tap="agree">
<view style="padding-bottom: 4rpx;margin-right: 4rpx;">
<icon class="icon-small" type="circle" size="20" wx:if="{{!agreed}}"></icon>
<icon class="icon-small" color="#0082FF" type="success" size="20" wx:else></icon>
</view> 我同意<text class="bule-text" catch:tap="goToPrivacy">用户协议 </text> 与 <text class="bule-text"
catch:tap="goToPrivacy"> 隐私政策</text>
</view>
<view class="login-btn" bindtap="onParentLogin">立即登录</view>
</view>
<!-- <view class="register-link" bindtap="onRegister">还没有账号?去注册</view> -->
</view>
<view wx:else class="gologin">
<!-- 切换栏 -->
<view class="change-tab">
<view class="change-tab-item {{isMe?'tab-click':''}}" id="me" bind:tap="changeTab">个人</view>
<view class="change-tab-item {{isMe?'':'tab-click'}}" id="team" bind:tap="changeTab">团队</view>
</view>
<!-- 目标 -->
<view class="base-box goal" bind:tap="goLoginn" wx:if="{{isMe}}">
<view class="title">
<view class="title-before"></view>今日目标
</view>
<view>
<harf-ring percent="{{0}}"
percentStr="{{0}}" all="{{0}}" sum="{{0}}"></harf-ring>
</view>
<view class="toast">登录去设置今日目标~</view>
<view class="goal-total">
<view class="goal-total-item">
<view class="goal-total-item-top">
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/last.png" class="goal-img" />
上次跳绳(个)
</view>
<view class="goal-total-item-num">??</view>
</view>
<view class="goal-total-item">
<view class="goal-total-item-top">
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/all.png" class="goal-img" />
累计跳绳(个)
</view>
<view class="goal-total-item-num">??</view>
</view>
</view>
</view>
<!-- 统计 -->
<view class="base-box tongji" wx:if="{{isMe}}" bind:tap="goLoginn">
<view class="tongji-tit">
<view class="title">
<view class="title-before"></view>统计
</view>
<view class="plan">
追踪每刻 超越自我
</view>
</view>
<view class="tongji-tit tongji-content">
<view style="display: flex;">
<view class="img-box">
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/train/charts.png"
class="img-box-img" />
</view>
<view class="miaoshu">
登录快速查看运动数据
<view class="miaoshu-text">
今天也要努力运动呀!
</view>
</view>
</view>
<!-- <view class="right-box">
<mp-icon icon="arrow" color="#287DF6" size="{{12}}"></mp-icon>
</view> -->
</view>
</view>
<!-- 团队 -->
<view class="goal team" wx:if="{{!isMe}}">
<view>
<view class="team-tab">
<view class="team-tab-item {{teamIsMe ?'team-tab-click' :''}}" id="myCreat" bind:tap="changeTab">
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/train/team-creat.png"
wx:if="{{teamIsMe}}" mode="" />
我创建的
</view>
<view class="team-tab-item {{!teamIsMe ?'team-tab-click' :''}}" id="join" bind:tap="changeTab">
<image src="https://yuedong-wechatapplet.oss-cn-shanghai.aliyuncs.com/static/train/team-creat.png"
wx:if="{{!teamIsMe}}" mode="" />
我加入的
</view>
</view>
<view style="text-align: center;padding-top: 50rpx;">暂无群组~ 登录即刻{{teamIsMe?'创建':'加入'}}群组!</view>
<!-- <view class="btn-creat" bind:tap="goLoginn" wx:if="{{teamIsMe}}">
创建群组
</view> -->
</view>
</view>
<view class="loginnBox">
<view class="loginnBtn" bind:tap="ai">
使用智能AI跳绳</view>
</view>
</view>
</view>