yangyin
2024-11-20 c007150566688c9cda80c7aecd784c9300dfab36
提交代码
已修改2个文件
14 ■■■■■ 文件已修改
src/stores/chatRoom.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/project/ch/home/component/waterRight/bottom.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/stores/chatRoom.ts
@@ -121,9 +121,6 @@
        .then((res) => {
            let [sectionList, selectSample, userTemplateList] = res;
            sceneGroupList.value = sectionList?.groups ?? [];
            console.log('🚀 ~ sectionList:', sectionList);
            console.log('🚀 ~ selectSample:', selectSample);
            console.log('🚀 ~ userTemplateList:', userTemplateList);
            getSelectListSample(selectSample, userTemplateList);
        })
        .catch((err) => {});
src/views/project/ch/home/component/waterRight/bottom.vue
@@ -95,15 +95,17 @@
    const iconCount = iconList.value.length;
    return iconList.value[index % iconCount];
};
const getMainSectionList = () => {
const getMainSectionList = (val) => {
    let result = [];
    console.log('🚀 ~ sceneGroupList.value:', sceneGroupList.value);
    sceneGroupList.value.forEach((sectionItem, index) => {
        sectionItem.Icon = getIconByIndex(index);
        if (activeGroupType.value == sectionItem.group_type) {
        if (val == sectionItem.group_type) {
            result.push(sectionItem);
        }
    });
    state.applicationScenarios = result;
    console.log("🚀 ~ 主场景处理后的数据源:", result)
    sectionAList.value = sceneGroupList.value;
    result?.[0] && changeScenarios(result[0]);
};
@@ -115,11 +117,10 @@
    }
    return groups;
});
watch(
    () => activeGroupType.value,
    () => {
        getMainSectionList();
    (val) => {
        getMainSectionList(val);
    },
    { immediate: true }
);