# win-app **Repository Path**: chenyp/win-app ## Basic Information - **Project Name**: win-app - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-31 - **Last Updated**: 2025-09-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # win-app ### Install ```bash $ npm install ``` ### Development ```bash $ npm run dev ``` ### Build ```bash # For windows $ npm run build:win # For macOS $ npm run build:mac # For Linux $ npm run build:linux ``` ### 进程通信 ``` // 渲染进程发送数据到主进程 ipcRenderer.send('update-counter', store.count) // 主进程接收数据 ipcMain.on('update-counter', (event, count) => { console.log('收到计数器值:', count) // 在这里处理数据 }) ``` ``` // 主进程发送数据到渲染进程 mainWindow.webContents.send('counter-updated', newCount) // 渲染进程接收数据 ipcRenderer.on('counter-updated', (event, count) => { const store = useCounterStore() store.count = count }) ``` ### 使用多线程技术 ``` const { Worker } = require('worker_threads') const path = require('path') const worker = new Worker(path.join(__dirname, 'batchTaskWorker.js'), {workerData: {userId: userId,urls: userUrls,taskId: taskId, mb: mb,dbPath: dbPath}}) ``` ### 表说明 #### tasks | 字段名 | 数据类型 | 说明 | | ------ | -------- | ----------------------------------------------------------- | | result | int | 0:初始化导入
1:任务暂停
2:正在运行任务
3:任务完成 | #### user_task | 字段名 | 数据类型 | 说明 | | ------ | -------- | ---------------------------------- | | zt | int | 0:初始化导入状态
1:已运行
2:任务暂停
| | result | int | 提交淘宝接口返回的接口,默认是空字符串 |