From 784f598b870c16ee93075fdc23df3f68bec0a460 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期六, 02 十一月 2024 22:18:39 +0800 Subject: [PATCH] 修改bug --- ruoyi-ui/src/views/login.vue | 52 +++++++++++++++++++++++++++++++++++----------------- 1 files changed, 35 insertions(+), 17 deletions(-) diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index e27dce1..e1fb05a 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -150,8 +150,8 @@ <div class="register"> <el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form"> <h3 class="title">鏂扮敤鎴锋敞鍐�</h3> - <el-form-item prop="nickName"> - <el-input v-model="registerForm.nickName" type="text" auto-complete="off" placeholder="璐﹀彿"> + <el-form-item prop="nickname"> + <el-input v-model="registerForm.nickname" type="text" auto-complete="off" placeholder="璐﹀彿"> <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" /> </el-input> </el-form-item> @@ -216,12 +216,14 @@ </div> </div> - <div class="gpr"></div> + <div class="gpr"> +<!-- <img :key="url" :src="url" style="width:100%;height:30%"></img> --> + </div> </div> </template> <script> -import { getCodeImg,Download } from "@/api/login"; +import { getCodeImg,Download,register } from "@/api/login"; import Cookies from "js-cookie"; import { encrypt, decrypt } from '@/utils/jsencrypt' @@ -236,6 +238,7 @@ } }; return { + url: require('../assets/images/index.png'), openRegister: false, open: false, codeUrl: "", @@ -261,23 +264,23 @@ // 楠岃瘉鐮佸紑鍏� captchaEnabled: true, // 娉ㄥ唽寮�鍏� - register: true, + // register: true, redirect: undefined, registerForm: { - nickName: "", + nickname: "", password: "", confirmPassword: "", code: "", uuid: "" }, registerRules: { - nickName: [ + nickname: [ { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勮处鍙�" }, - { min: 2, max: 20, message: '鐢ㄦ埛璐﹀彿闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿', trigger: 'blur' } + // { min: 2, max: 20, message: '鐢ㄦ埛璐﹀彿闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿', trigger: 'blur' } ], password: [ { required: true, trigger: "blur", message: "璇疯緭鍏ユ偍鐨勫瘑鐮�" }, @@ -306,16 +309,19 @@ }, methods: { handleRegister() { + //alert(this.registerForm.nickname) this.$refs.registerForm.validate(valid => { if (valid) { this.loading = true; + //alert(this.registerForm.nickname) register(this.registerForm).then(res => { - const nickName = this.registerForm.nickName; + const nickName = this.registerForm.nickname; this.$alert("<font color='red'>鎭枩浣狅紝鎮ㄧ殑璐﹀彿 " + nickName + " 娉ㄥ唽鎴愬姛锛�</font>", '绯荤粺鎻愮ず', { dangerouslyUseHTMLString: true, type: 'success' }).then(() => { - this.$router.push("/login"); + this.openRegister = false; + // this.$router.push("/login"); }).catch(() => {}); }).catch(() => { this.loading = false; @@ -335,11 +341,12 @@ getCode() { getCodeImg().then(res => { - + this.captchaEnabled = res.data.captchaEnabled === undefined ? true : res.captchaEnabled; if (this.captchaEnabled) { this.codeUrl = "data:image/gif;base64," + res.data.img; this.loginForm.uuid = res.data.uuid; + this.registerForm.uuid = res.data.uuid; } }); }, @@ -385,20 +392,31 @@ <style rel="stylesheet/scss" lang="scss"> .gpr{ width:100%; - height:600px; - background: no-repeat center/40% url("../assets/images/Group 132.png"); + // height:1000px; + + //background: no-repeat center/100% url("../assets/images/index.png"); } .customWidth{ width:40%; // 璁剧疆寮瑰嚭妗嗗搴︾殑鏁板�� } .topHeight{ height: 40px; + margin-right: 20px; + top:5px; + position: absolute; } .Group_132{ + // background-image: url("../assets/images/index.png"); + + + // background: no-repeat center/40% url("../assets/images/Group 132.png"); - height: 100%; - width: 100%; + // height: 1200px; + min-width: 1300px; + width: 100vw; + height: 100vh; + background-color: #FEF7FC; //background-position: 49.5% 16.2% ; // background-position: 81.7px 71.3px; @@ -410,9 +428,9 @@ display: flex; justify-content: flex-end; align-items: center; - height: 100%; + // height: 60px; width: 100%; - background: no-repeat center/40% url("../assets/images/login_logo.png"); + background: no-repeat center/100% url("../assets/images/index.png"); background-color: #FEF7FC; -- Gitblit v1.9.1