// 初始化状态应用注解
const initState = {
  selectAll: {} as any,
  fileData: {} as any,
};

type LoginActionType =
  | { type: "login/getSelectAll"; payload: any }
  | { type: "login/setFileData"; payload: any };
// 频道 reducer
export default function loginReducer(
  state = initState,
  action: LoginActionType
) {
  switch (action.type) {
    // 所有的下拉列表数据
    case "login/getSelectAll":
      return { ...state, selectAll: action.payload };
    // 新增编辑藏品的附件数据
    case "login/setFileData":
      return { ...state, fileData: action.payload };
    default:
      return state;
  }
}
