OfficeSystem/api/verify.js
2025-11-14 10:01:37 +08:00

47 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 审批相关 API
export const getVerifyList = (params = {}) => {
// 处理 createTimeList 参数,如果是数组则转换为重复参数格式
const processedParams = { ...params };
if (Array.isArray(processedParams.createTimeList)) {
const tempList = processedParams.createTimeList;
// 删除原来的 createTimeList因为我们要手动处理
delete processedParams.createTimeList;
// 构建查询字符串
let queryString = '';
tempList.forEach(date => {
queryString += `&createTimeList=${encodeURIComponent(date)}`;
});
return uni.$uv.http.get(`/bst/verify/list?${queryString}`, {
params: {
pageNum: 1,
pageSize: 20,
orderByColumn: 'createTime',
isAsc: 'descending',
bstType: 'UPDATE_TASK',
...processedParams
},
custom: {
auth: true
}
});
}
// 如果不是数组,正常处理
return uni.$uv.http.get('/bst/verify/list', {
params: {
pageNum: 1,
pageSize: 20,
orderByColumn: 'createTime',
isAsc: 'descending',
bstType: 'UPDATE_TASK',
...processedParams
},
custom: {
auth: true
}
});
};