52 lines
1.1 KiB
JavaScript
52 lines
1.1 KiB
JavaScript
/**
|
|
* 代理商管理
|
|
*/
|
|
|
|
/**
|
|
* [index 代理商列表]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function index(data) {
|
|
return service.get('api/virtual/agents/index', {
|
|
params: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* [show 代理商详情]
|
|
* @param {[type]} id [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function show(id) {
|
|
return service.get(`api/virtual/agents/show/${id}`);
|
|
}
|
|
|
|
/**
|
|
* [create 创建代理商]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function create(data) {
|
|
return serviceForm.post('api/virtual/agents/create', data);
|
|
}
|
|
|
|
/**
|
|
* [update 修改代理商]
|
|
* @param {[type]} data [description]
|
|
* @param {[type]} id [角色id]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function update(data, id) {
|
|
return serviceForm.post(`api/virtual/agents/update/${id}`, data);
|
|
}
|
|
|
|
/**
|
|
* [destroy 删除代理商]
|
|
* @param {[type]} data [description]
|
|
* @return {[type]} [description]
|
|
*/
|
|
export function destroy(data) {
|
|
return service.post('api/virtual/agents/destroy', data);
|
|
}
|