yapi/client/actions/interfaceAction.js

47 lines
868 B
JavaScript
Raw Normal View History

2017-07-11 19:12:13 +08:00
import {
FETCH_INTERFACE_DATA,
2017-07-13 20:09:04 +08:00
LIST_INTERFACE_CLICK,
2017-07-14 11:27:34 +08:00
PROJECT_MEMBER_INTERFACE
2017-07-13 20:09:04 +08:00
} from '../constants/action-types.js'
2017-07-11 19:12:13 +08:00
2017-07-13 20:09:04 +08:00
export function fetchInterfaceData () {
2017-07-11 19:12:13 +08:00
const data = [{
key: '1',
name: 'John Brown',
age: 32,
address: 'New York No. 1 Lake Park',
date: '2015-11-11 13:00:15',
2017-07-14 11:27:34 +08:00
features: '3'
2017-07-11 19:12:13 +08:00
}, {
key: '2',
name: 'Jim Green',
age: 42,
address: 'London No. 1 Lake Park',
date: '2015-11-11 13:00:15',
2017-07-14 11:27:34 +08:00
features: '3'
2017-07-11 19:12:13 +08:00
}, {
key: '3',
name: 'Joe Black',
age: 32,
address: 'Sidney No. 1 Lake Park',
date: '2015-11-11 13:00:15',
2017-07-14 11:27:34 +08:00
features: '3'
2017-07-11 19:12:13 +08:00
}]
return {
type: FETCH_INTERFACE_DATA,
2017-07-14 11:27:34 +08:00
payload: data
2017-07-11 19:12:13 +08:00
};
2017-07-13 20:09:04 +08:00
}
export function projectMember () {
return {
type: LIST_INTERFACE_CLICK
}
}
export function closeProjectMember () {
return {
2017-07-14 11:27:34 +08:00
type: PROJECT_MEMBER_INTERFACE
2017-07-13 20:09:04 +08:00
}
2017-07-11 19:12:13 +08:00
}