48 lines
2.5 KiB
Plaintext
48 lines
2.5 KiB
Plaintext
<view class="page no-tab auth-page">
|
|
<view class="brand">
|
|
<view class="logo">指</view>
|
|
<text class="brand-name">{{appName}}</text>
|
|
<text class="brand-sub">美甲店预约排班管理</text>
|
|
</view>
|
|
|
|
<view class="card auth-card">
|
|
<view class="mode-tabs">
|
|
<view class="mode-tab {{loginMode === 'password' ? 'active' : ''}}" data-mode="password" bindtap="switchLoginMode">密码登录</view>
|
|
<view class="mode-tab {{loginMode === 'phone' ? 'active' : ''}}" data-mode="phone" bindtap="switchLoginMode">验证码登录</view>
|
|
</view>
|
|
|
|
<view wx:if="{{loginMode === 'password'}}" class="field">
|
|
<text class="field-label">手机号</text>
|
|
<input value="{{form.account}}" data-field="account" bindinput="onInput" placeholder="请输入手机号或账号" />
|
|
</view>
|
|
<view wx:if="{{loginMode === 'password'}}" class="field">
|
|
<text class="field-label">密码</text>
|
|
<input value="{{form.password}}" data-field="password" bindinput="onInput" password placeholder="请输入密码" />
|
|
</view>
|
|
<view wx:if="{{loginMode === 'phone'}}" class="field">
|
|
<text class="field-label">手机号</text>
|
|
<input value="{{form.phone}}" data-field="phone" bindinput="onInput" type="number" placeholder="请输入手机号" />
|
|
</view>
|
|
<view wx:if="{{loginMode === 'phone'}}" class="field">
|
|
<text class="field-label">验证码</text>
|
|
<view class="code-row">
|
|
<input class="code-input" value="{{form.code}}" data-field="code" bindinput="onInput" type="number" placeholder="请输入验证码" />
|
|
<button class="code-btn" loading="{{codeLoading}}" disabled="{{codeLoading || countdown > 0}}" bindtap="sendLoginCode">
|
|
{{countdown > 0 ? countdown + 's' : '获取验证码'}}
|
|
</button>
|
|
</view>
|
|
</view>
|
|
<view wx:if="{{loginMode === 'phone'}}" class="agreement-row" bindtap="toggleAgreement">
|
|
<view class="agreement-check {{agreementAccepted ? 'checked' : ''}}">{{agreementAccepted ? '✓' : ''}}</view>
|
|
<view class="agreement-copy">我已阅读并同意用户协议和隐私政策</view>
|
|
</view>
|
|
<button class="primary-btn login-btn" loading="{{loading}}" bindtap="submit">登录</button>
|
|
<view class="auth-links">
|
|
<button class="text-btn">忘记密码</button>
|
|
<button class="text-btn" bindtap="goRegister">注册账号</button>
|
|
</view>
|
|
</view>
|
|
|
|
<button class="secondary-btn wechat-btn" bindtap="wechatLogin">微信快捷登录</button>
|
|
</view>
|