qingcheng-xiaochengxu/pages/loginModule/pwdLogin/pwdLogin.wxml
2025-05-28 12:51:02 +08:00

88 lines
2.9 KiB
Plaintext

<view class="flex-col page">
<image
class="self-center image"
src="./images/logo.png"
/>
<text class="self-center text">欢迎登陆—青橙校园</text>
<view class="flex-col self-stretch group">
<!-- 切换登录方式 -->
<view class="flex-row">
<text
class="font switch {{loginType==='password'?'active':'inactive'}} text_2"
bindtap="switchToPassword"
>密码登录</text>
<text
class="font switch {{loginType==='sms'?'active':'inactive'}} text_3 ml-8"
bindtap="switchToSms"
>验证码登录</text>
</view>
<view class="flex-col group_1 mt-20">
<!-- 手机号输入 -->
<view class="flex-col self-stretch">
<view class="flex-col justify-start relative section">
<input
class="flex-col justify-start items-start text-wrapper view input"
placeholder="请输入手机号"
maxlength="11"
model:value="{{phone}}"
bindinput="onPhoneInput"
/>
</view>
<!-- 密码 / 验证码 输入 + 获取验证码按钮 -->
<view class="flex-row items-center section_2 mt-21">
<input
class="flex-col justify-start items-start text-wrapper_2 view_2 input_1"
placeholder="{{ loginType==='password' ? '请输入密码' : '请输入验证码' }}"
password="{{ loginType==='password' }}"
model:value="{{credential}}"
bindinput="onCredentialInput"
/>
<text
wx:if="{{loginType==='sms'}}"
class="text_6 ml-10 get-code {{ countdown>0 ? 'disabled' : '' }}"
bindtap="{{ countdown>0 ? '' : 'getSmsCode' }}"
>{{ codeButtonText }}</text>
</view>
</view>
<text class="self-end font_3 text_7" bindtap="gotoForgetPwd">忘记密码</text>
<!-- 登录按钮 -->
<view
class="flex-col justify-start items-center self-stretch text-wrapper_3 login-button"
bindtap="onLogin"
>
<text class="text_8">登录</text>
</view>
<!-- 用户协议勾选 -->
<view class="flex-row items-center self-stretch group_2">
<checkbox-group bindchange="onAgreeChange">
<checkbox
class="checkbox"
value="agree"
checked="{{isAgree}}"
bindchange="onAgreeChange"
color="#FF8D1A"
/>
</checkbox-group>
<view class="group_3 ml-12">
<text class="font_4 text_9">登录代表您已同意</text>
<text class="font_4">《用户协议》</text>
<text class="text_10">&</text>
<text class="font_4">《隐私协议》</text>
</view>
</view>
<view class="self-center group_4">
<text class="font_3 text_11">没有账号?</text>
<text class="font_4 text_12" bindtap="gotoRegister">去注册→</text>
</view>
</view>
</view>
</view>