From 703703929e97b94ca1c1c5e35a578e5fe9d4cfea Mon Sep 17 00:00:00 2001 From: suerprisePlus <15810472099@163.com> Date: 星期一, 30 九月 2024 09:58:04 +0800 Subject: [PATCH] 代码修改 --- src/views/login.vue | 231 +++++++++++++++++++++++++++++++++------------------------ 1 files changed, 133 insertions(+), 98 deletions(-) diff --git a/src/views/login.vue b/src/views/login.vue index 2581b09..a5d3ec0 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -1,32 +1,32 @@ <template> <div class="login"> - <el-row> - <el-col :xs="24"> - <div style="color: #fff; background-color: #0f73ee; width: 100%; height: 200px; text-align: center; padding: 15px; font-family: '寰蒋闆呴粦'"> - <div style="font-size: 42px; padding-top: 40px; width: 400px; margin: 0 auto"> - <div class="logoImg"></div> - <!-- <img :src="logo" alt="logo" style="width: 100px; height: 100px; float: left" /> --> - <div style="float: left; margin-top: 13px; width: 300px; text-align: left"> - <div>TerraDT</div> - <div style="letter-spacing: 1.5px; font-size: 20px; font-weight: 600; margin-top: -8px; margin-left: 3px">娉扮憺宸ヤ笟鏁板瓧瀛敓绠$悊骞冲彴</div> - </div> - </div> - </div> + <div class="logoTitle"> + <div class="titleItem"> + <div class="logImg"></div> + </div> + <div class="titleItem"> + <div class="logText">鏁板瓧瀛敓鏅鸿兘閰嶇綉宸℃绯荤粺</div> + </div> + </div> + <div class="logContent"> + <div class="contFrom"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <!-- <div style="margin-bottom: 10px; font-size: 14px; font-family: '寰蒋闆呴粦'; color: #f78e21">婕旂ず璐﹀彿锛歠astbee 123456</div> --> - <el-form-item prop="username"> + <el-form-item prop="username" > <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="璐﹀彿"> <svg-icon slot="prefix" icon-class="user" class="input-icon" /> </el-input> </el-form-item> <el-form-item prop="password"> - <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="瀵嗙爜" @keyup.enter.native="handleLogin"> + <el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="瀵嗙爜" + @keyup.enter.native="handleLogin"> <svg-icon slot="prefix" icon-class="password" class="input-icon" /> </el-input> </el-form-item> <el-form-item v-if="captchaOnOff" prop="code"> - <el-input v-model="loginForm.code" auto-complete="off" placeholder="楠岃瘉鐮�" style="width: 63%" @keyup.enter.native="handleLogin"> + <el-input v-model="loginForm.code" auto-complete="off" placeholder="楠岃瘉鐮�" style="width: 63%" + @keyup.enter.native="handleLogin"> <svg-icon slot="prefix" icon-class="validCode" class="input-icon" /> </el-input> @@ -34,31 +34,34 @@ <img :src="codeUrl" @click="getCode" /> </div> </el-form-item> - <el-checkbox v-model="loginForm.rememberMe" style="margin: 0px 0px 25px 0px; color: #000">璁颁綇瀵嗙爜</el-checkbox> + <el-checkbox v-model="loginForm.rememberMe" + style="margin: 0px 0px 25px 0px; color: #000">璁颁綇瀵嗙爜</el-checkbox> <el-form-item style="width: 100%"> <div style="margin-bottom: 10px"> - <el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%" @click.native.prevent="handleLogin"> + <el-button v-if="!bindAccount" :loading="loading" type="primary" style="width: 100%" + @click.native.prevent="handleLogin"> <span v-if="!loading">鐧� 褰�</span> <span v-else>鐧� 褰� 涓�...</span> </el-button> - <el-button v-else :loading="loading" type="primary" style="width: 100%" @click.native.prevent="handleBind"> + <el-button v-else :loading="loading" type="primary" style="width: 100%" + @click.native.prevent="handleBind"> <span v-if="!loading">缁� 瀹�</span> <span v-else>缁� 瀹� 涓�...</span> </el-button> </div> </el-form-item> </el-form> - </el-col> - </el-row> - <!-- 搴曢儴 --> - <div class="el-login-footer"> - <span> - Copyright 漏 2004锛�2023 - <a target="_blank" href="https://www.smartearth.cn/">SmartEarth</a> - All Rights Reserved. - </span> + </div> + <div class="contMessage"> + <span> + Copyright 漏 2004锛�2023 + <a target="_blank" href="https://www.smartearth.cn/">SmartEarth</a> + All Rights Reserved. + </span> + </div> </div> + </div> </template> @@ -146,7 +149,7 @@ .push({ path: this.redirect || '/', }) - .catch(() => {}); + .catch(() => { }); }) .catch(() => { this.loading = false; @@ -169,7 +172,7 @@ .push({ path: this.redirect || '/', }) - .catch(() => {}); + .catch(() => { }); if (this.captchaOnOff) { this.getCode(); this.loading = false; @@ -200,7 +203,7 @@ const errorId = this.$route.query.errorId; if (errorId !== undefined && errorId !== null) { getErrorMsg(errorId) - .then((res) => {}) + .then((res) => { }) .catch((err) => { this.$router.push({ query: {} }); console.log(err); @@ -274,7 +277,7 @@ .push({ path: '/', }) - .catch(() => {}); + .catch(() => { }); }) .catch(() => { this.loading = false; @@ -312,7 +315,7 @@ .push({ path: this.redirect || '/', }) - .catch(() => {}); + .catch(() => { }); }) .catch(() => { this.loading = false; @@ -327,77 +330,109 @@ }; </script> -<style lang="scss"> +<style scoped lang="scss"> .login { height: 100%; - overflow: auto; -} -.logoImg { - width: 100px; - height: 100px; - background: url('../assets/logo/logo.png') no-repeat; - background-size: 100% 100%; - float: left; -} -.bindAccountTitle { - margin: 0px auto 30px auto; - text-align: center; - color: #333; - font-size: 24px; -} - -.login-form { - margin: 30px auto 0 auto; - padding: 15px; - z-index: 1000; - max-width: 350px; - - input { - height: 38px; - background-color: #f1f1f1; - color: #666; - } - - .input-icon { - height: 39px; - width: 14px; - margin-left: 2px; - } -} - -.login-code { - width: 33%; - float: right; - - img { - cursor: pointer; - vertical-align: middle; - border-radius: 3px; - height: 38px; - } -} - -.el-login-footer { - height: 40px; - line-height: 40px; - position: fixed; - bottom: 0; + // overflow: auto; width: 100%; - text-align: center; - color: #333; - font-family: Arial; - font-size: 12px; - letter-spacing: 1px; -} + position: absolute; + background: url('../assets/logo/sdw.png') no-repeat; + background-size: 100% 100%; -.alert-box-wrap { - border: 1px solid #f78e21; - .alert-message-wrap { - font-size: 14px; - font-family: '寰蒋闆呴粦'; - color: rgba(197, 41, 41, 0.856); - margin-left: 10px; + .logoTitle { + height: 266px; + background: rgba(51, 132, 198, 1); + width: 100%; + z-index: -1; + position: absolute; + display: flex; + justify-content: center; + + .titleItem { + height: 100%; + display: flex; + align-items: center; + } + + .logImg { + width: 89px; + height: 89px; + background: url('../assets/logo/logo2.png') no-repeat; + background-size: 100% 100%; + } + + .logText { + font-family: SourceHanSansSC-Bold; + font-size: 36px; + font-weight: bold; + color: #ffffff; + margin-left: 19px; + } } + + .logContent { + width: 100%; + height: calc(100% - 266px); + bottom: 0px; + position: absolute; + display: flex; + flex-direction: column; + + .contFrom { + flex: 1; + } + + .contMessage { + width: 100%; + display: flex; + justify-content: center; + line-height: 40px; + } + + } + + .login-form { + margin: 30px auto 0 auto; + padding: 15px; + z-index: 1000; + max-width: 350px; + + input { + height: 38px; + background-color: #f1f1f1; + color: #666; + } + + .input-icon { + height: 39px; + width: 14px; + margin-left: 2px; + } + } + + .login-code { + width: 33%; + float: right; + + img { + cursor: pointer; + vertical-align: middle; + border-radius: 3px; + height: 38px; + } + } + + .alert-box-wrap { + border: 1px solid #f78e21; + + .alert-message-wrap { + font-size: 14px; + font-family: '寰蒋闆呴粦'; + color: rgba(197, 41, 41, 0.856); + margin-left: 10px; + } + } + } </style> -- Gitblit v1.9.3