From f1fe90d94eedf23850abd5cfd40d54d4a5d30355 Mon Sep 17 00:00:00 2001 From: Schwi <39186981+cyb233@users.noreply.github.com> Date: Mon, 17 Oct 2022 01:01:20 +0800 Subject: [PATCH] Update main.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 未对this.idList.length == 0进行判断,会导致返回500错误 不太会写,不知道有没有错误 --- static_animationlist/js/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static_animationlist/js/main.js b/static_animationlist/js/main.js index ac7443f..cd93ed9 100644 --- a/static_animationlist/js/main.js +++ b/static_animationlist/js/main.js @@ -42,6 +42,10 @@ const options = { this.added_number = this.idList.length; }, confirmClick() { + if (this.idList.length == 0) { + ElMessage.error('请至少选择一部番剧') + return + } if (this.isMobile() && this.idList.length > 15) { this.overNum = true } else { @@ -89,4 +93,4 @@ const options = { const { loadModule } = window['vue3-sfc-loader']; const V = Vue.createApp(options); V.use(ElementPlus); -V.mount("#app"); \ No newline at end of file +V.mount("#app");