无人机管理后台前端(已迁走)
张含笑
2025-07-03 452bfc09738faa02d15fe8c4863293f5aa952b98
feat:修改帮助中心提示语
1 files modified
43 ■■■■ changed files
src/page/index/top/top-qna.vue 43 ●●●● patch | view | raw | blame | history
src/page/index/top/top-qna.vue
@@ -2,7 +2,7 @@
  <div class="top-qna">
    <el-dropdown @command="dropdownClick">
      <!-- <img class="help-icon" alt="" src="@/assets/images/helpCenter/helpIcon.png" /> -->
      <el-icon  class="help-icon " color="#707070" size="17">
      <el-icon class="help-icon" color="#707070" size="17">
        <QuestionFilled />
      </el-icon>
      <template #dropdown>
@@ -22,7 +22,7 @@
const router = useRouter();
const systemupdateFilePath = ref(null);
const rumenPath = ref(null);
const fileData = ref([]); // 存储所有文件数据
const fileData = ref([]);
const loading = ref(false);
const getlistDataAPI = async () => {
  loading.value = true;
@@ -30,21 +30,19 @@
    const res = await listDataAPI();
    if (res.data.code === 200 && res.data.data) {
      fileData.value = res.data.data;
      // 使用 find 方法查找特定条目
      const systemUpdateItem = res.data.data.find(item => item.id === 4);
      const rumenItem = res.data.data.find(item => item.id === 2);
      const systemUpdateItem = res.data.data.find(item => item.id === 4); //系统更新
      const rumenItem = res.data.data.find(item => item.id === 2); //入门指南
      if (systemUpdateItem) {
        systemupdateFilePath.value = systemUpdateItem.filePath;
      } else {
        console.warn('未找到系统更新条目');
        console.warn('暂无系统更新');
      }
      if (rumenItem) {
        rumenPath.value = rumenItem.filePath;
      } else {
        console.warn('未找到入门指南条目');
        console.warn('暂无入门指南');
      }
    } else {
      ElMessage.error('获取帮助数据失败');
@@ -57,23 +55,24 @@
  }
};
const dropdownClick = val => {
  // 确保数据已加载
  if (loading.value) {
    ElMessage.warning('数据正在加载,请稍后');
    return;
  }
  if (val === 'guide') {
    if (!rumenPath.value) {
      ElMessage.warning('入门指南文件未找到');
      ElMessage.warning('暂无入门指南文件');
      return;
    }
  window.open(rumenPath.value, '_blank');
    window.open(rumenPath.value, '_blank');
  } else if (val === 'systemupdate') {
  window.open(systemupdateFilePath.value, '_blank');
    if (!systemupdateFilePath.value) {
      ElMessage.warning('暂无系统更新文件');
      return;
    }
    window.open(systemupdateFilePath.value, '_blank');
  }
};
@@ -90,11 +89,11 @@
  justify-content: center;
  cursor: pointer;
  .help-icon {
  width: 25px;height: 25px;}
  .theme-white .el-dropdown{
  color: none !important;
    width: 25px;
    height: 25px;
  }
  .theme-white .el-dropdown {
    color: none !important;
  }
}
</style>