chore(mobile-h5): add existing H5 app sources to the monorepo

Track the weighbridge mobile-h5 codebase (excluding node_modules, dist, and local .env) so subsequent adaptation tasks can evolve it in-repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-08-03 22:28:53 +08:00
1 parent f8f9c0ceff
commit a4b13fa2bc
91 files changed
+15791

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
// API 响应基础类型
export interface BaseResult<T = any> {
code: number
message: string
data: T
}
// 分页结果类型
export interface PaginationResult<T = any> {
list: T[]
total: number
page: number
size: number
}
+24
View File
@@ -0,0 +1,24 @@
// 菜单项类型
export interface MenuItem {
id?: number | string // 添加 id 属性
path: string
name: string
component?: string | (() => Promise<any>)
meta?: {
title?: string
icon?: string
isHide?: boolean
isKeepAlive?: boolean
isAffix?: boolean
isLink?: string // 外部链接
link?: string // 兼容 link 属性
isIframe?: boolean
roles?: string[]
auth?: string[]
}
children?: MenuItem[]
}
// 菜单列表类型
export type MenuListType = MenuItem
+61
View File
@@ -0,0 +1,61 @@
import { MenuThemeEnum, SystemThemeEnum } from '@/enums/appEnum'
// 用户信息
export interface UserInfo {
id: number
name?: string // 改为可选,与 API 返回类型一致
username: string
avatar?: string // 改为可选,与 API 返回类型一致
email?: string // 改为可选,与 API 返回类型一致
}
// 系统主题样式(light | dark)
export interface SystemThemeType {
className: string // className
}
// 定义包含多个主题的类型
export type SystemThemeTypes = {
[key in Exclude<SystemThemeEnum, SystemThemeEnum.AUTO>]: SystemThemeType
}
// 菜单主题样式
export interface MenuThemeType {
theme: MenuThemeEnum // 主题名称
background: string // 背景色
systemNameColor: string // 系统标题颜色
textColor: string // 文字颜色
textActiveColor: string // 文字选中颜色
iconColor: string // 图标颜色
iconActiveColor: string // 图标选中颜色
tabBarBackground: string // 顶栏背景色
systemBackground: string // 系统背景色
leftLineColor: string // 左侧线条颜色
rightLineColor: string // 右侧线条颜色
img?: string // 图片
}
// 设置中心
export interface Setting {
theme: string // 主题
uniqueOpened: boolean // 是否开启手风琴模式
menuButton: boolean // 是否显示菜单展开按钮
showRefreshButton: boolean // 是否显示页面刷新按钮
showCrumbs: boolean // 是否显示全局面包屑
autoClose: boolean // 设置后是否自动关闭窗口
showWorkTab: boolean // 是否显示多标签
showLanguage: boolean // 是否显示多语言选择
showNprogress: boolean // 是否显示顶部进度条
themeModel: string // 主题模式
}
// 多标签
export interface WorkTabType {
title: string
path: string
name: string
keepAlive: boolean
params?: object
query?: object
}