现在怎么使用setwindowsize接口?一直返回setWindowSize:fail deprecated
代码片段wx.getSystemInfo({
success (res) {
console.log(res.model)
console.log(res.pixelRatio)
console.log(res.windowWidth)
console.log(res.windowHeight)
console.log(res.screenWidth)
console.log(res.screenHeight)
console.log(res.language)
console.log(res.version)
console.log(res.platform)
wx.setWindowSize({
height: res.screenHeight,
width: res.screenWidth,
complete(res){
console.log(res)
wx.onWindowResize((result) => {console.log(result)})
}
})
}
})