|
|
|
@ -1435,6 +1435,7 @@ |
|
|
|
const parsedUserInfo = JSON.parse(userInfo); |
|
|
|
const currentUserName = parsedUserInfo.name; |
|
|
|
const currentUserPhone = parsedUserInfo.phoneNumber; |
|
|
|
const isAdmin = parsedUserInfo.projectName === '管理员'; |
|
|
|
|
|
|
|
// 构建查询参数,添加时间戳防止缓存 |
|
|
|
let queryParams = `page=${currentPage}&pageSize=${pageSize}&status=${currentStatus}&_t=${Date.now()}`; |
|
|
|
@ -1444,9 +1445,11 @@ |
|
|
|
if (phoneNumber) { |
|
|
|
queryParams += `&phoneNumber=${encodeURIComponent(phoneNumber)}`; |
|
|
|
} |
|
|
|
// 添加当前登录者信息,用于对接人匹配 |
|
|
|
// 添加当前登录者信息,用于对接人匹配(非管理员才需要) |
|
|
|
if (!isAdmin) { |
|
|
|
queryParams += `¤tUserName=${encodeURIComponent(currentUserName)}`; |
|
|
|
queryParams += `¤tUserPhone=${encodeURIComponent(currentUserPhone)}`; |
|
|
|
} |
|
|
|
|
|
|
|
// 使用相对路径,避免硬编码地址导致的跨电脑访问问题 |
|
|
|
const response = await fetch(`/api/suppliers?${queryParams}`); |
|
|
|
|