From 21bd4f0a936a77dca7a81f21b670c5b01f52e349 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期四, 26 十二月 2024 12:01:50 +0800
Subject: [PATCH] 修改文案;userInfo 存的数据结构

---
 src/views/project/ch/home/component/waterRight/bottom.vue |   23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/src/views/project/ch/home/component/waterRight/bottom.vue b/src/views/project/ch/home/component/waterRight/bottom.vue
index b7b1018..8e5396a 100644
--- a/src/views/project/ch/home/component/waterRight/bottom.vue
+++ b/src/views/project/ch/home/component/waterRight/bottom.vue
@@ -48,8 +48,8 @@
 </template>
 
 <script setup lang="ts">
-import { computed, reactive, ref, watch } from 'vue';
-import { activeGroupType, sceneGroupList, sectionAList, topGroupId } from '/@/stores/chatRoom';
+import { computed, reactive, ref } from 'vue';
+import { activeGroupType, sceneGroupList, topGroupId } from '/@/stores/chatRoom';
 let state = reactive({
 	applicationScenarios: [],
 	scenariosIds: [],
@@ -95,18 +95,15 @@
 	const iconCount = iconList.value.length;
 	return iconList.value[index % iconCount];
 };
-const getMainSectionList = (val) => {
+const getMainSectionList = async () => {
 	let result = [];
-	console.log('馃殌 ~ sceneGroupList.value:', sceneGroupList.value);
-	sceneGroupList.value.forEach((sectionItem, index) => {
+	await sceneGroupList.value.forEach((sectionItem, index) => {
 		sectionItem.Icon = getIconByIndex(index);
-		if (val == sectionItem.group_type) {
+		if (activeGroupType.value == sectionItem.group_type) {
 			result.push(sectionItem);
 		}
 	});
 	state.applicationScenarios = result;
-	console.log("馃殌 ~ 涓诲満鏅鐞嗗悗鐨勬暟鎹簮:", result)
-	sectionAList.value = sceneGroupList.value;
 	result?.[0] && changeScenarios(result[0]);
 };
 const groupedArray = computed(() => {
@@ -117,13 +114,9 @@
 	}
 	return groups;
 });
-watch(
-	() => activeGroupType.value,
-	(val) => {
-		getMainSectionList(val);
-	},
-	{ immediate: true }
-);
+defineExpose({
+	getMainSectionList,
+});
 </script>
 <style scoped lang="scss">
 .pc-scenes {

--
Gitblit v1.9.3