orders.js 445 Bytes
import request from '@/utils/request'
import SERVER from './config'

/*
    更新排序
    record-排序整条数据
    operate-BOTTOM(置底), DOWN(向下), TOP(置顶), UP(向上)
 */
export function updateOrder(url, record, operate, swapId) {
  return request({
    url: SERVER.MANAGEMENTAPI + url + "/" + record.id + "/orders",
    method: "put",
    params: {
      operate: operate,
      swapId: swapId,
    },
  });
}