From 93357e65760faaf35a65398738ab24d07674be40 Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期五, 22 十一月 2024 09:54:36 +0800
Subject: [PATCH] 修改初始化页面没数据问题

---
 src/stores/chatRoom.ts |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/stores/chatRoom.ts b/src/stores/chatRoom.ts
index fb0fd98..a147283 100644
--- a/src/stores/chatRoom.ts
+++ b/src/stores/chatRoom.ts
@@ -90,8 +90,8 @@
 };
 const getSelectListSample = async (res1, res2) => {
 	try {
-		const samples = res1?.samples ?? [];
-		const templateSamples = (res2?.templates ?? []).map((item) => ({
+		const samples = res1?.value?.samples ?? [];
+		const templateSamples = (res2?.value?.templates ?? []).map((item) => ({
 			group_id: item.template_group,
 			sample_id: item.template_id,
 			sample_title: item.template_title,
@@ -117,10 +117,10 @@
  * 鑾峰彇鍏ㄥ眬鎵�鏈夋暟鎹�
  */
 export const getAllData = async () => {
-	Promise.all([getSectionList(), getSelectSample({}), getUserTemplateList()])
+	Promise.allSettled([getSectionList(), getSelectSample({}), getUserTemplateList()])
 		.then((res) => {
 			let [sectionList, selectSample, userTemplateList] = res;
-			sceneGroupList.value = sectionList?.groups ?? [];
+			sceneGroupList.value = sectionList?.value?.groups ?? [];
 			getSelectListSample(selectSample, userTemplateList);
 		})
 		.catch((err) => {});

--
Gitblit v1.9.3