fix get fcm token
This commit is contained in:
parent
bf565f7118
commit
ebb96bdbb8
@ -42,25 +42,25 @@ class LoginScreen extends Component {
|
|||||||
|
|
||||||
if (regex.test(this.state.username) === true) {
|
if (regex.test(this.state.username) === true) {
|
||||||
console.log('true')
|
console.log('true')
|
||||||
// const fcm = messaging()
|
const fcm = messaging()
|
||||||
// if (!await fcm.hasPermission()) {
|
if (!await fcm.hasPermission()) {
|
||||||
// try {
|
try {
|
||||||
// await messaging().requestPermission()
|
await messaging().requestPermission()
|
||||||
// } catch (error) {
|
} catch (error) {
|
||||||
// this.setState({
|
this.setState({
|
||||||
// isLoading: false
|
isLoading: false
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// const fcmToken = await messaging().getAPNSToken()
|
const fcmToken = await messaging().getAPNSToken()
|
||||||
|
|
||||||
|
|
||||||
let params = {
|
let params = {
|
||||||
// mobile: this.state.username,
|
// mobile: this.state.username,
|
||||||
username: this.state.username,
|
username: this.state.username,
|
||||||
password: this.state.password,
|
password: this.state.password,
|
||||||
// fcm_token: fcmToken
|
fcm_token: fcmToken
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('params >> ', params)
|
console.log('params >> ', params)
|
||||||
|
Loading…
Reference in New Issue
Block a user