mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
pr01 三改:原代码 getTokenExpireAt 读 store(state.token 缓存),与 persistTokenExpireAt 写 localStorage 不同源,导致 _localStoredAt 缺失 → NaN → shouldRefresh 永 false → silent refresh 永不触发。修复:getTokenExpireAt 改读 localStorage,persistTokenExpireAt 同步刷 store,保证两端一致。e2e 已验证:注入 expire=1800 token → reload → role-config mount 触发 sendRequest → Network 抓到 POST /user/refresh 200 → localStorage token 被替换为新 12h token(含 _localStoredAt)。 |
||
|---|---|---|
| .. | ||
| 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