diff --git a/src/utils/http.js b/src/utils/http.js index 09d2060..76bc77d 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -3,7 +3,7 @@ import cache from "./cache" import { ElMessage } from "element-plus" import router from "@/router" import { useLoginStore } from "@/store/authentication/index" -// 创建axios实例 + const service = axios.create({ baseURL: import.meta.env.VITE_APP_BASE_API, // 从环境变量获取基础URL timeout: 10000, // 请求超时时间 diff --git a/src/views/LinkPrediction/components/communityNode.vue b/src/views/LinkPrediction/components/communityNode.vue index 8c8669c..57cb1da 100644 --- a/src/views/LinkPrediction/components/communityNode.vue +++ b/src/views/LinkPrediction/components/communityNode.vue @@ -305,6 +305,9 @@ onMounted(() => { const container = document.getElementById("container") if (!container) return chart = echarts.init(container) + if (!chart.getOption()) { + initChart() + } handleClickNode() })