This commit is contained in:
2025-09-30 11:07:47 +08:00
parent e643ab0713
commit e650a7c7f3
51 changed files with 152 additions and 24094 deletions

View File

@@ -144,7 +144,6 @@ function migrateDataFromPublic(): void {
}
function startSpringBoot() {
// 首先迁移数据(如果需要)
migrateDataFromPublic();
const jarPath = getJarFilePath();
@@ -214,7 +213,7 @@ function startSpringBoot() {
}
}
startSpringBoot();
//startSpringBoot();
function stopSpringBoot() {
if (!springProcess) return;
@@ -267,7 +266,6 @@ function createWindow() {
setTimeout(() => checkPendingUpdate(), 500);
});
// 不立即加载页面,等 SpringBoot 启动完成后再加载
}
app.whenReady().then(() => {
@@ -300,6 +298,10 @@ app.whenReady().then(() => {
splashWindow.loadFile(splashPath);
}
//11111
setTimeout(() => {
openAppIfNotOpened();
}, 2000);
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {

View File

@@ -8,8 +8,8 @@ export const amazonApi = {
return http.upload<{ code: number, data: { asinList: string[], total: number }, msg: string | null }>('/api/amazon/import/asin', formData);
},
getProductsBatch(asinList: string[], batchId: string) {
return http.post<{ code: number, data: { products: any[] }, msg: string | null }>('/api/amazon/products/batch', { asinList, batchId });
getProductsBatch(asinList: string[], batchId: string, region: string) {
return http.post<{ code: number, data: { products: any[] }, msg: string | null }>('/api/amazon/products/batch', { asinList, batchId, region });
},
getLatestProducts() {
return http.get<{ code: number, data: { products: any[] }, msg: string | null }>('/api/amazon/products/latest');

View File

@@ -32,7 +32,6 @@ const region = ref('JP')
const regionOptions = [
{ label: '日本 (Japan)', value: 'JP', flag: '🇯🇵' },
{ label: '美国 (USA)', value: 'US', flag: '🇺🇸' },
{ label: '中国 (China)', value: 'CN', flag: '🇨🇳' },
]
const pendingAsins = ref<string[]>([])
@@ -106,7 +105,7 @@ async function batchGetProductInfo(asinList: string[]) {
currentAsin.value = `正在处理第${i + 1}/${totalBatches}批 (${batchAsins.join(', ')})`
try {
const result = await amazonApi.getProductsBatch(batchAsins, batchId)
const result = await amazonApi.getProductsBatch(batchAsins, batchId, region.value)
if (result?.data?.products?.length > 0) {
localProductData.value.push(...result.data.products)