调试接口

This commit is contained in:
wangxiaowei
2025-12-22 19:06:04 +08:00
parent ca0d16cf05
commit 90e9448b68
15 changed files with 220 additions and 152 deletions

View File

@ -2,9 +2,17 @@
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
import { navigateToInterceptor } from '@/router/interceptor'
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
import { LOCATION_DEFAULT_CITY, LOCATION_DEFAULT_LAT, LOCATION_DEFAULT_LNG, LOCATION_LAT_KEY, LOCATION_LNG_KEY, LOCATION_CITY_KEY } from '@/hooks/useLocation'
onLaunch((options) => {
// console.log("🚀 ~ onLaunch options:", options)
// if (options?.path === 'bundle/order/tea-room/order-detail') {
// uni.setStorageSync('transferOrder', {
// orderId: options?.query?.orderId || '',
// shareSource: options?.query?.shareSource || ''
// })
// console.log("🚀 ~ onLaunch sync:", uni.getStorageSync('transferOrder'))
// }
// 处理直接进入页面路由的情况如h5直接输入路由、微信小程序分享后进入等
// https://github.com/unibest-tech/unibest/issues/192
if (options?.path) {
@ -19,6 +27,12 @@
// uni.setStorageSync(LOCATION_CITY_KEY, LOCATION_DEFAULT_CITY)
})
onShow((options) => {
if (options?.path === 'bundle/order/tea-room/order-detail') {
uni.setStorageSync('transferOrderParams', {
orderId: options?.query?.orderId || '',
shareSource: options?.query?.shareSource || ''
})
}
console.log('App Show', options)
})
onHide(() => {