orders.js
597 Bytes
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
* @description: 更新排序
* @param {*} url
* @param {*} record 排序整条数据
* @param {*} operate BOTTOM(置底), DOWN(向下), TOP(置顶), UP(向上)
* @param {*} swapId
* @author: renchao
*/
export function updateOrder (url, record, operate, swapId) {
return request({
url: SERVER.MANAGEMENTAPI + url + "/" + record.id + "/orders",
method: "put",
params: {
operate: operate,
swapId: swapId,
},
});
}