場景值:
代表從何處進入小程序的。代表小程序的入口場景值。
注意:
1》目前僅可以在 App 的 onlaunch 和 onshow 中獲取上述場景值
獲取場景值的方法:
//在小程序的onLaunch和onShow方法參數中可獲取場景值 App({ onLaunch: function (options) { console.log("[onLaunch] 本次場景值:", options.scene) }, onShow: function (options) { console.log("[onShow] 本次場景值:", options.scene) } })
場景值對應列表:https://developers.weixin.qq.com/miniprogram/dev/framework/app-service/scene.html
