Commit 4bc039f6 authored by 15011343103's avatar 15011343103

feat: 去掉 form层的默认数据

parent e6498f43
...@@ -98,11 +98,9 @@ new Vue({ ...@@ -98,11 +98,9 @@ new Vue({
}, t_name); }, t_name);
}); });
if (!data) { if (!data) {
const response = await fetch('./defaultData.json'); this.loading = false;
if (!response.ok) { // TODO 上传文件以及上传后的AI处理状态展示,直到AI处理完成才会有 data
throw new Error('Network response was not ok'); return;
}
data = await response.json();
} }
this.audioPoints = data.audio_points; this.audioPoints = data.audio_points;
......
...@@ -5,7 +5,7 @@ $(function() { ...@@ -5,7 +5,7 @@ $(function() {
window.courseware.getData(function(data) { window.courseware.getData(function(data) {
if (!data) { if (!data) {
// 修正默认数据路径为根目录 // 修正默认数据路径为根目录
$.getJSON('/form/defaultData.json', function(defaultData) { $.getJSON('./defaultData.json', function(defaultData) {
console.log('加载默认数据:', defaultData); console.log('加载默认数据:', defaultData);
initializeApp(defaultData); initializeApp(defaultData);
}).fail(function() { }).fail(function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment