refactor(user/order): 优化订单列表筛选逻辑和性能

- 在设置状态栏高度时增加空值合并操作,避免潜在的 null错误
- 移除了未使用的导入语句,减少代码冗余
- 重构了订单列表的搜索和筛选逻辑:
  - 调整了搜索条件的合并方式,确保 tab 的 statusFilter 优先级最高
  -优化了 useEffect 监听的搜索参数,只在关键词等其他条件变化时重新加载
  -简化了 tab 切换逻辑,提高了代码可读性
This commit is contained in:
2025-08-11 22:37:45 +08:00
parent 46a555b27a
commit f564703e51
2 changed files with 24 additions and 30 deletions

View File

@@ -55,7 +55,7 @@ function Order() {
// 获取状态栏高度
Taro.getSystemInfo({
success: (res) => {
setStatusBarHeight(res.statusBarHeight)
setStatusBarHeight(res.statusBarHeight ?? 0)
},
})
// 设置导航栏标题