微信小程序刷新webview页面
小程序通过web-view标签嵌入HTML网页后,刷新网页方法:
this.setData {
bindUrl: ''
}
this.setData {
bindUrl: 'https://www.gooseeker.com/tagtool2/secure/wxindex.html?sessionKey=' + wx.getStorageSync('sessionKey')
}
在我的程序里面仅仅这样写没有起效,后来发现了:
data:{
webUrl: 'https://www.gooseeker.com/tagtool2/secure/wxindex.html?sessionKey=' + wx.getStorageSync('sessionKey')
},
把webUrl的初始值注释掉,发现就可以了