데이터를 가져 오려고하는 네이티브에 로그인 기능이 있습니다.가져 오기가 기본 네이티브에서 작동하지 않습니다.
onLogin: function() { //
const self = this;
self.setState({modalVisible: true, modalMessage: 'Signing in'});
fetch('http://psa.autralis.com/manager/api/v1/obtain-auth-token/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
username: self.state.username,
password: self.state.password,
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch((error) => {
console.warn(error);
});
},
을하지만 어떤 이유가 IOS에서 작동하지 않습니다 : 다음과 같은 기능입니다. 나는 오류 얻을 : 작동 안드로이드에
을, 나는 우체부와 함께 테스트도 작동합니다.
아이디어가 있으십니까?
으로
변경. 그러나 나는 당신의 대답을 받아 들일 것입니다. – Boky