销冠的素材

This commit is contained in:
zhonghua1
2025-12-24 18:10:11 +08:00
parent 5a13f60517
commit 014d5ef562
3 changed files with 973 additions and 35 deletions

View File

@@ -1639,19 +1639,23 @@
queryParams.customerName = params.customerName;
}
// 构建查询参数
const queryString = Object.keys(queryParams)
// 构建请求体(过滤空值),后端改为 POST
const requestData = Object.keys(queryParams)
.filter(key => queryParams[key] !== null && queryParams[key] !== undefined && queryParams[key] !== '')
.map(key => `${key}=${encodeURIComponent(queryParams[key])}`)
.join('&');
.reduce((acc, key) => {
acc[key] = queryParams[key];
return acc;
}, {});
// 统一使用 getApiUrl根据 env.js 配置自动切换环境
const baseUrl = getApiUrl('/api/audioManagement/list');
const url = queryString ? `${baseUrl}?${queryString}` : baseUrl;
const url = getApiUrl('/api/audioManagement/list');
const res = await uni.request({
url: url,
method: 'GET',
method: 'POST',
data: requestData,
header: {
'Content-Type': 'application/json'
},
timeout: 10000
});