yangyin
2024-11-22 93357e65760faaf35a65398738ab24d07674be40
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) => {});