调试接口
This commit is contained in:
16
src/App.vue
16
src/App.vue
@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user