fix(前端):进度环方向 + 按钮颜色 + 删除确认 + 移除 console.log

- StartTask.vue:progress 计算改为 (total-current)/total*100,进度环从
  满到空递减(正确方向)
- ReviewDetail/ReviewRecall/MindMapViewer:type="primary" 全部改为
  type="success",统一绿白主题
- Study.vue:删除任务增加 ElMessageBox.confirm 确认
- request.ts:移除全部 console.log
This commit is contained in:
2026-07-04 17:38:00 +08:00
parent 89d186c82e
commit 9c2c1b7614
5 changed files with 17 additions and 12 deletions
-5
View File
@@ -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<string, any>): Promise<any>;
function get(url: string): Promise<any>;
function get(url: string, params: Record<string, any> = {}) {
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<string, any> = {}, config: any = {}) => {
console.log("开始DELETE请求", basic_url + url, "参数:", params);
return axiosInstance.delete(url, { params, ...config })
.then(validateResponse)
.catch(handleError);