|
- <template>
- <div class="big-box">
- <!-- 标题 -->
- <div class="head-bar">
- <img class="favicon-svg" src="../static/img/login-title.png" alt="" />
-
- </div>
-
- <div class="login-box">
- <div class="login-input">
- <span class="left-font">手机号码</span>
- <el-input
- size="mini"
- placeholder="输入您的手机号"
- clearable
- v-model="formLoginData.phone"
- >
- </el-input>
- </div>
-
- <div class="login-input">
- <span class="left-font">验证码</span>
- <el-input
- size="mini"
- placeholder="输入验证码"
- clearable
- v-model="formLoginData.code"
- >
- <span slot="append" class="right-font">获取验证码</span>
- </el-input>
- </div>
-
- <div class="login-input">
- <span class="left-font">个人昵称</span>
- <el-input
- size="mini"
- placeholder="输入昵称,以后可修改"
- clearable
- v-model="formLoginData.name"
- >
- </el-input>
- </div>
-
- <div class="login-input">
- <span class="left-font">设置密码</span>
- <el-input
- size="mini"
- placeholder="不少于8位"
- clearable
- v-model="formLoginData.name"
- >
- </el-input>
- </div>
-
- <div class="login-input">
- <span class="left-font">确认密码</span>
- <el-input
- size="mini"
- placeholder="确认密码"
- clearable
- v-model="formLoginData.name"
- >
- </el-input>
- </div>
-
- <!-- -->
- <div class="form-footer-sign">
- <el-checkbox v-model="formLoginData.read">
- <span class="sign-span-1">已阅读并同意</span>
- </el-checkbox>
- <span class="sign-span-2" @click="onAgreement">《用户使用协议》</span>
- </div>
-
- <!-- 登陆按钮 -->
-
- <div class="button-box" style="margin-top: 18px">
- <div class="primary-button">注册</div>
- </div>
- <div class="form-state" @click="linkLogin">已有账号,立即登录</div>
- </div>
-
- <!-- 页脚 -->
- <footer class="footer">
- Copyright © 2008-2019 珠海方诺信息科技有限公司 版权所有 粤ICP备13020798号
- </footer>
- </div>
- </template>
-
- <script>
- export default {
- name: "Login",
- data() {
- return {
- formLoginData: {
- phone: "", // 手机号
- code: "", // 验证码
- name: "", // 个人昵称
- password: "", // 密码
- confirmPassword: "", // 确认密码
- isGetCode: false, // 获取验证码
- state: "sign", // 登陆或注册
- isCode: true, // 是否验证码登陆
- read: false, // 是否阅读
- },
- };
- },
- methods: {
- // 用户协议
- onAgreement: function () {
- this.$message("开发中~");
- },
- linkLogin: function () {
- this.$router.push("/login");
- },
- },
- };
- </script>
-
- <style lang="scss" scoped>
- .big-box {
- width: 100vw;
- height: 100vh;
- background-image: url("../static/img/login.png");
- background-size: 100vw 100vh;
- background-repeat: no-repeat;
- display: flex;
- flex-flow: column;
- user-select: none;
- .head-bar {
- color: #fff;
- font-size: 35px;
- margin: 90px auto 0;
- letter-spacing: 4px;
- .favicon-svg {
- vertical-align: -11px;
- }
- }
-
- .login-box {
- margin: 37px auto 0;
- width: 550px;
- box-shadow: 0px 2px 20px 0px rgba(0, 71, 137, 0.3);
- border-radius: 10px;
- background: #fff;
- box-sizing: border-box;
- padding: 40px;
- .login-input {
- display: flex;
- width: 100%;
- background: #ffffff;
- border-radius: 6px;
- border: 1px solid #dddddd;
- padding: 12px 0;
- box-sizing: border-box;
- height: 54px;
- align-items: center;
- margin-bottom: 20px;
- .left-font {
- width: 88px;
- text-align: center;
- color: #333333;
- font-size: 14px;
- border-right: 1px solid #dddddd;
- height: 30px;
- line-height: 30px;
- }
- .right-font {
- color: #1890ff;
- font-size: 14px;
- cursor: pointer;
- }
- }
-
- .form-footer-sign {
- display: flex;
- justify-content: center;
- font-size: 14px;
- align-items: center;
- .el-checkbox {
- display: flex;
- align-items: center;
- }
- .sign-span-1 {
- color: #000000;
- opacity: 0.65;
- }
- .sign-span-2 {
- color: #1890ff;
- cursor: pointer;
- }
- }
- .button-box {
- height: 54px;
- }
- .form-state {
- color: #1890ff;
- font-size: 13px;
- display: flex;
- justify-content: center;
- margin-top: 20px;
- cursor: pointer;
- }
- }
-
- .footer {
- color: #fff;
- opacity: 0.7;
- font-size: 14px;
- text-align: center;
- width: 100vw;
- margin-top: 150px;
- }
- }
- </style>
|