onLoad(query) {
let url = decodeURIComponent(query.url)
this.setData({
url: `${url}&t=${new Date().getTime()}`
})
console.info('webview', this.data.url);
},
decodeURIComponent() 函数可对 encodeURIComponent() 函数编码的 URI 进行解码。
在URL后面添加时间戳,每次访问的时候都是新的地址,会刷新缓存。
如果需要其他参数,可自行拼接。