小程序提交
This commit is contained in:
@ -1,88 +1,106 @@
|
||||
<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">
|
||||
<image class="self-center image" src="./images/logo.png" />
|
||||
|
||||
<!-- 切换登录方式 -->
|
||||
<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">
|
||||
<view class="flex-row">
|
||||
<!-- 密码登录 -->
|
||||
<text
|
||||
class="font switch {{loginType==='password'?'active':'inactive'}} text_2"
|
||||
class="font_2 toggle-text {{loginType==='password'?'active':''}}"
|
||||
bindtap="switchToPassword"
|
||||
>密码登录</text>
|
||||
|
||||
<!-- 验证码登录 -->
|
||||
<text
|
||||
class="font switch {{loginType==='sms'?'active':'inactive'}} text_3 ml-8"
|
||||
bindtap="switchToSms"
|
||||
class="font_2 ml-8 toggle-text {{loginType==='sms'?'active':''}}"
|
||||
bindtap="switchToSms" wx:if="{{ role === 'user' }}"
|
||||
>验证码登录</text>
|
||||
</view>
|
||||
|
||||
<view class="flex-col group_1 mt-20">
|
||||
|
||||
<!-- 手机号输入 -->
|
||||
<!-- 手机号 输入框,保持原 .text-wrapper 样式 -->
|
||||
<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"
|
||||
class="text-wrapper"
|
||||
placeholder="请输入手机号"
|
||||
value="{{phone}}"
|
||||
bindinput="onPhoneInput"
|
||||
maxlength="11"
|
||||
type="number"
|
||||
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>
|
||||
<!-- 密码/验证码 输入框,保持原 .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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 忘记密码,仅密码登录时显示 -->
|
||||
<text
|
||||
class="self-end font_4 text_7"
|
||||
bindtap="gotoForgetPwd"
|
||||
wx:if="{{ loginType==='password' }}"
|
||||
>忘记密码</text>
|
||||
|
||||
<!-- 登录按钮 -->
|
||||
<view
|
||||
class="flex-col justify-start items-center self-stretch text-wrapper_3 login-button"
|
||||
<view
|
||||
class="flex-col justify-start items-center self-stretch text-wrapper_4"
|
||||
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"
|
||||
/>
|
||||
<!-- 协议勾选 -->
|
||||
<view class="flex-row items-center self-stretch group_3">
|
||||
<checkbox-group bindchange="onAgreeChange">
|
||||
<checkbox
|
||||
class="checkbox"
|
||||
value="agree"
|
||||
checked="{{ isAgree }}"
|
||||
color="#FF8D1A"
|
||||
/>
|
||||
</checkbox-group>
|
||||
<view class="group_3 ml-12">
|
||||
<text class="font_4 text_9">登录代表您已同意</text>
|
||||
<text class="font_4" bind:tap="gotoAgreement">《用户协议》</text>
|
||||
<view class="group_4 ml-12">
|
||||
<text class="font_5 text_9">登录代表您已同意</text>
|
||||
<text class="font_5" bindtap="gotoAgreement">《用户协议》</text>
|
||||
<text class="text_10">&</text>
|
||||
<text class="font_4" bind:tap="gotoPolicy">《隐私协议》</text>
|
||||
<text class="font_5" bindtap="gotoPolicy">《隐私协议》</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 class="self-center group_5">
|
||||
<text class="font_4 text_11">没有账号?</text>
|
||||
<text class="font_5 text_12" bindtap="gotoRegister">去注册→</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<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>
|
||||
</view>
|
||||
|
Reference in New Issue
Block a user