新增 离线web应用发布流程;

移除了便签详情页;
优化了若干逻辑;
新增 移动端、IOS兼容处理;
This commit is contained in:
2025-10-12 06:05:27 +08:00
parent 1ae28a8040
commit d1365aaaa5
11 changed files with 312 additions and 198 deletions

33
upload-pwa.js Normal file
View File

@@ -0,0 +1,33 @@
import path from 'path';
import { Client } from 'basic-ftp';
import config from './ftp-config.json' with { type: 'json' };
async function uploadPWA() {
const client = new Client();
client.ftp.verbose = true;
try {
await client.access({
host: config.host,
user: config.user,
password: config.password,
port: config.port,
});
// 上传PWA构建目录中的所有文件
const localPath = path.resolve('./dist/offline');
const remotePath = config.remotePath;
await client.ensureDir(remotePath);
await client.clearWorkingDir();
await client.uploadFromDir(localPath);
console.log('PWA版本已成功上传到FTP服务器');
} catch (error) {
console.error('FTP上传失败:', error);
} finally {
client.close();
}
}
uploadPWA();