my.offNetworkStatusChange
Use this JSAPI to stop listening to the event of network status change. This is usually paired with the my.onNetworkStatusChange
JSAPI.
Sample Code
copy
Page({
listener(res) {
console.log(res)
},
onNetworkStatusChange(){
my.onNetworkStatusChange(this.listener)
},
offNetworkStatusChange() {
//stop listening to the event of network status change.
my.offNetworkStatusChange(this.listener)
},
});