Files
qingcheng-xiaochengxu/pages/loginModule/pwdLogin/pwdLogin.wxml

107 lines
3.6 KiB
Plaintext
Raw Normal View History

2025-05-17 23:17:14 +08:00
<view class="flex-col page">
2025-07-20 18:22:59 +08:00
<image class="self-center image" src="./images/logo.png" />
2025-05-17 23:17:14 +08:00
2025-07-20 18:22:59 +08:00
<view class="flex-col items-center self-stretch group">
<!-- 加上 bold-text -->
<text class="font text bold-text">欢迎登陆—青橙校园</text>
<text class="font mt-12">{{ showRole }}端)</text>
</view>
<view class="flex-col self-stretch group_2">
2025-05-17 23:17:14 +08:00
<view class="flex-row">
2025-07-20 18:22:59 +08:00
<!-- 密码登录 -->
2025-05-17 23:17:14 +08:00
<text
2025-07-20 18:22:59 +08:00
class="font_2 toggle-text {{loginType==='password'?'active':''}}"
2025-05-17 23:17:14 +08:00
bindtap="switchToPassword"
>密码登录</text>
2025-07-20 18:22:59 +08:00
<!-- 验证码登录 -->
2025-05-17 23:17:14 +08:00
<text
2025-07-20 18:22:59 +08:00
class="font_2 ml-8 toggle-text {{loginType==='sms'?'active':''}}"
bindtap="switchToSms" wx:if="{{ role === 'user' }}"
2025-05-17 23:17:14 +08:00
>验证码登录</text>
</view>
<view class="flex-col group_1 mt-20">
2025-07-20 18:22:59 +08:00
<!-- 手机号 输入框,保持原 .text-wrapper 样式 -->
2025-05-17 23:17:14 +08:00
<view class="flex-col self-stretch">
<view class="flex-col justify-start relative section">
<input
2025-07-20 18:22:59 +08:00
class="text-wrapper"
2025-05-17 23:17:14 +08:00
placeholder="请输入手机号"
2025-07-20 18:22:59 +08:00
value="{{phone}}"
bindinput="onPhoneInput"
2025-05-17 23:17:14 +08:00
maxlength="11"
2025-06-06 13:16:14 +08:00
type="number"
2025-05-17 23:17:14 +08:00
/>
</view>
2025-07-20 18:22:59 +08:00
</view>
2025-05-17 23:17:14 +08:00
2025-07-20 18:22:59 +08:00
<!-- 密码/验证码 输入框,保持原 .text-wrapper_2 样式 -->
<view class="flex-row items-center section_2 mt-21">
<input
class="text-wrapper"
placeholder="{{ loginType==='password' ? '请输入密码' : '请输入验证码' }}"
value="{{credential}}"
bindinput="onCredentialInput"
password="{{ loginType==='password' }}"
type="{{ loginType==='sms' ? 'number' : 'text' }}"
/>
<!-- 仅验证码登录时显示倒计时按钮 -->
<view
class="flex-col justify-start items-center shrink-0 text-wrapper_3 ml-2"
bindtap="getSmsCode"
wx:if="{{ loginType==='sms' }}"
>
<text class="text_6">{{ codeButtonText }}</text>
2025-05-17 23:17:14 +08:00
</view>
</view>
2025-07-20 18:22:59 +08:00
<!-- 忘记密码,仅密码登录时显示 -->
<text
class="self-end font_4 text_7"
bindtap="gotoForgetPwd"
wx:if="{{ loginType==='password' }}"
>忘记密码</text>
2025-05-17 23:17:14 +08:00
<!-- 登录按钮 -->
2025-07-20 18:22:59 +08:00
<view
class="flex-col justify-start items-center self-stretch text-wrapper_4"
2025-05-17 23:17:14 +08:00
bindtap="onLogin"
>
<text class="text_8">登录</text>
</view>
2025-07-20 18:22:59 +08:00
<!-- 协议勾选 -->
<view class="flex-row items-center self-stretch group_3">
<checkbox-group bindchange="onAgreeChange">
<checkbox
class="checkbox"
value="agree"
checked="{{ isAgree }}"
color="#FF8D1A"
/>
2025-05-17 23:17:14 +08:00
</checkbox-group>
2025-07-20 18:22:59 +08:00
<view class="group_4 ml-12">
<text class="font_5 text_9">登录代表您已同意</text>
<text class="font_5" bindtap="gotoAgreement">《用户协议》</text>
2025-05-17 23:17:14 +08:00
<text class="text_10">&</text>
2025-07-20 18:22:59 +08:00
<text class="font_5" bindtap="gotoPolicy">《隐私协议》</text>
2025-05-17 23:17:14 +08:00
</view>
</view>
2025-07-20 18:22:59 +08:00
<!-- 去注册 -->
2025-08-07 11:45:28 +08:00
<view class="self-center group_5" wx:if="{{isShowRegister}}">
2025-07-20 18:22:59 +08:00
<text class="font_4 text_11">没有账号?</text>
<text class="font_5 text_12" bindtap="gotoRegister">去注册→</text>
2025-05-17 23:17:14 +08:00
</view>
</view>
</view>
2025-07-20 18:22:59 +08:00
<view class="flex-row justify-evenly items-center self-end section_3" bind:tap="joinUs" wx:if="{{ role === 'user' }}">
<text class="font_2 text_13">加入我们</text>
<image class="image_3" src="./images/joinus.png" />
</view>
2025-05-17 23:17:14 +08:00
</view>