From 78137be892b6810b54ba70f27c28a69a7179e603 Mon Sep 17 00:00:00 2001 From: yangyin <1850366751@qq.com> Date: 星期一, 15 七月 2024 15:59:35 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/WI/Web.V1.0 --- src/layout/component/sidebar/components/MenuList.vue | 40 +++++++++++++++++++--------------------- 1 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/layout/component/sidebar/components/MenuList.vue b/src/layout/component/sidebar/components/MenuList.vue index e6948ac..ed6be66 100644 --- a/src/layout/component/sidebar/components/MenuList.vue +++ b/src/layout/component/sidebar/components/MenuList.vue @@ -16,7 +16,8 @@ <div class="user_head"> <span ><span - ><span class="user-head">{{ firstUserCharacter }}</span><span class="identifying"><!----></span></span + ><span class="user-head">{{ firstUserCharacter }}</span + ><span class="identifying"><!----></span></span ><span class="user_name"> {{ userName }} </span></span ><span ref="toggleExitLoginBtnRef" ><span @@ -36,12 +37,12 @@ </div> </div> </div> - <div class="pc-login" v-show="state.isShowLogin"> + <div class="pc-login items-center justify-center" style="display: flex" v-show="state.isShowLogin"> <div class="login_box"> <div class="sign_in"> <i class="ywicon icon-guanbi closes" @click="handleClose"></i> - <h1><span class="ml-[33px]">鐧诲綍 ChatAI</span></h1> - <el-form ref="loginFormRef" :model="state.loginForm" :rules="loginRules" class="demo-ruleForm" size="large"> + <h1><span>鐧诲綍 WI 姘村姟</span></h1> + <el-form ref="loginFormRef" :model="state.loginForm" :rules="loginRules" class="demo-ruleForm mt-[24px]" size="large"> <el-form-item label="璐﹀彿" prop="account"> <el-input v-model="state.loginForm.account" clearable /> </el-form-item> @@ -49,7 +50,7 @@ <el-input v-model="state.loginForm.pwd" type="password" autocomplete="off" clearable /> </el-form-item> </el-form> - <div class="mt-[115px]"> + <div class="mt-[24px]"> <el-button type="primary" @click="onSubmit" class="set-login_btn">鐧诲綍</el-button> </div> </div> @@ -62,27 +63,27 @@ import { computed, onMounted, reactive, ref, watchEffect } from 'vue'; import { PostLogin } from '/@/api/ai/user'; import router from '/@/router'; +import emitter from '/@/utils/mitt'; import { accessSessionKey, userNameKey } from '/@/utils/request'; import { gotoRoute } from '/@/utils/route'; -import { Local } from '/@/utils/storage'; -import emitter from '/@/utils/mitt'; +import { Local, LoginInfo } from '/@/utils/storage'; const loginFormRef = ref<FormInstance>(null); const isLoginStatus = ref(!!Local.get(accessSessionKey)); const userName = ref(''); -const firstUserCharacter =computed(()=>userName.value?.[0]?.toUpperCase()); -watchEffect(()=>{ - if(!isLoginStatus.value)return; - userName.value = Local.get(userNameKey) -}) +const firstUserCharacter = computed(() => userName.value?.[0]?.toUpperCase()); +watchEffect(() => { + if (!isLoginStatus.value) return; + userName.value = Local.get(userNameKey); +}); let state = reactive({ asideTitleList: [ { id: 1, icon: '/static/images/wave/AsideIcon.png', title: '搴旂敤鍦烘櫙', - routerName: 'Scenario', + routerName: 'AllScenario', }, { id: 2, @@ -131,8 +132,8 @@ user: state.loginForm.account, pass: state.loginForm.pwd, }); - Local.set(accessSessionKey, res.hswatersession); - Local.set(userNameKey,state.loginForm.account); + + LoginInfo.set(res.hswatersession,state.loginForm.account); state.isShowLogin = false; isLoginStatus.value = true; window.location.reload(); @@ -148,8 +149,7 @@ const logoutClick = () => { state.isShowExitLogin = false; isLoginStatus.value = false; - Local.remove(accessSessionKey); - + LoginInfo.remove(); }; const toggleExitLoginBtnRef = ref<HTMLDivElement>(null); @@ -161,7 +161,7 @@ onMounted(() => { emitter.on('openLoginDlg', () => { - if(state.isShowLogin || isLoginStatus.value)return; + if (state.isShowLogin || isLoginStatus.value) return; openLoginDlg(); }); @@ -354,9 +354,9 @@ .login_box { position: relative; width: 450px; - height: 550px; margin: 15vh auto; .sign_in { + padding: 39px; position: relative; width: 100%; height: 100%; @@ -387,12 +387,10 @@ h1 { box-sizing: content-box; width: 100%; - margin-top: 25px; font-size: 30px; font-weight: 500; color: #1c153a; text-align: left !important; - margin-bottom: 105px; } .demo-ruleForm { :deep(.el-input__wrapper) { -- Gitblit v1.9.3