diff --git a/src/main/resources/static/js/app.js b/src/main/resources/static/js/app.js index 5515212..5fe22f3 100644 --- a/src/main/resources/static/js/app.js +++ b/src/main/resources/static/js/app.js @@ -150,13 +150,13 @@ const App = { const searchTerm = query.toLowerCase().trim() if (this.currentPage === 'products') { - this.filteredProducts = this.products.filter((product) => - product.name.toLowerCase().includes(searchTerm) || + this.filteredProducts = this.products.filter((product) => + product.name.toLowerCase().includes(searchTerm) || (product.description && product.description.toLowerCase().includes(searchTerm)) ) } else if (this.currentPage === 'plugins') { - this.filteredPlugins = this.plugins.filter((plugin) => - plugin.name.toLowerCase().includes(searchTerm) || + this.filteredPlugins = this.plugins.filter((plugin) => + plugin.name.toLowerCase().includes(searchTerm) || (plugin.description && plugin.description.toLowerCase().includes(searchTerm)) ) } @@ -178,15 +178,7 @@ const App = { this.isGenerating = true try { - const isPlugin = this.selectedItem.hasOwnProperty('id') - let result - - if (isPlugin) { - result = await ApiService.generatePluginLicense(this.selectedItem.id, this.config.licenseName, this.config.assigneeName, this.licenseConfig.expiryDate) - } else { - result = await ApiService.generateLicense(this.selectedItem.productCode, this.config.licenseName, this.config.assigneeName, this.licenseConfig.expiryDate) - } - + const result = await ApiService.generateLicense(this.selectedItem.productCode, this.config.licenseName, this.config.assigneeName, this.licenseConfig.expiryDate) this.generatedLicense = result this.showLicenseModal = false this.showResultModal = true @@ -215,7 +207,7 @@ const App = { getProductIcon(product) { if (product.iconClass && product.iconClass.startsWith('icon-')) { const iconName = product.iconClass.replace('icon-', ''); - + // 图标映射表 const iconMap = { 'ii': 'https://resources.jetbrains.com/storage/logos/web/intellij-idea/intellij-idea.svg', @@ -236,7 +228,7 @@ const App = { 'qa': 'https://resources.jetbrains.com/storage/logos/web/aqua/aqua.svg', 'al': 'https://resources.jetbrains.com/storage/logos/web/toolbox/toolbox.svg' }; - + return iconMap[iconName] || '/images/plugin.svg'; } return '/images/plugin.svg'; diff --git a/src/main/resources/static/js/utils.js b/src/main/resources/static/js/utils.js index f78e60b..bcd7d81 100644 --- a/src/main/resources/static/js/utils.js +++ b/src/main/resources/static/js/utils.js @@ -253,17 +253,6 @@ const ApiService = { return await this.getText(`/license-code/generate?${params}`) }, - // 生成插件激活码 - async generatePluginLicense(pluginId, licenseeName, assigneeName, expiryDate) { - const params = new URLSearchParams({ - pluginId, - licenseeName, - assigneeName, - expiryDate - }) - return await this.getText(`/license-code/generate?${params}`) - }, - // 下载代理工具 downloadAgent() { window.open('/ja-netfilter', '_blank')