普通二维码扫码获取不到参数是什么情况?

小程序 文章 2021-03-11 12:41 602 0 全屏看文

AI助手支持GPT4.0

普通二维码扫码获取不到参数是什么情况?What is the situation that the parameters cannot be obtained by scanning the QR code?

普通二维码扫码获取不到参数是什么情况?

普通二维码连接的配置也发布上线了,为什么url获取不到参数?

vue二维码的链接

wxml

js

The configuration of ordinary QR code connection is also released online. Why can't the URL get the parameters? The link of Vue two dimensional code wxml JS

回答:

陈宇明:

有没有参数是你生成的时候有没有带参数决定的

和二维码是不是普通的没关系

Brother斌🎈:

先获取整个链接:decodeURIComponent(options.q);

再根据自己的需求去截取链接中的参数

大兵:

扫描普通的二维码,它只会把二维码中完整的内容给你,要获取里面的参数,要你自己解析的。

你看一下配置处:前缀占用规则 - 详细说明就懂了

https://developers.weixin.qq.com/miniprogram/introduction/qrcode.html#%E5%89%8D%E7%BC%80%E5%8D%A0%E7%94%A8%E8%A7%84%E5%88%99

-EOF-

AI助手支持GPT4.0