diff --git a/src/components/ReviewDetail.vue b/src/components/ReviewDetail.vue index 8ad3c7d..3769df1 100644 --- a/src/components/ReviewDetail.vue +++ b/src/components/ReviewDetail.vue @@ -295,7 +295,7 @@ watch( />
取消 - 保存 + 保存
@@ -328,7 +328,7 @@ watch( > 上传导图文件 - + 回忆复习 diff --git a/src/components/ReviewRecall.vue b/src/components/ReviewRecall.vue index 3d91db8..be86289 100644 --- a/src/components/ReviewRecall.vue +++ b/src/components/ReviewRecall.vue @@ -328,7 +328,7 @@ onMounted(() => {

🧠 你的回忆

- + 提交对比 @@ -389,7 +389,7 @@ onMounted(() => {
- + 生成 @@ -400,7 +400,7 @@ onMounted(() => {
取消 - + 保存更新
diff --git a/src/components/StartTask.vue b/src/components/StartTask.vue index 39194b1..0738de7 100644 --- a/src/components/StartTask.vue +++ b/src/components/StartTask.vue @@ -81,7 +81,8 @@ const breakAudio = new Audio('/resource/notification.mp3'); const progress = computed(() => { const total = isBreak.value ? 5 * 60 : 25 * 60; - return ((timerMinutes.value * 60 + timerSeconds.value) / total) * 100; + const current = timerMinutes.value * 60 + timerSeconds.value; + return ((total - current) / total) * 100; }); const nowTimestamp = ref(Date.now()); diff --git a/src/components/Study.vue b/src/components/Study.vue index a90e947..c5efcb0 100644 --- a/src/components/Study.vue +++ b/src/components/Study.vue @@ -2,7 +2,7 @@ import { computed, onMounted, ref, watch } from "vue"; import request from "@/utils/request"; import router from "@/router"; -import { ElMessage } from "element-plus"; +import { ElMessage, ElMessageBox } from "element-plus"; import { getReviewTaskStatsByTask } from "@/api/review"; import { getPriorityWeights, @@ -185,6 +185,15 @@ const removeTask = async () => { return; } const target = selectedTask.value; + try { + await ElMessageBox.confirm(`确定删除任务「${target.title}」?关联的学习会话、学习报告、应用场景等数据将被一并删除。`, "确认删除", { + confirmButtonText: "确定删除", + cancelButtonText: "取消", + type: "warning", + }); + } catch { + return; // 用户取消 + } const res = await request.del(`/tasks/${target.taskId}`, {}); if (res.code === 200) { ElMessage.success(`任务 ${target.title} 删除成功`); diff --git a/src/utils/request.ts b/src/utils/request.ts index 37713f3..8dbd50f 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -11,7 +11,6 @@ const axiosInstance = axios.create({ }); const handleError = (error: any) => { - console.log(error); // 401 未授权:token 过期或未登录,直接跳转登录页 if (error?.response?.status === 401) { @@ -49,14 +48,12 @@ function get(url: string, params: Record): Promise; function get(url: string): Promise; function get(url: string, params: Record = {}) { - console.log("开始GET请求", basic_url + url, "参数:", params); return axiosInstance.get(url, { params }) .then(validateResponse) .catch(handleError); } const post = (url: string, data: any = null, config: any = {}) => { - console.log("开始POST请求", url, "参数:", data, "配置:", config); if (config.params) { // 如果传入 config.params,则作为 URL 参数 @@ -72,14 +69,12 @@ const post = (url: string, data: any = null, config: any = {}) => { }; const put = (url: string, data: any, config: any = {}) => { - console.log("开始PUT请求", basic_url + url, "参数:", data); return axiosInstance.put(url, data, config) .then(validateResponse) .catch(handleError); }; const del = (url: string, params: Record = {}, config: any = {}) => { - console.log("开始DELETE请求", basic_url + url, "参数:", params); return axiosInstance.delete(url, { params, ...config }) .then(validateResponse) .catch(handleError);