diff --git a/b/user/loginUser.dspy b/b/user/loginUser.dspy index 485f114..f4a2f68 100644 --- a/b/user/loginUser.dspy +++ b/b/user/loginUser.dspy @@ -153,6 +153,10 @@ async def loginUser(ns): if type1 == 1: # 手机号验证码登录 userreacs = await sor.R('users', {'mobile': ns.get('username')}) + + if not userreacs: + userreacs = await sor.R('users', {'username': ns.get('username')}) + # 如果是微信扫码后绑定已有账号 if ns.get('wechat_openid'): if userreacs: diff --git a/b/user/logintype.dspy b/b/user/logintype.dspy index 097f1eb..d2f6aa4 100644 --- a/b/user/logintype.dspy +++ b/b/user/logintype.dspy @@ -43,57 +43,101 @@ async def logintype(ns): db = DBPools() async with db.sqlorContext('kboss') as sor: - type = 0 - if ns.get('codeid'): - type += 1 + + domain_name = ns.get('domain_name') + if domain_name in ['www.opencomputing.cn', 'dev.opencomputing.cn', 'localhost:9527'] and ns.get('username') != '开元云(北京)科技有限公司': + if not ns.get('mobile'): + return { + 'status': False, + 'msg': '请输入手机号' + } + real_mobile_li = await sor.R('users', {'username': ns['username']}) + if not real_mobile_li: + return { + 'status': False, + 'msg': '用户名有误' + } + real_mobile = real_mobile_li[0]['mobile'] if real_mobile_li else None + if not real_mobile: + return { + 'status': False, + 'msg': '未查询到匹配得手机号码' + } + + if real_mobile and ns['mobile'] != real_mobile: + return { + 'status': False, + 'msg': '您的手机号与用户名不匹配' + } + + if not ns.get('codeid'): + return { + 'status': False, + 'msg': 'codeid不存在, 请输入验证码' + } code = await sor.R('validatecode', {'id': ns.get('codeid'), 'vcode': ns.get('vcode')}) if len(code) < 1: return {'status': False, 'msg': '验证码不正确'} - if type == 1: - # 手机号登录 - users = await sor.R('users', {'mobile': ns.get('username')}) - else: + password = password_encode(ns['password']) users = await sor.R('users', {'username': ns.get('username'), 'password': password}) - if len(users) < 1: - return {"status": False,'msg':'用户名或密码错误'} - elif ns.get('username') == "admin": + if len(users) < 1: + return {"status": False,'msg':'用户名或密码错误'} + return {'status': True} + else: - reseller = await sor.R('reseller', {'domain_name': ns.get('domain_name')}) - # 查到用户的所在机构 - user_org = await sor.R('organization', {'id': users[0]['orgid']}) - #0代表用户为主 1代表用户为子 - user_type = 0 - # 子页面判断用户 - if len(reseller) >= 1: - if reseller[0]['orgid'] == user_org[0]['parentid']: - user_type += 1 - if reseller[0]['orgid'] == users[0]['orgid']: - user_type += 1 - # 主页面判断用户 + type = 0 + if ns.get('codeid'): + type += 1 + code = await sor.R('validatecode', {'id': ns.get('codeid'), 'vcode': ns.get('vcode')}) + if len(code) < 1: + return {'status': False, 'msg': '验证码不正确'} + if type == 1: + # 手机号登录 + users = await sor.R('users', {'mobile': ns.get('username')}) else: - resellers = await sor.R('reseller', {'orgid': user_org[0]['parentid']}) - if len(resellers) >= 1: - user_type += 1 - if users[0]['user_reseller'] == '1': - user_type += 1 - # 证明是主级页面 - if len(reseller) < 1: - # 用户为主 - if user_type == 0: - return {'status': True} + password = password_encode(ns['password']) + users = await sor.R('users', {'username': ns.get('username'), 'password': password}) + if len(users) < 1: + return {"status": False,'msg':'用户名或密码错误'} + elif ns.get('username') == "admin": + return {'status': True} + else: + reseller = await sor.R('reseller', {'domain_name': ns.get('domain_name')}) + # 查到用户的所在机构 + user_org = await sor.R('organization', {'id': users[0]['orgid']}) + #0代表用户为主 1代表用户为子 + user_type = 0 + # 子页面判断用户 + if len(reseller) >= 1: + if reseller[0]['orgid'] == user_org[0]['parentid']: + user_type += 1 + if reseller[0]['orgid'] == users[0]['orgid']: + user_type += 1 + # 主页面判断用户 else: + resellers = await sor.R('reseller', {'orgid': user_org[0]['parentid']}) + if len(resellers) >= 1: + user_type += 1 + if users[0]['user_reseller'] == '1': + user_type += 1 + # 证明是主级页面 + if len(reseller) < 1: + # 用户为主 + if user_type == 0: + return {'status': True} + else: + # 用户为子 + return {'status': False,'msg':'用户名或密码错误'} + # 子级页面 + else: + # 用户为主 + if user_type == 0: + return {'status': False,'msg':'用户名或密码错误'} # 用户为子 - return {'status': False,'msg':'用户名或密码错误'} - # 子级页面 - else: - # 用户为主 - if user_type == 0: - return {'status': False,'msg':'用户名或密码错误'} - # 用户为子 - else: - return {'status': True} + else: + return {'status': True} ret = await logintype(params_kw) return ret \ No newline at end of file diff --git a/f/web-kboss/src/views/homePage/components/topBox/index.vue b/f/web-kboss/src/views/homePage/components/topBox/index.vue index ee7f21a..0ab83fb 100644 --- a/f/web-kboss/src/views/homePage/components/topBox/index.vue +++ b/f/web-kboss/src/views/homePage/components/topBox/index.vue @@ -160,8 +160,13 @@ -
-
+
+
有问题,找开元 @@ -260,6 +265,15 @@ export default Vue.extend({ aiInput: '', aiLoading: false, aiMessages: [], + aiPanelPosition: { + left: null, + top: null + }, + aiPanelDragging: false, + aiPanelDragOffset: { + x: 0, + y: 0 + }, aiQuickQuestions: [ '推荐适合训练大模型的 GPU 服务器', '4090 和 A100 怎么选', @@ -308,6 +322,9 @@ export default Vue.extend({ } }); }, + beforeDestroy() { + this.stopAIPanelDrag() + }, computed: { ...mapGetters(["sidebar", "avatar", "device"]), ...mapState({ @@ -342,6 +359,18 @@ export default Vue.extend({ } else { return this.$route.path.includes('/homePage/index'); } + }, + aiPanelStyle() { + if (this.aiPanelPosition.left === null || this.aiPanelPosition.top === null) { + return {} + } + + return { + left: `${this.aiPanelPosition.left}px`, + top: `${this.aiPanelPosition.top}px`, + right: 'auto', + bottom: 'auto' + } } }, methods: { @@ -350,12 +379,14 @@ export default Vue.extend({ handleAIClick() { this.aiDialogVisible = true this.$nextTick(() => { + this.initAIPanelPosition() this.scrollAIChatToBottom() }) }, closeAIPanel() { this.aiDialogVisible = false + this.stopAIPanelDrag() }, resetAIChat() { @@ -367,6 +398,73 @@ export default Vue.extend({ this.sendAIMessage(question) }, + initAIPanelPosition() { + if (this.aiPanelPosition.left !== null && this.aiPanelPosition.top !== null) { + return + } + + const panel = this.$refs.aiChatPanel + if (!panel) return + + const panelWidth = panel.offsetWidth || 380 + const panelHeight = panel.offsetHeight || 620 + + this.aiPanelPosition = { + left: Math.max(window.innerWidth - panelWidth - 24, 16), + top: Math.max(window.innerHeight - panelHeight - 24, 16) + } + }, + + startAIPanelDrag(event) { + if (event.button !== 0) return + if (event.target && event.target.closest('.ai-chat-panel__close')) { + return + } + + const panel = this.$refs.aiChatPanel + if (!panel) return + + const rect = panel.getBoundingClientRect() + this.aiPanelDragging = true + this.aiPanelDragOffset = { + x: event.clientX - rect.left, + y: event.clientY - rect.top + } + + window.addEventListener('mousemove', this.handleAIPanelDrag) + window.addEventListener('mouseup', this.stopAIPanelDrag) + document.body.style.userSelect = 'none' + }, + + handleAIPanelDrag(event) { + if (!this.aiPanelDragging) return + + const panel = this.$refs.aiChatPanel + if (!panel) return + + const panelWidth = panel.offsetWidth || 380 + const panelHeight = panel.offsetHeight || 620 + const minLeft = 0 + const minTop = 0 + const maxLeft = Math.max(window.innerWidth - panelWidth, 0) + const maxTop = Math.max(window.innerHeight - panelHeight, 0) + + const nextLeft = event.clientX - this.aiPanelDragOffset.x + const nextTop = event.clientY - this.aiPanelDragOffset.y + + this.aiPanelPosition = { + left: Math.min(Math.max(nextLeft, minLeft), maxLeft), + top: Math.min(Math.max(nextTop, minTop), maxTop) + } + }, + + stopAIPanelDrag() { + this.aiPanelDragging = false + window.removeEventListener('mousemove', this.handleAIPanelDrag) + window.removeEventListener('mouseup', this.stopAIPanelDrag) + document.body.style.userSelect = '' + }, + handleAIKeydown(event) { if (event.key === 'Enter' && !event.shiftKey) { event.preventDefault() @@ -1251,6 +1349,7 @@ export default Vue.extend({ justify-content: space-between; border-bottom: 1px solid #f0f0f0; background: #fff; + cursor: move; } &__title { diff --git a/f/web-kboss/src/views/login/indexNew.vue b/f/web-kboss/src/views/login/indexNew.vue index 0686721..2b94cc9 100644 --- a/f/web-kboss/src/views/login/indexNew.vue +++ b/f/web-kboss/src/views/login/indexNew.vue @@ -10,7 +10,8 @@

- 开元数智 + NCMatch + 开元云 您身边的AI管家

@@ -42,105 +43,86 @@
@@ -197,12 +180,12 @@ import { getCodeAPI, // 获取验证码API getLogoAPI, // 获取Logo信息API - getPasswordCodeAPI, // 重置密码API + // getPasswordCodeAPI, // 重置密码API logintypeAPI, // 登录类型API loginUserAPI, // 用户登录API reqGetAppidAPI, // 获取微信AppID API reqGetCodeAPI, // 获取微信授权码API - retrieveCodeAPI, // 获取重置密码验证码API, + // retrieveCodeAPI, // 获取重置密码验证码API, } from "@/api/login"; import store from "@/store"; @@ -241,28 +224,22 @@ export default { // 验证码相关 SendCode_text: "获取验证码", // 手机登录验证码按钮文本 - SendCode_text1: "获取验证码", // 重置密码验证码按钮文本 isDisabled: false, // 手机登录验证码按钮是否禁用 - isDisabled1: false, // 重置密码验证码按钮是否禁用 time_count: 60, // 手机登录验证码倒计时 - time_count1: 60, // 重置密码验证码倒计时 timer: null, // 手机登录验证码定时器 - timer1: null, // 重置密码验证码定时器 // 防抖相关 isGettingCode: false, // 是否正在获取验证码 - isGettingCode1: false, // 是否正在获取重置密码验证码 debounceTimer: null, // 防抖定时器 - debounceTimer1: null, // 重置密码防抖定时器 // 对话框和加载状态 - dialogVisible: false, // 重置密码对话框是否可见 loading: false, // 登录按钮加载状态 // 登录表单数据 loginForm: { - username: "", // 用户名/手机号 + username: "", // 账户 password: "", // 密码 + mobile: "", // 手机号 vcode: "", // 验证码 codeid: "" // 验证码ID }, @@ -271,8 +248,12 @@ export default { // 表单验证规则 rules: { - username: [{ required: true, message: "请输入用户名/手机号", trigger: "blur" }], + username: [{ required: true, message: "请输入账户", trigger: "blur" }], password: [{ required: true, message: "请输入密码", trigger: "blur" }], + mobile: [ + { required: true, message: "请输入手机号", trigger: "blur" }, + { pattern: /^1[3-9]\d{9}$/, message: "请输入正确的手机号", trigger: "blur" } + ], vcode: [{ required: true, message: "请输入验证码", trigger: "blur" }], }, @@ -280,21 +261,20 @@ export default { capsTooltip: false, passwordType: "password", // 密码输入框类型:password或text - // 重置密码表单数据 - form: { - username: "", // 用户名 - vcode: "", // 验证码 - password: "", // 新密码 - id: "", // 用户ID - codeid: "", // 验证码ID - }, + // 重置密码相关暂时注释 + // form: { + // username: "", // 用户名 + // vcode: "", // 验证码 + // password: "", // 新密码 + // id: "", // 用户ID + // codeid: "", // 验证码ID + // }, - // 重置密码表单验证规则 - forms: { - username: [{ required: true, message: "请输入姓名", trigger: "blur" }], - password: [{ required: true, message: "请输入密码", trigger: "blur" }], - vcode: [{ required: true, message: "请输入验证码", trigger: "blur" }], - }, + // forms: { + // username: [{ required: true, message: "请输入姓名", trigger: "blur" }], + // password: [{ required: true, message: "请输入密码", trigger: "blur" }], + // vcode: [{ required: true, message: "请输入验证码", trigger: "blur" }], + // }, // Logo显示控制 isLogo: false, @@ -345,7 +325,6 @@ export default { beforeDestroy() { // 组件销毁前清理定时器和事件监听 clearInterval(this.timer) - clearInterval(this.timer1) clearInterval(this.getCodeTimer) window.removeEventListener('keydown', this.handleEnter); @@ -398,21 +377,19 @@ export default { }, 300); }, - // 防抖后的获取重置密码验证码方法 - debouncedGetCode1: function () { - if (this.isDisabled1 || this.isGettingCode1) return; - - this.isGettingCode1 = true; - - // 清除之前的定时器 - clearTimeout(this.debounceTimer1); - - // 设置新的定时器,300ms后执行 - this.debounceTimer1 = setTimeout(() => { - this.getCode1(); - this.isGettingCode1 = false; - }, 300); - }, + // 重置密码相关方法暂时注释 + // debouncedGetCode1: function () { + // if (this.isDisabled1 || this.isGettingCode1) return; + // + // this.isGettingCode1 = true; + // + // clearTimeout(this.debounceTimer1); + // + // this.debounceTimer1 = setTimeout(() => { + // this.getCode1(); + // this.isGettingCode1 = false; + // }, 300); + // }, // 跳转到百度产品页面 goBaidu(listUrl, url) { @@ -713,14 +690,14 @@ export default { // 获取手机登录验证码 getCode() { // 验证手机号格式 - if (!this.loginForm.username || !/^1[3-9]\d{9}$/.test(this.loginForm.username)) { + if (!this.loginForm.mobile || !/^1[3-9]\d{9}$/.test(this.loginForm.mobile)) { this.$message.error('请输入正确的手机号'); return; } // 使用新的API参数:mobile和action_type getCodeAPI({ - mobile: this.loginForm.username, + mobile: this.loginForm.mobile, action_type: 'login' }).then((res) => { console.log(res); @@ -767,56 +744,53 @@ export default { }); }, - // 获取重置密码验证码 - getCode1() { - // 验证手机号格式 - if (!this.form.username || !/^1[3-9]\d{9}$/.test(this.form.username)) { - this.$message.error('请输入正确的手机号'); - return; - } - - // 使用新的API参数:mobile和action_type - retrieveCodeAPI({ - mobile: this.form.username, - action_type: 'login' - }).then((res) => { - if (res.status == true) { - this.form.id = res.userid; - this.form.codeid = res.codeid; - let that = this; - this.time_count1 = 59; - this.isDisabled1 = true; - this.SendCode_text1 = "重新发送" + this.time_count1 + "s"; - - if (!that.timer1) { - that.timer1 = setInterval(() => { - if (that.time_count1 > 0) { - that.time_count1--; - that.SendCode_text1 = "重新发送" + that.time_count1 + "s"; - } else { - that.SendCode_text1 = "获取验证码"; - clearInterval(that.timer1); - that.timer1 = null; - this.isDisabled1 = false; - that.time_count1 = 60; - } - }, 1000); - } - this.$message({ - message: "验证码已发送,请注意查收。", - type: "success", - }); - } else { - this.$message({ - message: res.msg, - type: "error", - }); - } - }).catch(error => { - this.isGettingCode1 = false; - this.$message.error('验证码获取失败'); - }); - }, + // getCode1() { + // if (!this.form.username || !/^1[3-9]\d{9}$/.test(this.form.username)) { + // this.$message.error('请输入正确的手机号'); + // return; + // } + // + // retrieveCodeAPI({ + // mobile: this.form.username, + // action_type: 'login' + // }).then((res) => { + // if (res.status == true) { + // this.form.id = res.userid; + // this.form.codeid = res.codeid; + // let that = this; + // this.time_count1 = 59; + // this.isDisabled1 = true; + // this.SendCode_text1 = "重新发送" + this.time_count1 + "s"; + // + // if (!that.timer1) { + // that.timer1 = setInterval(() => { + // if (that.time_count1 > 0) { + // that.time_count1--; + // that.SendCode_text1 = "重新发送" + that.time_count1 + "s"; + // } else { + // that.SendCode_text1 = "获取验证码"; + // clearInterval(that.timer1); + // that.timer1 = null; + // this.isDisabled1 = false; + // that.time_count1 = 60; + // } + // }, 1000); + // } + // this.$message({ + // message: "验证码已发送,请注意查收。", + // type: "success", + // }); + // } else { + // this.$message({ + // message: res.msg, + // type: "error", + // }); + // } + // }).catch(error => { + // this.isGettingCode1 = false; + // this.$message.error('验证码获取失败'); + // }); + // }, // 标签页点击事件 handleClick(tab, event) { @@ -829,45 +803,25 @@ export default { this.capsTooltip = key && key.length === 1 && key >= "A" && key <= "Z"; }, - // 处理登录 - 账号登录保持原逻辑不变 + // 处理登录 handleLogin(formName) { this.$refs[formName].validate((valid) => { if (valid) { - // 根据登录类型构建不同的API参数 - let apiOneIphone = { + const loginParams = { username: this.loginForm.username, domain_name: this.photosUrl?.domain_name ? this.photosUrl.domain_name : '', + password: this.passwordEncryption(this.loginForm.password), + mobile: this.loginForm.mobile, vcode: this.loginForm.vcode, codeid: this.loginForm.codeid, wechat_openid: this.wechat_openid } - let apiOne = { - username: this.loginForm.username, - domain_name: this.photosUrl?.domain_name ? this.photosUrl.domain_name : '', - password: this.passwordEncryption(this.loginForm.password), - wechat_openid: this.wechat_openid - } - - let apiTwoIphone = { - username: this.loginForm.username, - vcode: this.loginForm.vcode, - codeid: this.loginForm.codeid, - wechat_openid: this.wechat_openid - } - - let apiTwo = { - username: this.loginForm.username, - password: this.passwordEncryption(this.loginForm.password), - } - - // 根据登录类型调用不同的API - logintypeAPI(this.loginType === '0' ? apiOne : apiOneIphone).then(res => { + logintypeAPI(loginParams).then(res => { if (res.status == true) { this.loading = true; - // 执行登录 this.$store - .dispatch("user/login", this.loginType === '0' ? apiTwo : apiTwoIphone) + .dispatch("user/login", loginParams) .then((res) => { this.loading = false; @@ -973,11 +927,10 @@ export default { }); }, - // 打开重置密码对话框 - resetPassword() { - this.dialogVisible = true; - this.$refs.loginForm.resetFields(); - }, + // resetPassword() { + // this.dialogVisible = true; + // this.$refs.loginForm.resetFields(); + // }, // 跳转到注册页面 handleRegister() { @@ -985,41 +938,39 @@ export default { this.$router.push({ name: "registrationPage" }); }, - // 取消重置密码 - cancelReset() { - this.dialogVisible = false; - this.$refs.form.resetFields(); - }, + // cancelReset() { + // this.dialogVisible = false; + // this.$refs.form.resetFields(); + // }, - // 提交重置密码 - handleSubmit() { - let parmas = { - id: this.form.id, - password: this.form.password, - codeid: this.form.codeid, - vcode: this.form.vcode, - }; - getPasswordCodeAPI(parmas).then((res) => { - if (res.status == true) { - this.$message({ - message: "密码重置成功", - type: "success", - }); - this.isDisabled1 = false; - this.dialogVisible = false; - this.SendCode_text1 = "获取验证码"; - clearInterval(this.timer1); - this.timer1 = null; - this.time_count1 = 60; - this.$refs.form.resetFields(); - } else { - this.$message({ - message: res.msg, - type: "error", - }); - } - }); - }, + // handleSubmit() { + // let parmas = { + // id: this.form.id, + // password: this.form.password, + // codeid: this.form.codeid, + // vcode: this.form.vcode, + // }; + // getPasswordCodeAPI(parmas).then((res) => { + // if (res.status == true) { + // this.$message({ + // message: "密码重置成功", + // type: "success", + // }); + // this.isDisabled1 = false; + // this.dialogVisible = false; + // this.SendCode_text1 = "获取验证码"; + // clearInterval(this.timer1); + // this.timer1 = null; + // this.time_count1 = 60; + // this.$refs.form.resetFields(); + // } else { + // this.$message({ + // message: res.msg, + // type: "error", + // }); + // } + // }); + // }, } } @@ -1048,7 +999,6 @@ $dark_gray: #889aa4; width: 1400px; justify-content: space-around; align-items: center; - // align-items: center; margin-top: -60px; .left { @@ -1074,252 +1024,182 @@ $dark_gray: #889aa4; } } - -::v-deep .el-input__inner { - padding: 0 !important; - border: 1px solid red; -} - +/* 统一登录表单容器 */ .login-form { - padding-left: 52px; - padding-right: 49px; - - //width: 481px; - //height: 521px; + padding: 40px 50px; mix-blend-mode: normal; background-color: white; border-radius: 24px; + box-sizing: border-box; } -.user-input { - display: flex; - justify-content: center; - flex-direction: row; -} - +/* 登录标题统一间距 */ .login-text { - margin-top: 20px; - mix-blend-mode: normal; - color: rgba(0, 0, 0, 1); + display: block; + text-align: center; + margin-bottom: 30px; font-family: PingFang SC; font-size: 24px; - letter-spacing: 1.1px; + font-weight: 500; + color: #333; } -.el-tabs__nav-wrap::after { - content: ""; - position: absolute; - left: 0; - bottom: 0; - width: 0; - height: 0; - background-color: #dfe4ed; - z-index: -999; +/* 统一输入框容器样式 */ +.user-input { + display: flex; + align-items: center; + width: 100%; + height: 40px; } +/* 统一图标容器 */ .icon-box { display: flex; justify-content: center; align-items: center; - width: 28px; - height: 21px; - margin-top: 8px; - margin-left: 5px; - margin-right: 5px; + width: 24px; + height: 24px; + margin: 0 8px; + flex-shrink: 0; } -.userInput .el-input__inner { - background-color: white; +/* 统一表单项目样式 + 边距 */ +::v-deep .el-form-item { + margin-bottom: 24px !important; /* 给错误提示预留空间 */ } -.login-form-style { - background-color: transparent; - - .el-input { - input { - border: 0px; - border-radius: 0px; - padding: 12px 5px 12px 15px; - color: $light_gray; - caret-color: $cursor; - - &:-webkit-autofill { - -webkit-box-shadow: 0 0 0 1000px #fff inset !important; - -webkit-text-fill-color: $cursor !important; - } - } - } - - .el-form-item { - border: 1px solid rgba(255, 255, 255, 0.1); - background: rgba(0, 0, 0, 0.1); - border-radius: 5px; - color: #454545; - } -} - -.el-input ::v-deep .el-input__inner { +/* 统一输入框外框 */ +::v-deep .el-input, +::v-deep .el-input__inner { + width: 100%; + height: 40px; + line-height: 40px; border: none; - background-color: white; + background: transparent; + padding: 0 10px !important; + box-sizing: border-box; + font-size: 14px; +} - &:-webkit-autofill { - background-color: white; - -webkit-box-shadow: 0 0 0 1000px #fff inset !important; - -webkit-text-fill-color: $cursor !important; +/* 统一表单输入框外层容器 */ +.login-form-style { + .el-form-item { + border: 1px solid #d9d9d9; + background: #fff; + border-radius: 4px; + min-height: 40px; + overflow: visible; + position: relative; + } + + /* 密码框提示样式 */ + .el-tooltip { + display: block; + } + + /* 验证码输入框宽度 */ + .invitecode { + width: 180px !important; } } -.tip-word { - mix-blend-mode: normal; - color: rgba(65, 70, 79, 1); - font-family: PingFang SC; +::v-deep .el-form-item__error { + padding-top: 6px; font-size: 12px; - margin-top: 10px; - line-height: 17px; - text-indent: 0.5em; + line-height: 1.4; } +/* 自动填充背景色覆盖 */ +::v-deep .el-input__inner:-webkit-autofill { + -webkit-box-shadow: 0 0 0 1000px #fff inset !important; + -webkit-text-fill-color: #333 !important; +} + +/* 密码显示隐藏按钮 */ +.show-pwd { + display: flex; + align-items: center; + padding-right: 10px; + cursor: pointer; +} + +/* 验证码按钮统一样式 */ +.getCodeStyleNew { + width: 110px; + height: 40px; + font-size: 13px; + display: flex; + justify-content: center; + align-items: center; + color: #41464f; + border: 1px solid #dde2e9; + background: #f6f8fa; + border-radius: 4px; + transition: all 0.2s; + + &:hover { + cursor: pointer; + border-color: #4281ff; + background: #fafbfc; + } +} + +/* 登录按钮统一间距 */ +.login-btn { + height: 42px; + line-height: 42px; + font-size: 16px; + margin-top: 10px !important; + margin-bottom: 20px !important; +} + +/* 底部按钮区域统一 */ .two-btn { - margin-top: 20px; width: 300px; display: flex; - justify-content: space-between; -} - -.forget-password { - mix-blend-mode: normal; - color: rgba(65, 70, 79, 1); - font-family: PingFang SC; - font-size: 14px; - height: 100%; - padding-left: 7px; + justify-content: center; + margin-top: 0; } .go-register { - padding-right: 7px; - mix-blend-mode: normal; - text-align: center; - color: rgba(0, 0, 0, 1); - font-family: PingFang SC; font-size: 14px; - letter-spacing: 0.7px; -} - -.go-register:hover { - cursor: default; -} - -.forget-password:hover { - color: blue; - cursor: pointer; -} - -.login-btn { - mix-blend-mode: normal; - text-align: center; - color: rgba(255, 255, 255, 1); - font-family: PingFang SC; - font-size: 16px; -} - -.main-content-box { - margin-top: -10px; -} - -.login-container { - margin-top: 10px; -} - -.login-container ::v-deep .el-tabs__nav-wrap::after { - height: 0; -} - -.go-register-btn { - display: inline-block; - color: blue; - border-bottom: 2px solid blue !important; - cursor: pointer; -} - -#uesr-name-id:-webkit-autofill { - background-color: white; - -webkit-box-shadow: 0 0 0 1000px #fff inset !important; - -webkit-text-fill-color: $cursor !important; -} - -.rePassword { - background-color: white; + color: #333; + + .go-register-btn { + color: #409eff; + border-bottom: 1px solid #409eff; + cursor: pointer; + margin-left: 4px; + } } +/* 弹窗样式统一 */ .dialog-footer { display: flex; justify-content: flex-end; - align-items: center; - padding-bottom: 15px; + padding-top: 10px; } +/* Logo 定位统一 */ .logo-top { width: 200px !important; height: 70px !important; position: absolute; - top: 2%; - left: 2%; + top: 20px; + left: 20px; } - .logo-top1 { width: 260px !important; height: 80px !important; position: absolute; - top: 3%; - left: 3%; -} - -::v-deep .el-tabs__nav-scroll { - height: 0px; -} - -@media screen and(max-width: 760px) { - - .login-form { - width: 90% !important; - position: absolute; - top: 13%; - right: 5%; - } - - .go-register { - padding-right: 10px; - width: 174px; - } -} - -.ad-dialog { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - background-color: pink; - width: 500px; - height: 500px; - border: 1px solid red; - z-index: 999999999999; -} - -.showAdImg { - width: 100%; - height: 100%; - background-color: green; - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - background-image: url("./images/ad.jpg"); - background-size: cover; + top: 20px; + left: 20px; } +/* 底部信息 */ .message-footer { - flex-wrap: wrap; display: flex; + flex-wrap: wrap; justify-content: center; align-items: center; height: 50px; @@ -1328,94 +1208,37 @@ $dark_gray: #889aa4; bottom: 0; z-index: 10; color: #000; + font-size: 12px; - item { + .item { display: flex; - justify-content: center; align-items: center; - margin-bottom: 10px; + margin-bottom: 5px; } - span { margin: 0 10px; - font-size: 12px; } } .goPAge { - transition: all .3s ease-in-out; + cursor: pointer; + transition: color 0.3s; &:hover { - cursor: pointer; - color: blue; + color: #409eff; } } -.login-type { - display: flex; - justify-content: flex-start; - align-items: center; - color: #41464f; - font-size: 16px; - margin: 25px 0 10px; - - span { - position: relative; - padding-bottom: 3px; - display: inline-block; - margin-right: 20px; - - &:hover { - cursor: pointer; - color: rgb(22, 100, 255); - } - - &:before { - transition: all .2s ease-in-out; - content: ""; - position: absolute; - bottom: 0; - width: 0; - height: 2px; - background: rgb(22, 100, 255); - } - } +/* 隐藏不需要的下划线 */ +::v-deep .el-tabs__nav-wrap::after { + display: none; } -.activeType { - color: rgb(22, 100, 255); - - &:before { - content: ""; - position: absolute; - bottom: 0; - width: 100% !important; - height: 2px; - background: rgb(22, 100, 255); - transition: all .2s ease-in-out; +/* 响应式 */ +@media screen and (max-width: 760px) { + .login-form { + width: 90% !important; + padding: 30px 20px; } } - -.getCodeStyleNew { - font-size: 13px; - display: flex; - justify-content: center; - align-items: center; - padding: 0 10px; - color: #41464f; - border: 1px solid #dde2e9; - background: #f6f8fa; - box-shadow: 0 1px 1px rgba(0, 0, 0, .08); - border-radius: 4px; - transition: all .1s linear; - - &:hover { - transition: all .1s linear; - cursor: pointer; - box-shadow: 0 2px 3px rgba(0, 0, 0, .15); - color: #41464f; - border-color: rgb(66, 129, 255); - background: #fafbfc; - } -} - + \ No newline at end of file