add unibest app skeleton with checkin and progress pages

- init unibest v4.4.0 base template
- tabbar: 4 tabs (打卡/进度/测算/持仓) with carbon icons
- pages/checkin: daily checklist, streak counter, monthly rate
- pages/progress: asset snapshot, progress bar to 71万 target
- pages/calculator, holdings: placeholder pages (stage 2)
- store/checkin.ts + store/progress.ts with pinia persist
- vite: host 0.0.0.0 for WSL2→Windows browser access

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ila
2026-06-08 10:46:43 +08:00
co-authored by Claude Sonnet 4.6
parent 9e7d20f062
commit a8fa0c0753
141 changed files with 29445 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
// 基础配置文件生成脚本
// 此脚本用于生成 src/manifest.json 和 src/pages.json 基础文件
// 由于这两个配置文件会被添加到 .gitignore 中,因此需要通过此脚本确保项目能正常运行
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
// 获取当前文件的目录路径(替代 CommonJS 中的 __dirname)
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
// 最简可运行配置
const manifest = { }
const pages = {
pages: [
{
path: 'pages/index/index',
type: 'home',
style: {
navigationStyle: 'custom',
navigationBarTitleText: '首页',
},
},
{
path: 'pages/me/me',
type: 'page',
style: {
navigationBarTitleText: '我的',
},
},
],
subPackages: [],
}
// 使用修复后的 __dirname 来解析文件路径
const manifestPath = path.resolve(__dirname, '../src/manifest.json')
const pagesPath = path.resolve(__dirname, '../src/pages.json')
// 确保 src 目录存在
const srcDir = path.resolve(__dirname, '../src')
if (!fs.existsSync(srcDir)) {
fs.mkdirSync(srcDir, { recursive: true })
}
const MIN_SIZE = `{ }`.length // 如果只有一个空对象,必定是不对的,需要重新生成
// 如果 src/manifest.json 不存在,就创建它;或者如果文件大小小于等于 MIN_SIZE,也重新创建
if (!fs.existsSync(manifestPath) || fs.statSync(manifestPath).size <= MIN_SIZE) {
fs.writeFileSync(manifestPath, JSON.stringify(manifest, null, 2))
}
// 如果 src/pages.json 不存在,就创建它;或者如果文件大小小于等于 MIN_SIZE,也重新创建
if (!fs.existsSync(pagesPath) || fs.statSync(pagesPath).size <= MIN_SIZE) {
fs.writeFileSync(pagesPath, JSON.stringify(pages, null, 2))
}