|
|
1 week ago | |
|---|---|---|
| .hbuilderx | 2 months ago | |
| api | 2 months ago | |
| components | 2 months ago | |
| composables | 5 months ago | |
| config | 5 months ago | |
| harmony-configs | 4 months ago | |
| pages | 1 week ago | |
| static | 2 months ago | |
| types | 4 months ago | |
| uniCloud-aliyun | 4 months ago | |
| uni_modules | 4 months ago | |
| utils | 2 months ago | |
| .gitignore | 5 months ago | |
| .prettierrc | 5 months ago | |
| App.uvue | 2 months ago | |
| README.md | 5 months ago | |
| index.html | 5 months ago | |
| main.uts | 5 months ago | |
| manifest.json | 2 months ago | |
| package.json | 5 months ago | |
| pages.json | 2 months ago | |
| platformConfig.json | 5 months ago | |
| prettier-plugin-uts.js | 5 months ago | |
| uni.scss | 5 months ago |
基于 uni-app x 的跨平台移动应用基础框架,支持 Android 和 HarmonyOS 双平台原生渲染。
uniappx-init/
├── .cursor/rules/ # 开发规范文档
├── api/ # API 接口(按模块分类)
│ ├── auth/ # 认证模块
│ ├── workbench/ # 工作台模块
│ ├── user/ # 用户模块
│ └── upload/ # 上传模块
├── components/ # 公共组件
│ ├── custom-tabbar/ # 自定义 TabBar
│ ├── upload-file/ # 文件上传
│ ├── upload-image/ # 图片上传
│ ├── upload-video/ # 视频上传
│ └── map-view/ # 地图组件
├── composables/ # 组合式函数
│ ├── useAuth.uts # 认证管理
│ └── useEventBus.uts # 事件总线
├── pages/ # 页面
│ ├── index/ # 首页
│ ├── login/ # 登录页
│ ├── workbench/ # 工作台
│ └── profile/ # 个人中心
├── types/ # 类型定义
├── utils/ # 工具函数
├── static/ # 静态资源
├── docs/ # 项目文档
├── App.uvue # 应用配置
├── pages.json # 页面路由配置
├── manifest.json # 应用配置
└── uni.scss # 全局样式变量
if (a != null) 而不是 if (a)| null 或 ? 定义type 而不是 interfacelet/const,不使用 var== 和 !=,避免 === 和 !==<text> 或 <button> 组件上// Android 平台
// #ifdef APP-ANDROID
// Android 特有代码
// #endif
// 鸿蒙平台
// #ifdef APP-HARMONY
// 鸿蒙特有代码
// #endif
使用 HBuilderX 打开项目
修改 utils/request.uts 中的 BASE_URL:
const BASE_URL = "http://your-api-server.com"
/sys/loginByAcount/sys/logout<upload-file
v-model="files"
:max-count="5"
@change="handleFilesChange"
/>
<upload-image
v-model="images"
:max-count="9"
@change="handleImagesChange"
/>
<upload-video
v-model="videos"
:max-count="3"
@change="handleVideosChange"
/>
<map-view
ref="mapViewRef"
:latitude="latitude"
:longitude="longitude"
:markers="markers"
@markerClick="handleMarkerClick"
/>
feat: 新功能fix: 修复 Bugdocs: 文档更新style: 代码格式调整refactor: 重构perf: 性能优化test: 测试相关chore: 构建/工具相关# 使用 write 工具创建临时文件
# 执行 git commit -F commit-msg.txt
# 删除临时文件
api/ 根目录创建接口文件<scroll-view> 或 <list-view><text> 或 <button> 中设置文字样式MIT