修改接口url -> api.mva-cyber.club:5001
This commit is contained in:
parent
af2ba6b1a3
commit
4a6611d885
@ -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(); // 初始生成一份试卷
|
||||
|
@ -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,
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user