From f41e52e3debf30558d556dc0451776f5422fb9b8 Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期五, 08 十一月 2024 14:20:02 +0800
Subject: [PATCH] Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test

---
 src/layout/component/sidebar/components/MenuList.vue |   63 ++++++++++++++++++-------------
 1 files changed, 37 insertions(+), 26 deletions(-)

diff --git a/src/layout/component/sidebar/components/MenuList.vue b/src/layout/component/sidebar/components/MenuList.vue
index 5aa2969..f818f64 100644
--- a/src/layout/component/sidebar/components/MenuList.vue
+++ b/src/layout/component/sidebar/components/MenuList.vue
@@ -21,14 +21,14 @@
 					><span class="user_name"> {{ userName }} </span></span
 				><span ref="toggleExitLoginBtnRef"
 					><span
-						class="ywicon text-white"
-						:class="{ 'icon-fold': !state.isShowExitLogin, 'icon-unfold': state.isShowExitLogin }"
+						class="ywifont text-white"
+						:class="{ 'ywicon-fold': !state.isShowExitLogin, 'ywicon-unfold': state.isShowExitLogin }"
 						@click="toggleShowExitLogin"
 					></span
 				></span>
 			</div>
 			<div class="pop_up actived" v-show="state.isShowExitLogin">
-				<div class="exit" @click="logoutClick"><i class="ywicon icon-tuichu"></i> 閫�鍑虹櫥褰�</div>
+				<div class="exit" @click="logoutClick"><i class="ywifont ywicon-tuichu"></i> 閫�鍑虹櫥褰�</div>
 			</div>
 		</div>
 		<div v-else class="user_login">
@@ -40,7 +40,7 @@
 	<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>
+				<i class="ywifont ywicon-guanbi closes" @click="handleClose"></i>
 				<h1><span>鐧诲綍 WI 姘村姟鏅鸿兘</span></h1>
 				<el-tabs v-model="state.activeLoginName" class="mt-[24px]" @tab-change="handleUserClick">
 					<el-tab-pane label="璐︽埛瀵嗙爜鐧诲綍" name="accountUser">
@@ -75,9 +75,7 @@
 							<el-form-item prop="verifyCode" label="楠岃瘉鐮�">
 								<el-input v-model="state.loginPhoneForm.verifyCode" placeholder="璇疯緭鍏ュ洓浣嶉獙璇佺爜" maxlength="6" clearable>
 									<template #append>
-										<el-button type="primary" @click="handleSendVerifyCode" :disabled="countdown > 0">{{
-											countdown > 0 ? `${countdown}绉掑悗閲嶈瘯` : '鑾峰彇楠岃瘉鐮�'
-										}}</el-button>
+										<el-button type="primary" @click="handleSendVerifyCode" :disabled="hasSended">{{ sendCodeMsg }}</el-button>
 									</template>
 								</el-input>
 							</el-form-item>
@@ -102,11 +100,12 @@
 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));
 const userName = ref('');
-const countdown = ref(0);
+const countdown = ref(null);
 const firstUserCharacter = computed(() => userName.value?.[0]?.toUpperCase());
 watchEffect(() => {
 	if (!isLoginStatus.value) return;
@@ -114,23 +113,23 @@
 });
 let state = reactive({
 	asideTitleList: [
-		{
-			id: 1,
-			icon: '/static/images/wave/AsideIcon.png',
-			title: '搴旂敤鍦烘櫙',
-			routerName: 'AllScenario',
-		},
-		{
-			id: 2,
-			icon: '/static/images/wave/AsideIcon.png',
-			title: '甯姪涓績',
-			// routerName:'Scenario',
-		},
-		{
-			id: 3,
-			icon: '/static/images/wave/AsideIcon.png',
-			title: '涓汉璁剧疆',
-		},
+		// {
+		// 	id: 1,
+		// 	icon: '/static/images/wave/AsideIcon.png',
+		// 	title: '搴旂敤鍦烘櫙',
+		// 	routerName: 'AllScenario',
+		// },
+		// {
+		// 	id: 2,
+		// 	icon: '/static/images/wave/AsideIcon.png',
+		// 	title: '甯姪涓績',
+		// 	// routerName:'Scenario',
+		// },
+		// {
+		// 	id: 3,
+		// 	icon: '/static/images/wave/AsideIcon.png',
+		// 	title: '涓汉璁剧疆',
+		// },
 		{
 			id: 4,
 			icon: '/static/images/wave/AsideIcon.png',
@@ -162,16 +161,26 @@
 	verifyCode: [{ required: true, message: '璇疯緭鍏ラ獙璇佺爜', trigger: 'blur' }],
 };
 const handleClick = (item) => {
-	if(!item.routerName) return;
+	if (!item.routerName) return;
 	gotoRoute({ name: item.routerName });
 };
+const LOGIN_CLIENT = 'Web绔�';
+
 //鐧诲綍
 const openLoginDlg = async () => {
+	// 鍒嗕韩椤典笉闇�瑕�
+	if (isSharePage.value) return;
 	state.isShowLogin = true;
 };
 const handleClose = () => {
 	state.isShowLogin = false;
 };
+const hasSended = computed(() => {
+	return countdown.value !== null;
+});
+const sendCodeMsg = computed(() => {
+	return !hasSended.value ? '鑾峰彇楠岃瘉鐮�' : `${countdown.value} 绉掑悗閲嶈瘯`;
+});
 //鐧诲綍
 const onSubmit = async () => {
 	if (state.activeLoginName === 'accountUser') {
@@ -181,6 +190,7 @@
 		const res = await PostLogin({
 			user: state.loginForm.account,
 			pass: state.loginForm.pwd,
+			client: LOGIN_CLIENT,
 		});
 		if (!res.json_ok) {
 			return ElMessage.error(res.json_msg);
@@ -194,6 +204,7 @@
 		const res = await loginMessageUser({
 			phone: state.loginPhoneForm.phoneUser,
 			code: state.loginPhoneForm.verifyCode,
+			client: LOGIN_CLIENT,
 		});
 		if (!res.json_ok) {
 			return ElMessage.error(res.json_msg);

--
Gitblit v1.9.3