97 lines
5.2 KiB
Plaintext
97 lines
5.2 KiB
Plaintext
<view class="login-container">
|
|
|
|
<!-- appbar -->
|
|
<mp-bar background="linear-gradient(190deg, #49a5fc 0%, #f7f7f7 800rpx, #f7f7f7 100%)" title="身份管理" color="#fff"></mp-bar>
|
|
|
|
<!-- Logo -->
|
|
<view class="logo-box">
|
|
<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">
|
|
<!-- 角色选择 -->
|
|
<view class="role-tabs ">
|
|
<!-- <view class="tab tab-1 {{currentRole === 'user' ? 'active bluebg' : currentRole === 'teacher' ? 'fffbg' :currentRole === 'parent' ? 'bluebg' :''}}" bindtap="switchRole" data-role="user" data-id="1">
|
|
<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" data-id="2">
|
|
<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" data-id="3">
|
|
<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/login/weixin.png" class="weixin" />
|
|
<view class="agreement" bind:tap="agree" style="justify-content: center;">
|
|
<view style="padding-top: 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="goRrivacy">用户协议 </text> 与 <text class="bule-text" catch:tap="goRrivacy"> 隐私政策</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-top: 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="goRrivacy">用户协议 </text> 与 <text class="bule-text" catch:tap="goRrivacy"> 隐私政策</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-top: 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="goRrivacy">用户协议 </text> 与 <text class="bule-text" catch:tap="goRrivacy"> 隐私政策</text>
|
|
</view>
|
|
<view class="login-btn" bindtap="onParentLogin">立即登录</view>
|
|
</view>
|
|
|
|
<!-- <view class="register-link" bindtap="onRegister">还没有账号?去注册</view> -->
|
|
</view>
|
|
</view> |