This commit is contained in:
zhangxuelin 2024-10-30 10:23:38 +08:00
parent c2fab0f45c
commit 41d6b35340
1 changed files with 27 additions and 3 deletions

View File

@ -6,7 +6,7 @@
</div> </div>
<img class="welcome-img" :src="leftBg2" /> <img class="welcome-img" :src="leftBg2" />
</div> </div>
<div class="box-item login"> <div class="box-item login" v-if="isRegister">
<WindowTools :is-has-max="false" /> <WindowTools :is-has-max="false" />
<div class="login-title">账号登录</div> <div class="login-title">账号登录</div>
<el-form ref="formRef" class="login-form" :model="loginForm" :rules="rules" size="large"> <el-form ref="formRef" class="login-form" :model="loginForm" :rules="rules" size="large">
@ -25,9 +25,32 @@
<el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)">登录</el-button> <el-button :loading="btnLoading" class="btn" type="primary" @click="submitForm(formRef)">登录</el-button>
</el-form-item> </el-form-item>
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;"> <div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
<a class="hover:text-sky-500" style="margin-right: 10px;" @click="RegisterModel(1)">注册账号</a> <a class="hover:text-sky-500" style="margin-right: 10px;" @click="isRegister=false">注册账号</a>
| |
<a class="hover:text-sky-500" style="margin-left: 10px;" @click="RegisterModel(2)">忘记密码</a> <a class="hover:text-sky-500" style="margin-left: 10px;" >忘记密码</a>
</div>
</el-form>
</div>
<div class="box-item login" v-else>
<WindowTools :is-has-max="false" />
<div class="login-title">账号注册</div>
<el-form ref="formRef" class="login-form" :rules="rules" size="large">
<el-form-item label="手机号" prop="username">
<el-input placeholder="请输入手机号" />
</el-form-item>
<el-form-item label="验证码" prop="username">
<el-input style="width:185px" placeholder="请输入验证码" /><el-button type="primary" >发送验证码</el-button>
</el-form-item>
<el-form-item label=" 密码" prop="password" >
<el-input v-model="loginForm.password" autocomplete="on" type="password" placeholder="请输入密码" />
</el-form-item>
<el-form-item>
<el-button type="primary" >立即注册</el-button>
</el-form-item>
<div class="flex mb-4" style="display: flex;justify-content: center;color: #ccc;cursor: pointer;">
<a class="hover:text-sky-500" style="margin-right: 10px;"> 返回登录 </a>
</div> </div>
</el-form> </el-form>
</div> </div>
@ -62,6 +85,7 @@ const userStore = useUserStore()
const btnLoading = ref(false) const btnLoading = ref(false)
const isSubject = ref(false) const isSubject = ref(false)
const RegModel = ref(false) const RegModel = ref(false)
const isRegister = ref(true)
// //
const loginForm = reactive({ const loginForm = reactive({
username: '', username: '',