|
|
|
@ -2,6 +2,288 @@ |
|
|
|
|
<view class="cu-modal bottom-modal" :class="{ show: showAuth }" @tap="closeAuthModal" style="z-index: 10080;"> |
|
|
|
|
<view class="login-wrap cu-dialog form-wrap safe-area-inset-bottom" @tap.stop |
|
|
|
|
style="border-radius: 20rpx 20rpx 0 0;"> |
|
|
|
|
<view v-if="authType === 'accountLogin'"> |
|
|
|
|
<!-- 标题 --> |
|
|
|
|
<view class="head-box u-m-b-60 u-flex-col "> |
|
|
|
|
<view class="u-flex u-m-b-20"> |
|
|
|
|
<view class="head-title u-m-r-40 head-title-animation">账号登录</view> |
|
|
|
|
<view class="head-title-active head-title-line" @tap="showAuthModal('smsLogin')"> |
|
|
|
|
短信登录 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="head-subtitle">如果未设置过密码,请点击忘记密码</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom "> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">账号</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" placeholder="请输入账号" @blur="checkValue($event, 'account')" |
|
|
|
|
@input="checkValue($event, 'account')" :placeholderStyle="placeholderStyle" |
|
|
|
|
v-model="form['accountLogin'].data.account" type="text"></u-input> |
|
|
|
|
<button class="u-reset-button forgot-btn" @tap="showAuthModal('forgotPwd')"> |
|
|
|
|
忘记密码 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error"> |
|
|
|
|
{{ form["accountLogin"].error.account || "" }} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">密码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" placeholder="请输入密码" :placeholderStyle="placeholderStyle" |
|
|
|
|
v-model="form['accountLogin'].data.password" type="password" |
|
|
|
|
@blur="checkValue($event, 'password')" @input="checkValue($event, 'password')"></u-input> |
|
|
|
|
<button class="u-reset-button login-btn-start" @tap="accountLoginSubmit"> |
|
|
|
|
登录 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error"> |
|
|
|
|
{{ form["accountLogin"].error.password || "" }} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<button class="u-reset-button type-btn" @tap="showAuthModal('register')"> |
|
|
|
|
立即注册 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 2.短信登录 --> |
|
|
|
|
<view v-if="authType === 'smsLogin'"> |
|
|
|
|
<view class="head-box u-m-b-60"> |
|
|
|
|
<view class="u-flex u-m-b-20"> |
|
|
|
|
<view class="head-title-active u-m-r-40" @tap="showAuthModal('accountLogin')"> |
|
|
|
|
账号登录 |
|
|
|
|
</view> |
|
|
|
|
<view class="head-title head-title-line head-title-animation"> |
|
|
|
|
短信登录 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="head-subtitle">未注册手机号请先点击下方立即注册</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">手机号</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" placeholder="请输入手机号" @blur="checkValue($event, 'mobile')" |
|
|
|
|
@input="mobileInput($event, 'mobile')" :placeholderStyle="placeholderStyle" |
|
|
|
|
v-model="form['smsLogin'].data.mobile" type="number"></u-input> |
|
|
|
|
<button class="u-reset-button code-btn code-btn-start" |
|
|
|
|
:disabled="!form['smsLogin'].data.isMobileEnd" |
|
|
|
|
:class="{ 'code-btn-end': form['smsLogin'].data.isMobileEnd }" |
|
|
|
|
@tap="getSmsCode('mobilelogin')"> |
|
|
|
|
{{ codeText }} |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["smsLogin"].error.mobile || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">验证码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'code')" |
|
|
|
|
@input="checkValue($event, 'code')" placeholder="请输入验证码" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['smsLogin'].data.code" |
|
|
|
|
type="number"></u-input> |
|
|
|
|
<button class="u-reset-button login-btn-start" @tap="smsLoginSubmit"> |
|
|
|
|
登录 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["smsLogin"].error.code || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
<button class="u-reset-button type-btn" @tap="showAuthModal('register')"> |
|
|
|
|
立即注册 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 3.注册 --> |
|
|
|
|
<view v-if="authType === 'register'"> |
|
|
|
|
<view class="head-box u-m-b-60"> |
|
|
|
|
<view class="head-title u-m-b-20">注册</view> |
|
|
|
|
<view class="head-subtitle">请使用本人手机号完成注册</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">手机号</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" placeholder="请输入手机号" @blur="checkValue($event, 'mobile')" |
|
|
|
|
@input="mobileInput($event, 'mobile')" :placeholderStyle="placeholderStyle" |
|
|
|
|
v-model="form['register'].data.mobile" type="number"></u-input> |
|
|
|
|
<button class="u-reset-button code-btn code-btn-start" |
|
|
|
|
:disabled="!form['register'].data.isMobileEnd" |
|
|
|
|
:class="{ 'code-btn-end': form['register'].data.isMobileEnd }" |
|
|
|
|
@tap="getSmsCode('register')"> |
|
|
|
|
{{ codeText }} |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["register"].error.mobile || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">密码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'password')" |
|
|
|
|
@input="checkValue($event, 'password')" placeholder="请输入密码" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['register'].data.password" |
|
|
|
|
type="password"></u-input> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["register"].error.password || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">验证码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'code')" |
|
|
|
|
@input="checkValue($event, 'code')" placeholder="请输入验证码" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['register'].data.code" |
|
|
|
|
type="number"></u-input> |
|
|
|
|
<button class="u-reset-button login-btn-start" @tap="registerSubmit"> |
|
|
|
|
注册 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["register"].error.code || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
<button v-if="!isLogin" class="u-reset-button type-btn" @tap="showAuthModal('accountLogin')"> |
|
|
|
|
返回登录 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- 4.忘记密码 --> |
|
|
|
|
<view v-if="authType === 'forgotPwd'"> |
|
|
|
|
<view class="head-box u-m-b-60"> |
|
|
|
|
<view class="head-title u-m-b-20">忘记密码</view> |
|
|
|
|
<view class="head-subtitle">为了您的账号安全,修改密码前请先进行安全验证</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">手机号</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'mobile')" |
|
|
|
|
@input="mobileInput($event, 'mobile')" :placeholderStyle="placeholderStyle" |
|
|
|
|
v-model="form['forgotPwd'].data.mobile" type="number"></u-input> |
|
|
|
|
<button class="u-reset-button code-btn code-btn-start" |
|
|
|
|
:disabled="!form['forgotPwd'].data.isMobileEnd" |
|
|
|
|
:class="{ 'code-btn-end': form['forgotPwd'].data.isMobileEnd }" |
|
|
|
|
@tap="getSmsCode('resetpwd')"> |
|
|
|
|
{{ codeText }} |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["forgotPwd"].error.mobile || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">验证码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'code')" |
|
|
|
|
@input="checkValue($event, 'code')" placeholder="请输入验证码" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['forgotPwd'].data.code" |
|
|
|
|
type="number"></u-input> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["forgotPwd"].error.code || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">密码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'password')" |
|
|
|
|
@input="checkValue($event, 'password')" placeholder="请输入密码" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['forgotPwd'].data.password" |
|
|
|
|
type="password"></u-input> |
|
|
|
|
<button class="u-reset-button login-btn-start" @tap="forgotPwdSubmit"> |
|
|
|
|
确认 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["forgotPwd"].error.password || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
<button v-if="!isLogin" class="u-reset-button type-btn" @tap="showAuthModal('accountLogin')"> |
|
|
|
|
返回登录 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 5.绑定手机号 --> |
|
|
|
|
<view v-if="authType === 'bindMobile'"> |
|
|
|
|
<view class="head-box u-m-b-60"> |
|
|
|
|
<view class="head-title u-m-b-20">绑定手机号</view> |
|
|
|
|
<view class="head-subtitle">为了您的账号安全,请绑定手机号</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">手机号</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'mobile')" |
|
|
|
|
@input="mobileInput($event, 'mobile')" placeholder="请输入手机号" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['bindMobile'].data.mobile" |
|
|
|
|
type="number"></u-input> |
|
|
|
|
<button class="u-reset-button code-btn code-btn-start" |
|
|
|
|
:disabled="!form['bindMobile'].data.isMobileEnd" |
|
|
|
|
:class="{ 'code-btn-end': form['bindMobile'].data.isMobileEnd }" |
|
|
|
|
@tap="getSmsCode('changemobile')"> |
|
|
|
|
{{ codeText }} |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["bindMobile"].error.mobile || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">验证码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'code')" |
|
|
|
|
@input="checkValue($event, 'code')" placeholder="请输入验证码" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['bindMobile'].data.code" |
|
|
|
|
type="number"></u-input> |
|
|
|
|
<button class="u-reset-button login-btn-start" @tap="bindMobileSubmit"> |
|
|
|
|
立即绑定 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error">{{ form["bindMobile"].error.code || "" }}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 6.修改密码 --> |
|
|
|
|
<view v-if="authType === 'changePwd'"> |
|
|
|
|
<view class="head-box u-m-b-60"> |
|
|
|
|
<view class="head-title u-m-b-20">修改密码</view> |
|
|
|
|
<view class="head-subtitle"></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">旧密码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'oldPassword')" |
|
|
|
|
@input="checkValue($event, 'oldPassword')" placeholder="请输入旧密码" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['changePwd'].data.oldPassword" |
|
|
|
|
type="password"></u-input> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error"> |
|
|
|
|
{{ form["changePwd"].error.oldPassword || "" }} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">新密码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'newPassword')" |
|
|
|
|
@input="checkValue($event, 'newPassword')" placeholder="请输入新密码" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['changePwd'].data.newPassword" |
|
|
|
|
type="password"></u-input> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error"> |
|
|
|
|
{{ form["changePwd"].error.newPassword || "" }} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="form-item u-border-bottom"> |
|
|
|
|
<view class="item-content u-flex u-col-center"> |
|
|
|
|
<view class="item-title">确认密码</view> |
|
|
|
|
<u-input class="u-m-r-10 u-flex-1" @blur="checkValue($event, 'reNewPassword')" |
|
|
|
|
@input="checkValue($event, 'reNewPassword')" placeholder="再次输入新密码" |
|
|
|
|
:placeholderStyle="placeholderStyle" v-model="form['changePwd'].data.reNewPassword" |
|
|
|
|
type="password"></u-input> |
|
|
|
|
</view> |
|
|
|
|
<view class="message-error"> |
|
|
|
|
{{ form["changePwd"].error.reNewPassword || "" }} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="editPwd-btn-box u-m-t-80"> |
|
|
|
|
<button class="u-reset-button save-btn" @tap="changePwdSubmit">保存</button> |
|
|
|
|
<button class="u-reset-button forgot-btn" @tap="showAuthModal('forgotPwd')"> |
|
|
|
|
忘记密码 |
|
|
|
|
</button> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 1.账号密码登录 --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|