From 616733eed9177025f23675aa41c296ec66b03566 Mon Sep 17 00:00:00 2001 From: filesite Date: Mon, 7 Oct 2024 14:55:38 +0800 Subject: [PATCH] hide snap btn and show it later --- www/js/beauty.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/www/js/beauty.js b/www/js/beauty.js index 8161156..a754dde 100644 --- a/www/js/beauty.js +++ b/www/js/beauty.js @@ -259,7 +259,7 @@ if ($('#image_site').get(0)) { url: imgUrl }; - $(btn).prop('disabled', true); + $(btn).prop('disabled', true).hide(); $.ajax({ url: '/site/savedirsnap', method: 'POST', @@ -267,11 +267,14 @@ if ($('#image_site').get(0)) { data: params }).done(function(data) { $(btn).prop('disabled', false); + setTimeout(function() { + $(btn).show(); + }, 3000); if (data.code != 1) { console.warn('目录封面图保存失败', data.msg); } }).fail(function(jqXHR, textStatus, errorThrown) { - $(btn).prop('disabled', false); + $(btn).prop('disabled', false).show(); console.error('目录封面图保存失败,错误信息:' + errorThrown); }); }