以Promise风格调用: 不支持。
获取本次小程序启动时的参数。如果当前是冷启动,则返回值与 App.onLaunch 的回调参数一致;如果当前是热启动,则返回值与 App.onShow 一致。
属性 | 类型 | 说明 |
---|---|---|
path | string | 启动小程序的路径 (代码包路径) |
query | object | 启动小程序的 query 参数 |
scene | object | 启动小程序的场景值 |
shopId | object | 启动小程序的POI来源 |
try { const res = xhs.getEnterOptionsSync() console.log(res.query) } catch (e) { // Do something when catch error }```