From 118e03d7df7fc427f529439dfbfcf8a6274d206a Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 14 十一月 2024 13:24:36 +0800 Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test --- src/stores/chatRoom.ts | 9 ++------- src/layout/component/sidebar/components/MenuList.vue | 13 ++++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/layout/component/sidebar/components/MenuList.vue b/src/layout/component/sidebar/components/MenuList.vue index f818f64..579cdb5 100644 --- a/src/layout/component/sidebar/components/MenuList.vue +++ b/src/layout/component/sidebar/components/MenuList.vue @@ -37,7 +37,7 @@ </div> </div> </div> - <div class="pc-login items-center justify-center" style="display: flex" v-show="state.isShowLogin"> + <div class="pc-login items-center justify-center" style="display: flex" v-show="isShowLogin"> <div class="login_box"> <div class="sign_in"> <i class="ywifont ywicon-guanbi closes" @click="handleClose"></i> @@ -96,11 +96,11 @@ import { computed, onMounted, reactive, ref, watchEffect } from 'vue'; import { PostLogin, loginMessageUser, loginVerifyMessage } from '/@/api/ai/user'; import router from '/@/router'; +import { isSharePage, isShowLogin } from '/@/stores/chatRoom'; import emitter from '/@/utils/mitt'; import { accessSessionKey, userNameKey } from '/@/utils/request'; import { gotoRoute } from '/@/utils/route'; import { Local, LoginInfo } from '/@/utils/storage'; -import { isSharePage } from '/@/stores/chatRoom'; const loginFormRef = ref<FormInstance>(null); //璐︽埛瀵嗙爜鐧诲綍 const formPhoneRef = ref(); //鎵嬫満鍙风櫥褰� const isLoginStatus = ref(!!Local.get(accessSessionKey)); @@ -137,7 +137,6 @@ routerName: 'AboutUs', }, ], - isShowLogin: false, isShowExitLogin: false, loginForm: { account: '', @@ -170,10 +169,10 @@ const openLoginDlg = async () => { // 鍒嗕韩椤典笉闇�瑕� if (isSharePage.value) return; - state.isShowLogin = true; + isShowLogin.value = true; }; const handleClose = () => { - state.isShowLogin = false; + isShowLogin.value = false; }; const hasSended = computed(() => { return countdown.value !== null; @@ -212,7 +211,7 @@ LoginInfo.set(res.hswatersession, state.loginPhoneForm.phoneUser); } - state.isShowLogin = false; + isShowLogin.value = false; isLoginStatus.value = true; window.location.reload(); }; @@ -265,7 +264,7 @@ }; onMounted(() => { emitter.on('openLoginDlg', () => { - if (state.isShowLogin || isLoginStatus.value) return; + if (isShowLogin.value || isLoginStatus.value) return; openLoginDlg(); }); diff --git a/src/stores/chatRoom.ts b/src/stores/chatRoom.ts index e104a6c..2246114 100644 --- a/src/stores/chatRoom.ts +++ b/src/stores/chatRoom.ts @@ -69,7 +69,7 @@ * 鍏ㄥ眬浣跨敤鐨� ref */ export const sectionAList = ref([]); - +export const isShowLogin = ref(false); //#region ====================== 鍏ㄥ眬浣跨敤鏁版嵁 ====================== // group 鍒楄〃 export const sceneGroupList = ref([]); @@ -130,15 +130,11 @@ /** @description 鑱婂ぉ瀹ゅ睍绀烘ā寮� */ // export const chatDisplayMode = ref<ChatMode>('default'); -export const SHARE_PAGE_NAME = 'ShareAnswer' +export const SHARE_PAGE_NAME = 'ShareAnswer'; export const isSharePage = computed(() => { const isShare = router.currentRoute.value.name === SHARE_PAGE_NAME; return isShare; }); - - - - export const newChatRoomClick = async () => { const res = await CreateHistoryGroup({ @@ -175,7 +171,6 @@ }, }); } - }; // 鏄惁宸茬粡灞曠ず寮曞 export const hadShowFirstGuide = ref(false); \ No newline at end of file -- Gitblit v1.9.3