outaozhen %!s(int64=5) %!d(string=hai) anos
pai
achega
6fec2b6f35
Modificáronse 1 ficheiros con 0 adicións e 30 borrados
  1. 0 30
      src/models/employee.js

+ 0 - 30
src/models/employee.js

@@ -1,30 +0,0 @@
-import consts from '@/consts'
-import { queryStaff } from '@/services/staff'
-
-export default {
-  namespace: 'employee',
-  state: {
-    data: []
-  },
-  effects: {
-    *fetch({ payload }, { call, put }) {
-      const response = yield call(queryStaff, payload)
-      if (response && response.code === consts.RET_CODE.SUCCESS) {
-        yield put({
-          type: 'show',
-          payload: response.data
-        })
-      }
-      // console.log(response)
-    }
-  },
-  reducers: {
-    // action:是由reducers及effects的触发器,一般是第一个对象,如:{type:'add',payload:todo}
-    show(state, action) {
-      return {
-        ...state,
-        data: action.payload.list
-      }
-    }
-  }
-}