panax

1.通过wx.getSystemInfo或者wx.getSystemInfoSync获取到小程序的基础库版本号SDKVersion,与某功能所支持的版本进行比较。

wx.getSystemInfo({
success: function(res) {
console.log(res.SDKVersion)
}
})

2.对于API的参数或者返回值有新增的参数,可以判断用以下代码判断

wx.showModal({
success: function(res) {
if (wx.canIUse(\'showModal.cancel\')) {
console.log(res.cancel)
}
}
})

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2021-11-13
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-10
  • 2021-11-30
  • 2021-11-07
  • 2021-08-14
相关资源
相似解决方案