|
@@ -1,15 +1,27 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div>
|
|
|
- <el-form :model="loginForm" label-width="120px">
|
|
|
- <el-form-item label="用户名">
|
|
|
- <el-input v-model="loginForm.username" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="密码">
|
|
|
- <el-input v-model="loginForm.userpass" />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <el-button type="primary" @click="sureLog">登录</el-button>
|
|
|
+ <div class="bigBox">
|
|
|
+ <div class="winBox">
|
|
|
+ <button class="winBtn">-</button>
|
|
|
+ <button class="winBtn">×</button>
|
|
|
+ </div>
|
|
|
+ <!-- 信息 -->
|
|
|
+ <div class="imgBox">
|
|
|
+ <img src="../../assets/image/loginImg.png" alt="">
|
|
|
+ <p>登录</p>
|
|
|
+ </div>
|
|
|
+ <!-- 登录信息 -->
|
|
|
+ <div class="formBox">
|
|
|
+ <el-form :model="loginForm" label-width="65px" style="padding-top: 30px;">
|
|
|
+ <el-form-item label="用户名">
|
|
|
+ <el-input class="loginInp" v-model="loginForm.username" placeholder="你的账号..." />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="密码">
|
|
|
+ <el-input class="loginInp" v-model="loginForm.userpass" placeholder="你的密码..." />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-button class="loginBtn" type="primary" @click="sureLog">登录</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -17,9 +29,7 @@
|
|
|
<script>
|
|
|
import { ref, onMounted } from "vue"
|
|
|
import { useRouter } from 'vue-router'
|
|
|
-
|
|
|
import { ElMessage } from "element-plus"
|
|
|
-import { jsPlumb } from 'jsplumb'
|
|
|
import login from "@/api/login"
|
|
|
export default {
|
|
|
setup() {
|
|
@@ -48,21 +58,21 @@ export default {
|
|
|
}
|
|
|
function sureLog() {
|
|
|
let kis = encryptPassword(loginForm.value.userpass)
|
|
|
- login.LoginNow({
|
|
|
- login_account: loginForm.value.username,
|
|
|
- pwd: kis
|
|
|
- }).then(res => {
|
|
|
- if (res.returncode === 200) {
|
|
|
- router.push('/home')
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- })
|
|
|
- // router.push('/home')
|
|
|
- }
|
|
|
- console.log(res, 'login');
|
|
|
- })
|
|
|
+ // login.LoginNow({
|
|
|
+ // login_account: loginForm.value.username,
|
|
|
+ // pwd: kis
|
|
|
+ // }).then(res => {
|
|
|
+ // console.log(res, 'login');
|
|
|
+ // if (res.returncode === 200) {
|
|
|
+ // router.push('/home')
|
|
|
+ // } else {
|
|
|
+ // ElMessage({
|
|
|
+ // message: res.msg,
|
|
|
+ // type: "error"
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ router.push('/home')
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
})
|
|
@@ -76,4 +86,65 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss" scoped></style>
|
|
|
+<style scoped>
|
|
|
+.bigBox {
|
|
|
+ width: 384px;
|
|
|
+ height: 428px;
|
|
|
+ margin: 0 auto;
|
|
|
+ background-color: rgba(127, 127, 127, 0.5);
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+
|
|
|
+.formBox {
|
|
|
+ width: 320px;
|
|
|
+ height: 240px;
|
|
|
+ text-align: center;
|
|
|
+ background: #FFFFFF;
|
|
|
+ box-shadow: 0px 1px 20px 3px rgba(52, 123, 231, 0.12);
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
+ opacity: 1;
|
|
|
+ margin: 0 auto;
|
|
|
+}
|
|
|
+
|
|
|
+.imgBox {
|
|
|
+ width: 272px;
|
|
|
+ height: 100px;
|
|
|
+ margin: 0 auto;
|
|
|
+ padding-top: 60px;
|
|
|
+}
|
|
|
+
|
|
|
+.loginInp {
|
|
|
+ width: 230px;
|
|
|
+ height: 40px;
|
|
|
+}
|
|
|
+
|
|
|
+.loginBtn {
|
|
|
+ width: 272px;
|
|
|
+ height: 40px;
|
|
|
+}
|
|
|
+
|
|
|
+.winBox {
|
|
|
+ width: 68px;
|
|
|
+ height: 68px;
|
|
|
+ position: absolute;
|
|
|
+ top: 0px;
|
|
|
+ left: 310px;
|
|
|
+}
|
|
|
+
|
|
|
+.winBtn {
|
|
|
+ width: 34px;
|
|
|
+ height: 34px;
|
|
|
+ background-color: transparent;
|
|
|
+ border: none;
|
|
|
+ font-size: 30px;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 34px;
|
|
|
+}
|
|
|
+
|
|
|
+.winBtn:nth-child(1):hover {
|
|
|
+ border: 1px black solid;
|
|
|
+}
|
|
|
+.winBtn:nth-child(2):hover {
|
|
|
+ background-color: red;
|
|
|
+}
|
|
|
+</style>
|