import request from "@/service/request";
import { devProxy } from "@/service/network";
import { KEY_NO_LOAD_TOKEN, KEY_NO_LOADING } from "@/service/request";


/////////////////////  业务逻辑: thunk包装调用  /////////////////////


// 月度汇总
export function queryReport (data = {}) {
  return request.doPost(devProxy("/fengkaili/queryAttendanceList"), {}, data)
}

export function exportReport (data = {}) {
  return request.doExport(devProxy("/fengkaili/exportAttendanceList"), {}, data);
}

// 月度明细
export function queryDetails (data = {}) {
  return request.doPost(devProxy("/fengkaili/queryAttendanceDays"), {}, data)
}

export function exportDetails (data = {}) {
  return request.doExport(devProxy("/fengkaili/exportAttendanceDays"), {}, data);
}

export function authCode (code) {
  return request.doPost(devProxy("/fengkaili/user/code"), {}, { code }, {
    [KEY_NO_LOAD_TOKEN]: true,
    [KEY_NO_LOADING]: true
  });
}
