feat: first commit
This commit is contained in:
10
src/store/actions/app.ts
Normal file
10
src/store/actions/app.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { RoleType, PageType } from '@/constants/app';
|
||||
import { LocationInfo } from '@/types/location';
|
||||
|
||||
import { CHANGE_ROLE_TYPE, CHANGE_HOME_PAGE, SET_LOCATION_INFO } from '../constants';
|
||||
|
||||
export const changeRoleType = (value: RoleType) => ({ type: CHANGE_ROLE_TYPE, value });
|
||||
|
||||
export const changeHomePage = (value: PageType) => ({ type: CHANGE_HOME_PAGE, value });
|
||||
|
||||
export const setLocationInfo = (value: LocationInfo) => ({ type: SET_LOCATION_INFO, value });
|
||||
3
src/store/actions/index.ts
Normal file
3
src/store/actions/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from './app';
|
||||
export * from './user';
|
||||
export * from './message';
|
||||
5
src/store/actions/message.ts
Normal file
5
src/store/actions/message.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { UserMessage } from '@/types/message';
|
||||
|
||||
import { SET_USER_MESSAGE } from '../constants';
|
||||
|
||||
export const setMessageInfo = (value: Partial<UserMessage>) => ({ type: SET_USER_MESSAGE, value });
|
||||
7
src/store/actions/user.ts
Normal file
7
src/store/actions/user.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { UserInfo } from '@/types/user';
|
||||
|
||||
import { SET_USER_INFO, SET_BIND_PHONE } from '../constants';
|
||||
|
||||
export const setUserInfo = (value: Partial<UserInfo>) => ({ type: SET_USER_INFO, value });
|
||||
|
||||
export const setBindPhone = (value: UserInfo['isBindPhone']) => ({ type: SET_BIND_PHONE, value });
|
||||
Reference in New Issue
Block a user