diff --git a/src/pages/demoPages/podExercise/Quiz.vue b/src/pages/demoPages/podExercise/Quiz.vue index 9e97354..e7e24fe 100644 --- a/src/pages/demoPages/podExercise/Quiz.vue +++ b/src/pages/demoPages/podExercise/Quiz.vue @@ -81,6 +81,7 @@ import GeneralRenderer from "../../../components/GeneralRenderer.vue"; import {useRoute} from 'vue-router' import swal from "../../../utils/sweetalert.js"; import router from "../../../router/index.js"; +import {getDomain} from "../../../utils/getDomain.js"; const route = useRoute() @@ -122,7 +123,7 @@ const initial = async () => { const categorise = route.query.cat || 'apphy1' const file = route.query.id || 'phy250227'; try { - const response = await axios.get(`https://mva-cyber.club/data/demos/pod/${categorise}/${file}.json`); + const response = await axios.get(`https://${getDomain()}/data/demos/pod/${categorise}/${file}.json`); const jsonData = response.data; Object.assign(data, jsonData); generateNewExam(); // 初始生成一份试卷 diff --git a/src/utils/axios.js b/src/utils/axios.js index 1e19f63..056d1d6 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -3,7 +3,7 @@ import store from '../store'; import {getDomain} from "./getDomain.js"; const api = axios.create({ - baseURL: `https://${getDomain()}:5001`, + baseURL: `https://api.mva-cyber.club:5001`, timeout: 6000, });