hookehuyr

docs(useOfflineBookingCachePolling): 添加函数参数注释并更新调用参数

更新 enable_offline_booking_cache_polling 函数的 JSDoc 注释,明确参数定义
在 app.js 中调用时添加 interval_ms 参数配置为 5 分钟
1 /* 1 /*
2 * @Date: 2025-06-28 10:33:00 2 * @Date: 2025-06-28 10:33:00
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2026-01-16 00:17:50 4 + * @LastEditTime: 2026-01-17 00:21:26
5 * @FilePath: /xyxBooking-weapp/src/app.js 5 * @FilePath: /xyxBooking-weapp/src/app.js
6 * @Description: 应用入口文件 6 * @Description: 应用入口文件
7 */ 7 */
...@@ -170,7 +170,7 @@ const App = createApp({ ...@@ -170,7 +170,7 @@ const App = createApp({
170 */ 170 */
171 const bootstrap_after_auth = () => { 171 const bootstrap_after_auth = () => {
172 try_preload_when_online() 172 try_preload_when_online()
173 - enable_offline_booking_cache_polling() 173 + enable_offline_booking_cache_polling({ interval_ms: 5 * 1000 * 60 })
174 } 174 }
175 175
176 // 处理在启动时出现的不良网络情况 176 // 处理在启动时出现的不良网络情况
......
...@@ -259,6 +259,9 @@ const release_polling_ref = () => { ...@@ -259,6 +259,9 @@ const release_polling_ref = () => {
259 /** 259 /**
260 * @description: 启用离线预约缓存轮询 260 * @description: 启用离线预约缓存轮询
261 * @param {Object} options 选项 261 * @param {Object} options 选项
262 + * @param {Number} options.interval_ms 轮询间隔,单位毫秒
263 + * @param {Boolean} options.immediate 是否立即刷新一次
264 + * @param {Boolean} options.force 是否强制刷新(透传给 refresh_offline_booking_cache)
262 */ 265 */
263 266
264 export const enable_offline_booking_cache_polling = (options) => { 267 export const enable_offline_booking_cache_polling = (options) => {
......