133 lines
8.0 KiB
Plaintext
133 lines
8.0 KiB
Plaintext
<navigation-bar title="账号中心" back="{{false}}" color="#2d2430" background="#fff7f8"></navigation-bar>
|
|
|
|
<view class="page-shell auth-page">
|
|
<view class="page-content auth-content">
|
|
<view class="page-hero auth-hero">
|
|
<text class="hero-kicker">YUMI NAIL</text>
|
|
<text class="hero-title">{{activeTab === 'login' ? '登录后继续预约与收藏' : '注册账号,开始你的美甲旅程'}}</text>
|
|
<text class="hero-desc">支持账号密码或手机验证码,绑定门店后,下单和查看记录都会更顺手。</text>
|
|
|
|
<view class="auth-benefits">
|
|
<view class="auth-benefit">
|
|
<text class="auth-benefit-title">收藏同步</text>
|
|
<text class="auth-benefit-desc">喜欢的作品随时可回看</text>
|
|
</view>
|
|
<view class="auth-benefit">
|
|
<text class="auth-benefit-title">预约顺手</text>
|
|
<text class="auth-benefit-desc">登录后直接补全预约信息</text>
|
|
</view>
|
|
<view class="auth-benefit">
|
|
<text class="auth-benefit-title">门店绑定</text>
|
|
<text class="auth-benefit-desc">注册时即可关联常用门店</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="page-card auth-card">
|
|
<view class="tab-row">
|
|
<view class="tab-item {{activeTab === 'login' ? 'active' : ''}}" data-tab="login" bindtap="handleTabChange">登录</view>
|
|
<view class="tab-item {{activeTab === 'register' ? 'active' : ''}}" data-tab="register" bindtap="handleTabChange">注册</view>
|
|
</view>
|
|
|
|
<view wx:if="{{activeTab === 'login'}}" class="toggle-row">
|
|
<view class="toggle-item {{loginType === 'password' ? 'active' : ''}}" data-type="password" bindtap="handleLoginTypeChange">账号密码登录</view>
|
|
<view class="toggle-item {{loginType === 'phone' ? 'active' : ''}}" data-type="phone" bindtap="handleLoginTypeChange">验证码登录</view>
|
|
</view>
|
|
|
|
<view class="auth-helper">
|
|
{{activeTab === 'login' ? (loginType === 'password' ? '输入账号和密码即可登录。' : '手机号登录时会发送短信验证码。') : '注册前会实时检查账号和手机号是否已被占用。'}}
|
|
</view>
|
|
|
|
<block wx:if="{{activeTab === 'register'}}">
|
|
<view class="field-block">
|
|
<text class="field-label">昵称</text>
|
|
<input class="field-input" placeholder="请输入昵称" placeholder-class="field-placeholder" value="{{form.nickname}}" data-field="nickname" bindinput="handleInputChange"></input>
|
|
</view>
|
|
</block>
|
|
|
|
<view class="field-block">
|
|
<text class="field-label">账号</text>
|
|
<input class="field-input" placeholder="请输入账号" placeholder-class="field-placeholder" value="{{form.account}}" data-field="account" bindinput="handleInputChange" bindblur="handleAccountBlur"></input>
|
|
<text wx:if="{{activeTab === 'login' && loginAccountStatusText}}" class="status-text {{loginAccountStatusType}}">{{loginAccountStatusText}}</text>
|
|
<text wx:if="{{activeTab === 'register' && registerAccountStatusText}}" class="status-text {{registerAccountStatusType}}">{{registerAccountStatusText}}</text>
|
|
</view>
|
|
|
|
<view wx:if="{{activeTab === 'register' || loginType === 'phone'}}" class="field-block">
|
|
<text class="field-label">手机号</text>
|
|
<input class="field-input" type="number" placeholder="请输入手机号" placeholder-class="field-placeholder" value="{{form.phone}}" data-field="phone" bindinput="handleInputChange" bindblur="handlePhoneBlur"></input>
|
|
<text wx:if="{{activeTab === 'register' && registerPhoneStatusText}}" class="status-text {{registerPhoneStatusType}}">{{registerPhoneStatusText}}</text>
|
|
</view>
|
|
|
|
<view wx:if="{{activeTab === 'login' && loginType === 'password'}}" class="field-block">
|
|
<text class="field-label">密码</text>
|
|
<input class="field-input" password placeholder="请输入密码" placeholder-class="field-placeholder" value="{{form.password}}" data-field="password" bindinput="handleInputChange"></input>
|
|
</view>
|
|
|
|
<view wx:if="{{activeTab === 'register' || loginType === 'phone'}}" class="field-block">
|
|
<text class="field-label">验证码</text>
|
|
<view class="code-row">
|
|
<input class="field-input code-input" type="number" placeholder="请输入验证码" placeholder-class="field-placeholder" value="{{form.verificationCode}}" data-field="verificationCode" bindinput="handleInputChange"></input>
|
|
<view class="code-btn {{countdown > 0 ? 'disabled' : ''}}" bindtap="handleSendCode">{{countdown > 0 ? countdown + 's' : '发送验证码'}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{activeTab === 'register'}}" class="field-block">
|
|
<text class="field-label">密码</text>
|
|
<input class="field-input" password placeholder="请输入密码" placeholder-class="field-placeholder" value="{{form.password}}" data-field="password" bindinput="handleInputChange"></input>
|
|
</view>
|
|
|
|
<view wx:if="{{activeTab === 'register'}}" class="field-block">
|
|
<text class="field-label">确认密码</text>
|
|
<input class="field-input" password placeholder="请再次输入密码" placeholder-class="field-placeholder" value="{{form.confirmPassword}}" data-field="confirmPassword" bindinput="handleInputChange"></input>
|
|
</view>
|
|
|
|
<view wx:if="{{activeTab === 'register'}}" class="field-block">
|
|
<text class="field-label">选择门店</text>
|
|
<picker mode="selector" range="{{shops}}" range-key="shopName" value="{{registerShopIndex}}" bindchange="handleRegisterShopChange">
|
|
<view class="field-picker">{{registerShopDisplayName || '请选择门店'}}</view>
|
|
</picker>
|
|
</view>
|
|
|
|
<view wx:if="{{activeTab === 'login' && !allowLoginShopless && loginShops.length}}" class="field-block">
|
|
<text class="field-label">选择登录门店</text>
|
|
<picker mode="selector" range="{{loginShops}}" range-key="shopName" value="{{loginShopIndex}}" bindchange="handleLoginShopChange">
|
|
<view class="field-picker">{{loginShopDisplayName || '请选择登录门店'}}</view>
|
|
</picker>
|
|
</view>
|
|
|
|
<view wx:if="{{activeTab === 'login' && loginShopMessage}}" class="hint-card login-shop-tip">{{loginShopMessage}}</view>
|
|
|
|
<view wx:if="{{activeTab === 'login'}}" class="aux-row">
|
|
<text class="aux-link" bindtap="handleToggleResetPanel">忘记密码?</text>
|
|
</view>
|
|
|
|
<view class="primary-btn submit-btn" bindtap="handleSubmit">{{activeTab === 'login' ? '立即登录' : '完成注册'}}</view>
|
|
</view>
|
|
|
|
<view wx:if="{{showResetPanel}}" class="page-card reset-card">
|
|
<view class="section-title">重置密码</view>
|
|
<view class="section-subtitle">使用手机验证码设置新的登录密码。</view>
|
|
|
|
<view class="field-block">
|
|
<text class="field-label">手机号</text>
|
|
<input class="field-input" type="number" placeholder="请输入绑定手机号" placeholder-class="field-placeholder" value="{{resetForm.phone}}" data-field="phone" bindinput="handleResetInputChange"></input>
|
|
</view>
|
|
|
|
<view class="field-block">
|
|
<text class="field-label">验证码</text>
|
|
<view class="code-row">
|
|
<input class="field-input code-input" type="number" placeholder="请输入验证码" placeholder-class="field-placeholder" value="{{resetForm.verificationCode}}" data-field="verificationCode" bindinput="handleResetInputChange"></input>
|
|
<view class="code-btn {{forgotCountdown > 0 ? 'disabled' : ''}}" bindtap="handleSendForgotCode">{{forgotCountdown > 0 ? forgotCountdown + 's' : '发送验证码'}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="field-block">
|
|
<text class="field-label">新密码</text>
|
|
<input class="field-input" password placeholder="请输入新密码" placeholder-class="field-placeholder" value="{{resetForm.newPassword}}" data-field="newPassword" bindinput="handleResetInputChange"></input>
|
|
</view>
|
|
|
|
<view class="primary-btn submit-btn" bindtap="handleResetPassword">确认重置密码</view>
|
|
</view>
|
|
</view>
|
|
</view>
|