抓包确认 /aj/game/exchangegoods 必须 POST + form body,并带 x-xsrf-token/Origin/_failtoast;原实现用 GET,服务端返回 400404 迷路页,接口稳定 502。 - 兑换改为 POST + form,query 与 body 同带 F/goods_id/_t - 请求失败分类:连接超时=未提交、其他网络错误/5xx/非 JSON=结果未知、 4xx=未提交、401 类错误码=CK 失效 - 100002 是参数校验错误(实测 GoodsID required),移出鉴权失效集合, 真实未登录是 400002 - 新增 /aj/mall/detail 预检(价格/余额/库存/兑换按钮),fail-close - 复核只认余额变化,取消“库存变化即成功”的假阳性;缺字段不再写 0 - 复核请求用 8s 短超时,避免打穿前端 120s - 同一账号兑换加进程内非阻塞锁,并发请求返回 409;余额回写失败降级为 结果未知 502 - 兑换记录状态列映射 2=已发放,其余展示原始状态码 - 版本 0.4.29 → 0.4.31
React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Remove tseslint.configs.recommended and replace with this
tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
tseslint.configs.stylisticTypeChecked,
// Other configs...
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default defineConfig([
globalIgnores(['dist']),
{
files: ['**/*.{ts,tsx}'],
extends: [
// Other configs...
// Enable lint rules for React
reactX.configs['recommended-typescript'],
// Enable lint rules for React DOM
reactDom.configs.recommended,
],
languageOptions: {
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
// other options...
},
},
])