Chinaunix首页 | 论坛 | 博客
  • 博客访问: 922123
  • 博文数量: 210
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 2070
  • 用 户 组: 普通用户
  • 注册时间: 2014-11-19 21:54
文章分类

全部博文(210)

文章存档

2020年(2)

2019年(18)

2018年(27)

2017年(5)

2016年(53)

2015年(88)

2014年(17)

分类: 其他平台

2019-05-23 13:36:15

传递到的参数:

点击(此处)折叠或打开

  1. "path": _this.data.page_route + '?query=' + _this.data.activityId ,
  2. "is_hyaline": false,
  3. "width": 400 ,
  4. "auto_color": false,
  5.  "line_color": { "r": 0, "g": 0, "b": 0 }
请求参数文档

返回的结果 :需要的页面小程序码(小程序二维码)的地址在 data=>key

当微信扫一扫,进入页面的操作
ononLoad(option) 获取去生成路径的参数query="xxxxxx'; option.query
有必要的话:可以用 decodeURIComponent(option.query) 解码一下

点击(此处)折叠或打开

  1. onLoad: function (options) {
  2.     let that = this;
  3.     console.log("获取的参数", options)
  4.     if (options.query){
  5.       let qrUrl = decodeURIComponent(options.query);
  6.        console.log("编码后的参数", qrUrl)
  7.          //今进行逻辑操作
  8.     }
  9.    
  10.   },
console的结果:

阅读(1578) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~