微信小程序开发新手学习笔记

目录:

1.获取微信小程序的场景值,例如用户是通过搜索进入的还是扫二维码


1.获取微信小程序的场景值

//在app.js中
onLaunch: function(options) {
    console.log(options.scene) 
  },
onShow: function(options) {
    console.log(options.scene)
  }

场景值详见:https://mp.weixin.qq.com/debug/wxadoc/dev/framework/app-service/scene.html

猜你喜欢

转载自blog.csdn.net/yanmuchen/article/details/87806838