From 3b9d87ee3e6a50a052ead3f84daefca88d0813ac Mon Sep 17 00:00:00 2001 From: ChenQiuYu Date: Fri, 25 Apr 2025 16:12:41 +0800 Subject: [PATCH] dev --- src/views/social/directory.vue | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/views/social/directory.vue b/src/views/social/directory.vue index 04fbaea..7036214 100644 --- a/src/views/social/directory.vue +++ b/src/views/social/directory.vue @@ -33,7 +33,8 @@ {{ tip_message }}
- +
@@ -129,12 +130,10 @@ let percentage = ref(0) const tip_message = ref("正在更新目录,请稍后...") const start_type = () => { loading.value = true - percentage.value = 0; post("social/directory_version/get_current", {type: current_tab.value}, {catch_error: true}).then((res: any) => { tip_message.value = "正在更新目录,上一个版本:" + res.currentVersionName + ",请不要强制关闭程序,否则数据不完整"; download(res.currentVersionName, current_tab.value); }).catch((err: any) => { - percentage.value = 100 loading.value = false; ElNotification({ title: '提示', @@ -145,11 +144,6 @@ const start_type = () => { } let download = (ver: any, type: any) => { post("social/directory/download", {ver: ver, type: type}).then((res: any) => { - percentage.value = setInterval(() => { - if (percentage.value < 100) { - percentage.value += 1; - } - }, 100); if (res == null) { loading.value = false; ElNotification({ @@ -161,7 +155,6 @@ let download = (ver: any, type: any) => { } start_type() }).catch((err: any) => { - percentage.value = 100 loading.value = false; ElNotification({ title: '提示',