微信小程序二维码传参接收

zhuanbike 2022-4-30 887

微信小程序二维码使用scene传参:

接收方法:这里只有一个参数,所以使用正则提取其中的数字。

if (options.scene) {
				// options 中的 scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene
				var scene = decodeURIComponent(options.scene).match(/\d+/g)
				this.reFree = parseInt(...scene)
			}


最新回复 (0)
发新帖