orders.js 618 Bytes
/*
 * @Description  :更新排序api文件
 * @Autor        : miaofang
 * @LastEditTime : 2023-05-17 10:41:30
 */
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))

/*
    更新排序
    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,
    },
  });
}