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