From 03102f17391503e30d09a8a03873c4e797b18ceb Mon Sep 17 00:00:00 2001 From: ShenQiLun <97694732@qq.com> Date: Wed, 1 Jul 2026 14:23:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=87=BA=E7=89=88=E7=A4=BE=E8=A2=AB?= =?UTF-8?q?=E5=B8=82=E5=9C=BA=E6=90=9C=E7=B4=A2=E5=8E=86=E5=8F=B2=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BA=8C=E6=AC=A1=E8=A6=86=E7=9B=96=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/upload/upload.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pages/upload/upload.vue b/pages/upload/upload.vue index ed0cc41..b3c49bd 100644 --- a/pages/upload/upload.vue +++ b/pages/upload/upload.vue @@ -1927,16 +1927,16 @@ export default { this.noIsbnCategoryIndex = 0 this.noIsbnSelectedCategoryValue = '' } - // 更新出版社 + // 更新出版社(最多20条) if (pressList.length > 0) { - this.noIsbnPublisherOptions = pressList.map(function(item) { return item.showName }) + this.noIsbnPublisherOptions = pressList.map(function(item) { return item.showName }).slice(0, 20) this.noIsbnPublisherDropdownVisible = true } else { this.noIsbnPublisherOptions = [] } - // 更新作者 + // 更新作者(最多20条) if (authorList.length > 0) { - this.noIsbnAuthorOptions = authorList.map(function(item) { return item.showName }) + this.noIsbnAuthorOptions = authorList.map(function(item) { return item.showName }).slice(0, 20) this.noIsbnAuthorDropdownVisible = true } else { this.noIsbnAuthorOptions = [] @@ -3230,9 +3230,13 @@ export default { new: onSaleFacet ? onSaleFacet.newCount : 0, sold: soldFacet ? (soldFacet.oldCount + soldFacet.newCount) : 0 } - // 填充下拉选项 - that.noIsbnAuthorOptions = Array.from(authorSet).filter(Boolean).slice(0, 10) - that.noIsbnPublisherOptions = Array.from(publisherSet).filter(Boolean).slice(0, 10) + // 填充下拉选项(仅当孔网API未拉取时使用历史数据兜底) + if (that.noIsbnAuthorOptions.length === 0) { + that.noIsbnAuthorOptions = Array.from(authorSet).filter(Boolean).slice(0, 10) + } + if (that.noIsbnPublisherOptions.length === 0) { + that.noIsbnPublisherOptions = Array.from(publisherSet).filter(Boolean).slice(0, 10) + } // 自动计算并填入售价 that.$nextTick(() => { if (that.calculatedNoIsbnPrice > 0) {