fix(useOfflineBookingCache): 过滤状态为3的离线预订项
仅缓存状态为3的账单项,确保只处理有效数据
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -165,7 +165,7 @@ export const refresh_offline_booking_cache = async ({ force = false } = {}) => { | ... | @@ -165,7 +165,7 @@ export const refresh_offline_booking_cache = async ({ force = false } = {}) => { |
| 165 | 165 | ||
| 166 | const { code, data, msg } = await billOfflineAllAPI() | 166 | const { code, data, msg } = await billOfflineAllAPI() |
| 167 | if (code && Array.isArray(data)) { | 167 | if (code && Array.isArray(data)) { |
| 168 | - const normalized = data.map(normalize_bill_item).filter((item) => item && item.pay_id) | 168 | + const normalized = data.map(normalize_bill_item).filter((item) => item && item.pay_id && item.status == 3) |
| 169 | if (normalized.length > 0) { | 169 | if (normalized.length > 0) { |
| 170 | Taro.setStorageSync(OFFLINE_BOOKING_CACHE_KEY, normalized) | 170 | Taro.setStorageSync(OFFLINE_BOOKING_CACHE_KEY, normalized) |
| 171 | } | 171 | } | ... | ... |
-
Please register or login to post a comment