Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

取消监听网络状态变化bug #1511

Closed
twb123 opened this issue Apr 1, 2020 · 2 comments
Closed

取消监听网络状态变化bug #1511

twb123 opened this issue Apr 1, 2020 · 2 comments
Assignees

Comments

@twb123
Copy link

twb123 commented Apr 1, 2020

微信小程序上有个api:wx.offNetworkStatusChange.
uni-app文档上没有写,但是能够调用。调用的时候一直报错。
报错:offNetworkstatusChange should accept a function instead of object。
我传的确实是function。源码如下:
uni.offNetworkStatusChange(function (res) {
console.log('end')
})

@zhetengbiji
Copy link
Collaborator

先直接调用 wx.offNetworkStatusChange

@twb123
Copy link
Author

twb123 commented Apr 1, 2020

谢谢。可以直接调用 wx.offNetworkStatusChange()解决,不要带参数,带参数会报错

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants