| | |
| | | <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"> |
| | |
| | | <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> |
| | |
| | | </div></div> |
| | | <div class="yonghuming" style="">用户名</div> |
| | | |
| | | <el-form-item prop="username" style="width: 380px; height: 48px; "> |
| | | <el-form-item prop="nickName" style="width: 380px; height: 48px; "> |
| | | <el-input |
| | | v-model="loginForm.username" |
| | | v-model="loginForm.nickName" |
| | | type="text" |
| | | auto-complete="off" |
| | | placeholder="请输入用户名" |
| | |
| | | </div> |
| | | |
| | | <div class="code" @click="getCode" style="width: 24px; |
| | | |
| | | |
| | | height: 16px; |
| | | font-size: 12px; |
| | | font-family: Microsoft YaHei-Regular, Microsoft YaHei; |
| | |
| | | <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="username"> |
| | | <el-input v-model="registerForm.username" 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> |
| | |
| | | </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; ">粤ICP备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' |
| | | |
| | |
| | | callback(new Error("两次输入的密码不一致")); |
| | | } else { |
| | | callback(); |
| | | |
| | | } |
| | | }; |
| | | return { |
| | | qqDialogVisible: false, |
| | | url: require('../assets/images/index.png'), |
| | | openRegister: false, |
| | | avatar: undefined, |
| | | open: false, |
| | | codeUrl: "", |
| | | loginForm: { |
| | | // username: "admin", |
| | | // password: "admin123", |
| | | username: "", |
| | | nickName: "", |
| | | password: "", |
| | | rememberMe: false, |
| | | code: "", |
| | | uuid: "" |
| | | }, |
| | | loginRules: { |
| | | username: [ |
| | | nickName: [ |
| | | { required: true, trigger: "blur", message: "请输入您的账号" } |
| | | ], |
| | | password: [ |
| | |
| | | code: [{ required: true, trigger: "change", message: "请输入验证码" }] |
| | | }, |
| | | loading: false, |
| | | loadingr: false, |
| | | // 验证码开关 |
| | | captchaEnabled: true, |
| | | // 注册开关 |
| | | register: true, |
| | | // register: true, |
| | | redirect: undefined, |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | registerForm: { |
| | | username: "", |
| | | nickname: "", |
| | | password: "", |
| | | confirmPassword: "", |
| | | code: "", |
| | | uuid: "" |
| | | }, |
| | | registerRules: { |
| | | username: [ |
| | | 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: "请输入您的密码" }, |
| | |
| | | this.getCookie(); |
| | | }, |
| | | methods: { |
| | | openQQChat() { |
| | | this.qqDialogVisible = true; |
| | | }, |
| | | copyQQ() { |
| | | const qq = '3224414357'; |
| | | navigator.clipboard.writeText(qq).then(() => { |
| | | this.$message.success('QQ号已复制到剪贴板'); |
| | | }).catch(() => { |
| | | // 兼容不支持clipboard 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 username = this.registerForm.username; |
| | | this.$alert("<font color='red'>恭喜你,您的账号 " + username + " 注册成功!</font>", '系统提示', { |
| | | 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(); |
| | | } |
| | |
| | | }); |
| | | }, |
| | | openReg(){ |
| | | this.openRegister = true; |
| | | this.openRegister = true; |
| | | }, |
| | | login(){ |
| | | this.open = true; |
| | |
| | | if (this.captchaEnabled) { |
| | | this.codeUrl = "data:image/gif;base64," + res.data.img; |
| | | this.loginForm.uuid = res.data.uuid; |
| | | this.registerForm.uuid = res.data.uuid; |
| | | } |
| | | }); |
| | | }, |
| | | getCookie() { |
| | | const username = Cookies.get("username"); |
| | | const nickName = Cookies.get("nickName"); |
| | | const password = Cookies.get("password"); |
| | | const rememberMe = Cookies.get('rememberMe') |
| | | this.loginForm = { |
| | | username: username === undefined ? this.loginForm.username : username, |
| | | nickName: nickName === undefined ? this.loginForm.nickName : nickName, |
| | | password: password === undefined ? this.loginForm.password : decrypt(password), |
| | | rememberMe: rememberMe === undefined ? false : Boolean(rememberMe) |
| | | }; |
| | |
| | | if (valid) { |
| | | this.loading = true; |
| | | if (this.loginForm.rememberMe) { |
| | | Cookies.set("username", this.loginForm.username, { expires: 30 }); |
| | | Cookies.set("nickName", this.loginForm.nickName, { expires: 30 }); |
| | | Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 }); |
| | | Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 }); |
| | | } else { |
| | | Cookies.remove("username"); |
| | | Cookies.remove("nickName"); |
| | | Cookies.remove("password"); |
| | | Cookies.remove('rememberMe'); |
| | | } |
| | | // alert(this.loginForm.nickName) |
| | | this.$store.dispatch("Login", this.loginForm).then(() => { |
| | | this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); |
| | | }).catch(() => { |
| | |
| | | <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; |
| | |
| | | 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; |
| | |
| | | width: 108px; |
| | | height: 48px; |
| | | float: right; |
| | | |
| | | |
| | | |
| | | |
| | | img { |
| | |
| | | } |
| | | |
| | | .code { |
| | | |
| | | |
| | | } |
| | | |
| | | .register { |
| | |
| | | align-items: center; |
| | | height: 100%; |
| | | //background-image: url("../assets/images/login-background.jpg"); |
| | | |
| | | |
| | | width:400px; |
| | | background-color: #FEF7FC; |
| | | |
| | | |
| | | //background-size: cover; |
| | | } |
| | | .title { |