feige
2024-11-02 784f598b870c16ee93075fdc23df3f68bec0a460
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;