mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
方案 A:后端 POST /xiaozhi/user/refresh(anon),旧 token 校验通过后强制覆盖为新 token 字符串,旧 token 在 DB 查不到即失效。前端 httpRequest 在 sendRequest 入口检查 token 剩余有效期,剩 1h 内触发 silent refresh(独立 fly 实例 + 单飞锁),成功后 setToken 替换并自动继续发送当前请求,失败走 clearAuth 跳登录。 |
||
|---|---|---|
| .. | ||
| public | ||
| scripts | ||
| src | ||
| tests | ||
| .env | ||
| .env.development | ||
| .env.production | ||
| .npmrc | ||
| babel.config.js | ||
| jsconfig.json | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| vitest.config.js | ||
| vue.config.js | ||
本文档是开发类文档,如需部署小智服务端,点击这里查看部署教程
xiaozhi
Project setup
开发使用代码编辑器,导入项目时,选择manager-web文件夹作为项目目录
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build