Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
addTag = () => {
console.log("Adding tag: " + this.state.tag);
JPushModule.addTags(this.state.tag.split(","), (map) => {
if (map.errorCode === 0) {
console.log("Add tags succeed, tags: " + map.tags);
} else {
console.log("Add tags failed, error code: " + map.errorCode);
}
});
}
JPushModule.addnetworkDidLoginListener(() => {
console.log('连接已登录')
JPushModule.addTags(['dasffas'], (result)=> {
Alert.alert('addTags success:' + JSON.stringify(result))
})
})
addTag() {
JPushModule.addTags([this.state.tag], (result)=> {
Alert.alert(JSON.stringify(result))
})
}