- 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`.
18 lines
590 B
TypeScript
18 lines
590 B
TypeScript
export type PriceType = 'A4' | 'A3' | '照片';
|
|
|
|
export interface PriceItem {
|
|
id: number;
|
|
name: string;
|
|
type: PriceType;
|
|
price: number;
|
|
unit: string;
|
|
}
|
|
|
|
export const DefaultPriceList: PriceItem[] = [
|
|
{ id: 1, name: 'A4黑白打印', type: 'A4', price: 0.10, unit: '页' },
|
|
{ id: 2, name: 'A4彩色打印', type: 'A4', price: 0.30, unit: '页' },
|
|
{ id: 3, name: 'A3黑白打印', type: 'A3', price: 0.20, unit: '页' },
|
|
{ id: 4, name: 'A3彩色打印', type: 'A3', price: 0.60, unit: '页' },
|
|
{ id: 5, name: '照片打印', type: '照片', price: 2.00, unit: '张' },
|
|
];
|