扫描小程序码分享
scene 必须配合前端来接收吗, 可以扫码后直接拼接到小程序地址中吗?每次都需要前端来配合接收 太麻烦啦~
13 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
用户扫码之后,微信是不是取消了扫码事件的推送?
自定义的字串,只要不超过32位,你想怎么传都行。
onLoad() { if (!options.scene) { this.setData({ partJobId: options.partJobId || '' }) } else { let getQueryString = {} const strs = decodeURIComponent(options.scene).split('&') //以&分割 //取得全部并赋值 for (var i = 0; i < strs.length; i++) { getQueryString[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]) } this.setData({ partJobId: getQueryString['partJobId'] || '' }) } }
onLoad() { if (!options.scene) { this.setData({ partJobId: options.partJobId || app.globalData.query.partJobId || '' }) } else { let getQueryString = {} const strs = decodeURIComponent(options.scene).split('&') //以&分割 //取得全部并赋值 for (var i = 0; i < strs.length; i++) { getQueryString[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]) } this.setData({ partJobId: getQueryString['partJobId'] || '' }) } }
我们是这样写的:
```
我们这样的
正在加载...
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
用户扫码之后,微信是不是取消了扫码事件的推送?
自定义的字串,只要不超过32位,你想怎么传都行。
onLoad() { if (!options.scene) { this.setData({ partJobId: options.partJobId || '' }) } else { let getQueryString = {} const strs = decodeURIComponent(options.scene).split('&') //以&分割 //取得全部并赋值 for (var i = 0; i < strs.length; i++) { getQueryString[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]) } this.setData({ partJobId: getQueryString['partJobId'] || '' }) } }
onLoad() { if (!options.scene) { this.setData({ partJobId: options.partJobId || app.globalData.query.partJobId || '' }) } else { let getQueryString = {} const strs = decodeURIComponent(options.scene).split('&') //以&分割 //取得全部并赋值 for (var i = 0; i < strs.length; i++) { getQueryString[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]) } this.setData({ partJobId: getQueryString['partJobId'] || '' }) } }
我们是这样写的:
onLoad() { if (!options.scene) { this.setData({ partJobId: options.partJobId || app.globalData.query.partJobId || '' }) } else { let getQueryString = {} const strs = decodeURIComponent(options.scene).split('&') //以&分割 //取得全部并赋值 for (var i = 0; i < strs.length; i++) { getQueryString[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]) } this.setData({ partJobId: getQueryString['partJobId'] || '' }) } }
我们是这样写的:
```
onLoad() { if (!options.scene) { this.setData({ partJobId: options.partJobId || app.globalData.query.partJobId || '' }) } else { let getQueryString = {} const strs = decodeURIComponent(options.scene).split('&') //以&分割 //取得全部并赋值 for (var i = 0; i < strs.length; i++) { getQueryString[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]) } this.setData({ partJobId: getQueryString['partJobId'] || '' }) } }
onLoad() { if (!options.scene) { this.setData({ partJobId: options.partJobId || app.globalData.query.partJobId || '' }) } else { let getQueryString = {} const strs = decodeURIComponent(options.scene).split('&') //以&分割 //取得全部并赋值 for (var i = 0; i < strs.length; i++) { getQueryString[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]) } this.setData({ partJobId: getQueryString['partJobId'] || '' }) } }
我们这样的
onLoad() { if (!options.scene) { this.setData({ partJobId: options.partJobId || app.globalData.query.partJobId || '' }) } else { let getQueryString = {} const strs = decodeURIComponent(options.scene).split('&') //以&分割 //取得全部并赋值 for (var i = 0; i < strs.length; i++) { getQueryString[strs[i].split('=')[0]] = unescape(strs[i].split('=')[1]) } this.setData({ partJobId: getQueryString['partJobId'] || '' }) } }