问题引入
小程序开发中,有个问题,就是扫带参数的小程序码时
在onLoad获取到的url信息被部分编码了
如:pages/index/index?a\u1
我们想要的是:pages/index/index?a=1
解码通过我们想要的
var path = decodeURIComponent(path)
完美解决!!!
小程序开发中,有个问题,就是扫带参数的小程序码时
在onLoad获取到的url信息被部分编码了
如:pages/index/index?a\u1
我们想要的是:pages/index/index?a=1
var path = decodeURIComponent(path)
完美解决!!!