Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setAlias() {
if (this.state.alias !== undefined) {
JPushModule.setAlias(this.state.alias, () => {
// console.log('success set alias');
Alert.alert('success set alias')
},() => {
Alert.alert('fail set alias')
// console.log('fail set alias');
});
};
}
setAlias() {
if (this.state.alias !== undefined) {
JPushModule.setAlias(this.state.alias, () => {
// Alert.alert('成功', '设置alias 成功',[{text: 'OK'}]);
console.log('success set alias');
},() => {
// Alert.alert('失败','设置alias 失败',[{text:'fail'}]);
console.log('fail set alias');
});
};
},
setAlias() {
if (this.state.alias !== undefined) {
JPushModule.setAlias(this.state.alias, () => {
console.log("Set alias succeed");
}, () => {
console.log("Set alias failed");
});
}
}
setAlias() {
if (this.state.alias !== undefined) {
JPushModule.setAlias(this.state.alias, (map) => {
if (map.errorCode === 0) {
console.log("set alias succeed");
} else {
console.log("set alias failed, errorCode: " + map.errorCode);
}
});
}
}