diff --git a/src/assets/css/style.css b/src/assets/css/style.css index 417e454..4682384 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -1,6 +1,7 @@ * { padding: 0; margin: 0; + box-sizing: border-box; } html, body, @@ -17,3 +18,8 @@ body, transform: rotate(360deg); } } +.background-pink { + background-color: #f8f7f5; + background-image: url('@/assets/images/home-bg.png'); + background-size: 100% 100%; +} diff --git a/src/assets/css/style.less b/src/assets/css/style.less index 36890a8..c23c950 100644 --- a/src/assets/css/style.less +++ b/src/assets/css/style.less @@ -1,6 +1,7 @@ * { padding: 0; margin: 0; + box-sizing: border-box; } html, @@ -20,4 +21,10 @@ body, 100% { transform: rotate(360deg); } +} + +.background-pink { + background-color: rgba(248, 247, 245, 1); + background-image: url('@/assets/images/home-bg.png'); + background-size: 100% 100%; } \ No newline at end of file diff --git a/src/assets/icons/arrow-left.svg b/src/assets/icons/arrow-left.svg new file mode 100644 index 0000000..ccc25ad --- /dev/null +++ b/src/assets/icons/arrow-left.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/images/login/elephant.png b/src/assets/images/login/elephant.png new file mode 100644 index 0000000..ba454b7 Binary files /dev/null and b/src/assets/images/login/elephant.png differ diff --git a/src/assets/images/login/google.png b/src/assets/images/login/google.png new file mode 100644 index 0000000..4f71aa7 Binary files /dev/null and b/src/assets/images/login/google.png differ diff --git a/src/assets/images/login/left-bg.png b/src/assets/images/login/left-bg.png new file mode 100644 index 0000000..a0e76a6 Binary files /dev/null and b/src/assets/images/login/left-bg.png differ diff --git a/src/assets/images/login/wechat.png b/src/assets/images/login/wechat.png new file mode 100644 index 0000000..063770d Binary files /dev/null and b/src/assets/images/login/wechat.png differ diff --git a/src/assets/images/logo-2.png b/src/assets/images/logo-2.png new file mode 100644 index 0000000..3667fa8 Binary files /dev/null and b/src/assets/images/logo-2.png differ diff --git a/src/components/input-code.vue b/src/components/input-code.vue new file mode 100644 index 0000000..928baf7 --- /dev/null +++ b/src/components/input-code.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/src/router/index.ts b/src/router/index.ts index 80a40d3..ff4c854 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -12,10 +12,10 @@ const router = createRouter({ routes: [ { path: '/', - redirect: '/home' + redirect: '/index' }, { - path: '/', + path: '/index', name: 'index', component: () => import('../views/login/index.vue'), }, @@ -24,6 +24,11 @@ const router = createRouter({ name: 'login', component: () => import('../views/login/login.vue'), }, + { + path: '/register', + name: 'register', + component: () => import('../views/login/register.vue'), + }, { path: '/home', name: 'home', diff --git a/src/utils/tools.ts b/src/utils/tools.ts index eac100e..47e2b5d 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -102,6 +102,18 @@ export function FormatDate(value: Date | number | string, format: string = 'yyyy return str; } +/** + * 倒计时 + * @param time 倒计时时间,单位秒 + * @returns 倒计时字符串,格式为 mm:ss +*/ +export function CountDown(time: number) { + const mm = String(Math.floor(time / 60)).padStart(2, '0'); + const ss = String(time % 60).padStart(2, '0'); + return `${mm}:${ss}`; +} + + /** * 下载图片 diff --git a/src/views/css/style.css b/src/views/css/style.css new file mode 100644 index 0000000..aba66b7 --- /dev/null +++ b/src/views/css/style.css @@ -0,0 +1,184 @@ +.register, +.login { + width: 100%; + height: 100%; + overflow: hidden; + padding: 2.5rem; + display: flex; +} +.register > .left, +.login > .left { + flex: 1; + height: 100%; + position: relative; + overflow: hidden; +} +.register > .left > .bg, +.login > .left > .bg { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 2rem; +} +.register > .left > .logo, +.login > .left > .logo { + position: absolute; + top: 2.4rem; + left: 4.2rem; +} +.register > .left > .logo > img, +.login > .left > .logo > img { + width: 6rem; + height: auto; +} +.register > .left > .logo > span, +.login > .left > .logo > span { + font-weight: 600; + font-size: 3.3rem; +} +.register > .right, +.login > .right { + width: 90rem; + min-width: 600px; + display: flex; + flex-direction: column; +} +.register > .right > .top, +.login > .right > .top { + display: flex; + padding: 0 3rem; +} +.register > .right > .top > .back, +.login > .right > .top > .back { + width: 5rem; + height: 5rem; + border-radius: 1.2rem; + border: 0.25rem solid #dfdfdf; + background-color: transparent; + cursor: pointer; +} +.register > .right > .box, +.login > .right > .box { + min-width: 50rem; + flex: 1; + overflow-y: auto; + margin: 0 auto; + display: flex; + flex-direction: column; + align-items: center; +} +.register > .right > .box > img, +.login > .right > .box > img { + width: 11rem; + height: auto; + margin-top: 2rem; +} +.register > .right > .box > .visible-code, +.login > .right > .box > .visible-code { + margin-top: 1.7rem; + margin-bottom: 7.2rem; +} +.register > .right > .box > .title, +.login > .right > .box > .title { + font-weight: 600; + font-size: 7rem; + display: flex; + align-items: center; + justify-content: center; + color: #252727; + margin-top: 1.7rem; +} +.register > .right > .box > .title > img, +.login > .right > .box > .title > img { + width: auto; + height: 9.8rem; +} +.register > .right > .box > .tip, +.login > .right > .box > .tip { + font-weight: 400; + font-family: General Sans Variable; + font-style: Regular; + font-size: 1.8rem; + color: #666; + margin-top: 0.4rem; +} +.register > .right > .box > .el-form, +.login > .right > .box > .el-form { + margin-top: 5rem; + width: 100%; +} +.register > .right > .box > .el-form::v-deep .el-form-item, +.login > .right > .box > .el-form::v-deep .el-form-item { + margin-bottom: 2rem; +} +.register > .right > .box > .el-form::v-deep .el-form-item__label, +.login > .right > .box > .el-form::v-deep .el-form-item__label { + color: #252727; + font-size: 1.8rem; + margin-bottom: 0.8rem; +} +.register > .right > .box > .el-form::v-deep .el-input, +.login > .right > .box > .el-form::v-deep .el-input { + --el-input-height: 5rem; + --el-input-border-radius: 0.8rem; + --el-input-text-color: #252727; + --el-border-color: #dfdfdf; + font-size: 1.4rem; +} +.register > .right > .box > .el-form::v-deep .forgetPassword, +.login > .right > .box > .el-form::v-deep .forgetPassword { + margin-top: -1.2rem; + margin-bottom: 2rem; + font-size: 1.6rem; + text-align: right; + color: #666666; + cursor: pointer; + text-decoration: underline; +} +.register > .right > .box > .el-form::v-deep .privacy, +.login > .right > .box > .el-form::v-deep .privacy { + --el-checkbox-height: auto; + margin-bottom: 4rem; +} +.register > .right > .box > .el-form::v-deep .privacy .el-checkbox__label, +.login > .right > .box > .el-form::v-deep .privacy .el-checkbox__label { + font-size: 1.6rem; + color: #666666; + font-weight: 400; +} +.register > .right > .box > .el-form::v-deep .privacy .el-checkbox__label > span, +.login > .right > .box > .el-form::v-deep .privacy .el-checkbox__label > span { + text-decoration: underline; + cursor: pointer; +} +.register > .right > .box > .el-form::v-deep .el-form-item__error, +.login > .right > .box > .el-form::v-deep .el-form-item__error { + padding-top: 1px; + font-size: 1.4rem; +} +.register > .right > .box > .el-form::v-deep .submit, +.login > .right > .box > .el-form::v-deep .submit { + width: 100%; + height: 6rem; + background: #252727; + font-size: 2rem; + border-radius: 0.8rem; + color: #fff; + font-weight: 600; +} +.register > .right > .box > .tip-2, +.login > .right > .box > .tip-2 { + font-weight: 400; + font-size: 1.6rem; + color: #666; +} +.register > .right > .box > .tip-2 > span, +.login > .right > .box > .tip-2 > span { + text-decoration: underline; + color: #FF7A50; + cursor: pointer; +} +.register > .right > .box > .other-login, +.login > .right > .box > .other-login { + margin-top: 5rem; +} diff --git a/src/views/home/index.vue b/src/views/home/index.vue index ef639f2..4fb1ea7 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,5 +1,5 @@