feat: implement Redux store with slices for user, order, file, and printer management

- Added Redux store configuration in `src/store/index.ts`.
- Created slices for user, order, file, and printer with respective reducers and actions.
- Implemented custom hooks `useAppDispatch` and `useAppSelector` for typed Redux usage.
- Defined types for file, order, printer, and user in `src/types`.
- Added utility functions for formatting prices, file sizes, and dates in `src/utils`.
- Created common styles and animations in `src/styles` for consistent UI design.
- Integrated API request handling with token management in `src/utils/request.ts`.
- Implemented local storage management for user token and info in `src/utils/storage.ts`.
This commit is contained in:
Mikuisnotavailable
2026-03-30 23:19:43 +08:00
parent 96cfc609b2
commit a424d06731
69 changed files with 5555 additions and 106 deletions

View File

@@ -36,47 +36,50 @@
"author": "",
"dependencies": {
"@babel/runtime": "^7.7.7",
"@reduxjs/toolkit": "^2.11.2",
"@taro-hooks/plugin-react": "2",
"@taro-hooks/shared": "2",
"@tarojs/components": "4.1.11",
"@tarojs/helper": "4.1.11",
"@tarojs/plugin-platform-weapp": "4.1.11",
"@tarojs/plugin-framework-react": "4.1.11",
"@tarojs/plugin-platform-alipay": "4.1.11",
"@tarojs/plugin-platform-tt": "4.1.11",
"@tarojs/plugin-platform-swan": "4.1.11",
"@tarojs/plugin-platform-h5": "4.1.11",
"@tarojs/plugin-platform-jd": "4.1.11",
"@tarojs/plugin-platform-qq": "4.1.11",
"@tarojs/plugin-platform-h5": "4.1.11",
"@tarojs/plugin-platform-swan": "4.1.11",
"@tarojs/plugin-platform-tt": "4.1.11",
"@tarojs/plugin-platform-weapp": "4.1.11",
"@tarojs/react": "4.1.11",
"@tarojs/runtime": "4.1.11",
"@tarojs/shared": "4.1.11",
"@tarojs/taro": "4.1.11",
"@taro-hooks/shared": "2",
"@tarojs/plugin-framework-react": "4.1.11",
"@tarojs/react": "4.1.11",
"@taro-hooks/plugin-react": "2",
"react-dom": "^18.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-redux": "^9.2.0",
"redux": "^5.0.1",
"taro-hooks": "2"
},
"devDependencies": {
"babel-plugin-import": "^1.13.3",
"@babel/core": "^7.8.0",
"@babel/plugin-proposal-class-properties": "7.14.5",
"@babel/preset-react": "^7.24.1",
"@tarojs/cli": "4.1.11",
"@tarojs/vite-runner": "4.1.11",
"babel-preset-taro": "4.1.11",
"eslint-config-taro": "4.1.11",
"eslint": "^8.12.0",
"stylelint": "^14.4.0",
"terser": "^5.16.8",
"vite": "^4.2.0",
"@babel/preset-react": "^7.24.1",
"@types/react": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"@vitejs/plugin-react": "^4.1.0",
"eslint-plugin-react": "^7.8.2",
"babel-plugin-import": "^1.13.3",
"babel-preset-taro": "4.1.11",
"eslint": "^8.12.0",
"eslint-config-taro": "4.1.11",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^4.2.0",
"react-refresh": "^0.11.0",
"@typescript-eslint/parser": "^6.2.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"stylelint": "^14.4.0",
"terser": "^5.16.8",
"typescript": "^5.1.0",
"@babel/core": "^7.8.0"
"vite": "^4.2.0"
}
}