From 5954aa0f9f982bba46843bf0dcc835f5efa2b667 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期日, 10 十一月 2024 22:20:09 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-ui/src/views/login.vue |   47 ++++++++++++++++++++++++++++++-----------------
 1 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue
index bff6ddb..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>
@@ -217,13 +217,13 @@
   </div>
   
   <div class="gpr">
-	   <img :key="url" :src="url" style="width:100%;height:100%"></img>
+<!-- 	   <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'
 
@@ -264,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: "璇疯緭鍏ユ偍鐨勫瘑鐮�" },
@@ -309,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;
@@ -338,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;
         }
       });
     },
@@ -388,7 +392,8 @@
 <style rel="stylesheet/scss" lang="scss">
 .gpr{
 	width:100%;
-	height:1200px;
+	// height:1000px;
+	
 	//background: no-repeat center/100% url("../assets/images/index.png");
 }
 	 .customWidth{
@@ -396,14 +401,22 @@
 	  }
 .topHeight{
 	height: 40px;
+	 
 	margin-right: 20px;
+	top:5px; 
+	position: absolute;
 }
 .Group_132{
-	//background: no-repeat center/100% url("../assets/images/index.png");
+	// background-image: url("../assets/images/index.png");
+
+
 	 
   // background: no-repeat center/40% url("../assets/images/Group 132.png");
-  height: 1200px;
-  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;
@@ -415,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