# note_frontend **Repository Path**: Mr-Format/note_frontend ## Basic Information - **Project Name**: note_frontend - **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-04-22 - **Last Updated**: 2025-05-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 开发环境 依赖版本更新日期:2025-04-08 - node 18+ - vite - vue3 - ts - element-plus - axios - vue-router - pinia # 开发前准备 - 替换 ac.min.js [public/static/](public/static/) - 修改 Cloud 配置 [public/static/ac_conf.js](public/static/ac_conf.js) # 快速启动 [bin/](bin/) 文件夹下是命令脚本文件,各文件作用如下: - 启动:[bin/run-web.bat](bin/run-web.bat) - 打包:[bin/build.bat](bin/build.bat) - 预览:[bin/run-preview.bat](bin/run-preview.bat) # 常用命令 - 启动: `npm run dev` - 打包: `npm run build` - 预览: `npm run preview` - 升级依赖到最新版本: - - `npm install ncu -g` - - `ncu -u` - - `npm install` # 环境变量 1. 为了方便部署,当前使用引入静态 js 文件的方式设置环境变量。开发前请先修改相应属性。 - 不要把敏感信息,如用户名密码放在配置文件中。 - 配置文件路径: [public/static/ac_conf.js](public/static/ac_conf.js) 2. 如果静态 js 文件不被允许,使用 .env.{环境名称} 来设置环境变量 - 开发环境: [.env.development](.env.development) - 生产环境: [.env.production](.env.development) # 类型定义 - 环境变量:[src/env.d.ts](src/env.d.ts) - 全局变量:[src/types/window.d.ts](src/types/window.d.ts) - DigitalTwinAPI:[src/types/airCity.d.ts](src/types/window.d.ts) - Cloud 管理接口: [src/types/cloud.d.ts](src/types/window.d.ts) - 其他接口:[src/types/request.d.ts](src/types/window.d.ts) # fdapi 调用时机 - 前端与云渲染服务器之间的通信是异步的,需要确保连接 cloud 并初始化视频流成功之后再调用 fdapi。 - 将 fdapi 相关的逻辑都放在某个路由下,等待视频流初始化成功之后再挂载该路由,例如: ```html ``` ```ts const isReady = ref(false); onMounted(() => { initAirCity('player').then(() => { isReady.value = true; }); }); ``` # UI 地址