修正逾期信息查询条件,不查询已完成

This commit is contained in:
WindowBird 2025-11-21 11:58:18 +08:00
parent ae0265d673
commit 9e8d582e4c
3 changed files with 6 additions and 4 deletions

View File

@ -23,8 +23,10 @@ export const getTaskList = ({ownerId, overdue, statusList, expireTimeStart, expi
queryParams.push(`ownerId=${ownerId}`); queryParams.push(`ownerId=${ownerId}`);
} }
if (statusList !== undefined && Array.isArray(statusList) && statusList.length > 0) { if (statusList !== undefined && Array.isArray(statusList) && statusList.length > 0) {
// 将数组转换为逗号分隔的字符串,例如 [4] => "4" 或 [1,2,3] => "1,2,3" // 将数组转换为重复参数格式,例如 [1,2] => "statusList=1&statusList=2"
queryParams.push(`statusList=${statusList.join(',')}`); statusList.forEach(status => {
queryParams.push(`statusList=${status}`);
});
} }
if (expireTimeStart !== undefined && expireTimeStart !== null && expireTimeStart !== '') { if (expireTimeStart !== undefined && expireTimeStart !== null && expireTimeStart !== '') {
queryParams.push(`expireTimeStart=${encodeURIComponent(expireTimeStart)}`); queryParams.push(`expireTimeStart=${encodeURIComponent(expireTimeStart)}`);

View File

@ -272,7 +272,7 @@ const getOwnerNames = (memberList) => {
// //
const loadOverdueTasks = async () => { const loadOverdueTasks = async () => {
try { try {
const res = await getTaskList({ overdue: true }); const res = await getTaskList({ overdue: true, statusList: [1, 2] });
console.log('逾期任务列表加载成功:', res); console.log('逾期任务列表加载成功:', res);
// { total: 27, rows: [...], code: 200, msg: "" } // { total: 27, rows: [...], code: 200, msg: "" }

View File

@ -11,7 +11,7 @@ export const Request = () => {
uni.$uv.http.setConfig((config) => { uni.$uv.http.setConfig((config) => {
/* config 为默认全局配置*/ /* config 为默认全局配置*/
config.baseURL = 'http://192.168.1.4:4001'; /* 根域名 */ config.baseURL = 'http://192.168.1.4:4001'; /* 根域名 */
config.baseURL = 'https://pm.ccttiot.com/prod-api'; /* 根域名 */ // config.baseURL = 'https://pm.ccttiot.com/prod-api'; /* 根域名 */
return config return config
}) })