From 5466a0534a4e503af758ae596614453e44da38e4 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Fri, 14 Nov 2025 10:01:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=89=B9=E7=AE=A1=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9D=A1=E4=BB=B6=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/verify.js | 37 ++- pages/verify/list/index.vue | 490 +++++++++++++++++++++++++++++++----- utils/request/index.js | 2 +- 3 files changed, 464 insertions(+), 65 deletions(-) diff --git a/api/verify.js b/api/verify.js index 03df4b3..ac72e90 100644 --- a/api/verify.js +++ b/api/verify.js @@ -1,5 +1,36 @@ // 审批相关 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, @@ -7,12 +38,10 @@ export const getVerifyList = (params = {}) => { orderByColumn: 'createTime', isAsc: 'descending', bstType: 'UPDATE_TASK', - ...params + ...processedParams }, custom: { auth: true } }); -}; - - +}; \ No newline at end of file diff --git a/pages/verify/list/index.vue b/pages/verify/list/index.vue index 1cb03e7..aedfc9c 100644 --- a/pages/verify/list/index.vue +++ b/pages/verify/list/index.vue @@ -1,14 +1,92 @@ - - diff --git a/utils/request/index.js b/utils/request/index.js index a397cd6..1a9501b 100644 --- a/utils/request/index.js +++ b/utils/request/index.js @@ -11,7 +11,7 @@ export const Request = () => { uni.$uv.http.setConfig((config) => { /* config 为默认全局配置*/ config.baseURL = 'http://192.168.1.5:4001'; /* 根域名 */ - config.baseURL = 'https://pm.ccttiot.com/prod-api'; /* 根域名 */ + // config.baseURL = 'https://pm.ccttiot.com/prod-api'; /* 根域名 */ return config })