Skip to content

Commit

Permalink
chore: 部分抹平h5与小程序参数差异
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyo837 authored and ZakaryCode committed Sep 23, 2022
1 parent 770574e commit 61d2cfd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/taro-router/src/router/mpa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export async function createMultiRouter (
) {
RouterConfig.config = config
const handler = new MultiPageHandler(config)
const launchParam = handler.getQuery()
const launchParam = {
// 其他参数, 需要再抹平
query: handler.getQuery()
}
app.onLaunch?.(launchParam)
app.onError && window.addEventListener('error', e => app.onError?.(e.message))

Expand Down
5 changes: 4 additions & 1 deletion packages/taro-router/src/router/spa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export function createRouter (
}
})
const router = new UniversalRouter(routes, { baseUrl: basename || '' })
const launchParam = handler.getQuery(stacks.length)
const launchParam = {
// 其他参数, 需要再抹平
query: handler.getQuery(stacks.length)
}
app.onLaunch?.(launchParam)
app.onError && window.addEventListener('error', e => app.onError?.(e.message))

Expand Down

0 comments on commit 61d2cfd

Please sign in to comment.