From f468170d79dee3f8efb75705c7e23a1b53e54e91 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期二, 29 七月 2025 22:08:02 +0800 Subject: [PATCH] 修改了内容 --- ruoyi-ui/src/views/login.vue | 168 +++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 119 insertions(+), 49 deletions(-) diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index e27dce1..992b754 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -1,18 +1,18 @@ <template> <div> - + <div class="login Group_132"> <div class="navbar topHeight"> <!-- <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> - + <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/> <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> --> <div class="right-menu"> - - - + + + <div class="avatar-wrapper"> <el-button @click="login"> <img :src="avatar" class="user-avatar"> @@ -20,14 +20,19 @@ <span>鐧诲綍</span> </el-button> <el-button @click="openReg"> - + <span>娉ㄥ唽</span> </el-button> </div> - + </div> </div> - + + <!-- 娣诲姞QQ瀹㈡湇鎸夐挳 --> + <div class="qq-service-btn" @click="openQQChat"> + <img :src="require('@/assets/image/qq.png')" alt="QQ瀹㈡湇"> + <span>QQ瀹㈡湇</span> + </div> <el-dialog :visible.sync="open" style="margin: 0px;" customClass="customWidth" width="620px"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" style="margin: 0px;"> <h3 class="title">鐧诲綍鏈兘閮藉缃�</h3> @@ -107,7 +112,7 @@ </div> <div class="code" @click="getCode" style="width: 24px; - + height: 16px; font-size: 12px; font-family: Microsoft YaHei-Regular, Microsoft YaHei; @@ -134,24 +139,24 @@ <span v-if="!loading" style="width: 97px;height: 62px;">鐧诲綍</span> <span v-else>鐧� 褰� 涓�...</span> </el-button> - + </el-form-item> <el-form-item> <a href="https://www.bendudu.com:8080/profile/upload/2023/10/10/Bendudu20231010_20231010203358A033.apk">鐐瑰嚮姝ゅ涓嬭浇搴旂敤绋嬪簭</a> - + </el-form-item> </el-form> </el-dialog> - - - - + + + + <el-dialog :visible.sync="openRegister" customClass="customWidth" width="450px"> <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> @@ -193,35 +198,57 @@ </el-form-item> <el-form-item style="width:100%;"> <el-button - :loading="loading" + :loading="loadingr" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleRegister" > - <span v-if="!loading">娉� 鍐�</span> + <span v-if="!loadingr">娉� 鍐�</span> <span v-else>娉� 鍐� 涓�...</span> </el-button> - + </el-form-item> </el-form> <!-- 搴曢儴 --> - + </div> </el-dialog> + + + <el-dialog :visible.sync="qqDialogVisible" title="QQ瀹㈡湇" width="400px"> + <div style="text-align: center; padding: 20px;"> + <img :src="require('@/assets/image/qq.png')" alt="QQ瀹㈡湇" style="width: 80px; height: 80px; margin-bottom: 15px;"> + <h3 style="margin-bottom: 15px;">瀹㈡湇QQ: 3224414357</h3> + <p style="margin-bottom: 20px; color: #666;">璇锋坊鍔犲ソ鍙嬪悗鍙戣捣浼氳瘽</p> + <div style="display: flex; justify-content: center; gap: 15px;"> + <el-button type="primary" @click="copyQQ" plain> + 澶嶅埗QQ鍙� + </el-button> + <el-button type="success" @click="addQQFriend"> + 娣诲姞濂藉弸 + </el-button> + </div> + </div> +</el-dialog> <!-- 搴曢儴 --> <div class="el-login-footer" > - <span style="color: black; ">Copyright 漏 GDUT All Rights Reserved.<span v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></span></span> + <span style="color: black; "><span v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></span></span> <a href="https://beian.miit.gov.cn/" target="_blank" style="color: black; ">绮CP澶�2023050334鍙�<span v-html="'\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'"></span>鍏畨澶囨鍙�44010402003045</a> </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' @@ -233,10 +260,14 @@ callback(new Error("涓ゆ杈撳叆鐨勫瘑鐮佷笉涓�鑷�")); } else { callback(); + } }; return { + qqDialogVisible: false, + url: require('../assets/images/index.png'), openRegister: false, + avatar: undefined, open: false, codeUrl: "", loginForm: { @@ -258,26 +289,27 @@ code: [{ required: true, trigger: "change", message: "璇疯緭鍏ラ獙璇佺爜" }] }, loading: false, + loadingr: false, // 楠岃瘉鐮佸紑鍏� 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: "璇疯緭鍏ユ偍鐨勫瘑鐮�" }, @@ -305,20 +337,46 @@ this.getCookie(); }, methods: { + openQQChat() { + this.qqDialogVisible = true; + }, + copyQQ() { + const qq = '3224414357'; + navigator.clipboard.writeText(qq).then(() => { + this.$message.success('QQ鍙峰凡澶嶅埗鍒板壀璐存澘'); + }).catch(() => { + // 鍏煎涓嶆敮鎸乧lipboard API鐨勬祻瑙堝櫒 + const input = document.createElement('input'); + input.value = qq; + document.body.appendChild(input); + input.select(); + document.execCommand('copy'); + document.body.removeChild(input); + this.$message.success('QQ鍙峰凡澶嶅埗'); + }); + }, + addQQFriend() { + window.open('tencent://message/?Menu=yes&uin=3224414357&Site=xxx&Service=10&sigT=10&sigU=10', '_blank'); + }, handleRegister() { + //alert(this.registerForm.nickname) this.$refs.registerForm.validate(valid => { if (valid) { - this.loading = true; + this.loadingr = false; + //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.resetForm("registerForm"); + // this.$router.push("/login"); + }).catch(() => {}); }).catch(() => { - this.loading = false; + this.loadingr = true; if (this.captchaEnabled) { this.getCode(); } @@ -327,7 +385,7 @@ }); }, openReg(){ - this.openRegister = true; + this.openRegister = true; }, login(){ this.open = true; @@ -340,6 +398,7 @@ 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 +444,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,17 +480,17 @@ 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; - + //background-image: url("../assets/images/login-background.jpg"); //background-size: cover; } .title { - + width:355px; height: 58px; font-size: 44px; @@ -516,7 +586,7 @@ width: 108px; height: 48px; float: right; - + img { @@ -544,7 +614,7 @@ } .code { - + } .register { @@ -553,10 +623,10 @@ align-items: center; height: 100%; //background-image: url("../assets/images/login-background.jpg"); - + width:400px; background-color: #FEF7FC; - + //background-size: cover; } .title { -- Gitblit v1.9.1