gpt4 book ai didi

android - 标题的值无法从 ReadablenativeMap 转换为字符串

转载 作者:行者123 更新时间:2023-11-29 14:29:44 25 4
gpt4 key购买 nike

考虑:

InsertDataToServer = () => {
const { pinValue1 } = this.state;
const { pinValue2 } = this.state;
const { pinValue3 } = this.state;
const { pinValue4 } = this.state;
var String_3 = pinValue1.concat(" ", pinValue2);
var String_4 = String_3.concat(" " , pinValue3);
var String_5 = String_4.concat(" " , pinValue4);

fetch("http://www.aonde.biz/mobile/doLogin.php", {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify({
"pin": 212,
})
})
.then(response => response.json())
.then(responseJson => {
// Showing the response message coming from
// the server after inserting records.
Alert.alert(responseJson);
})
.catch(error => {
console.error(error);
});

在上面的代码中,当我传递“pin”参数API时,它显示了这个错误:

In image show full error

我该如何解决这个问题?

最佳答案

当代码更改为:

Alert.alert('错误:', 错误)

到:

Alert.alert('错误:', error.message)

关于android - 标题的值无法从 ReadablenativeMap 转换为字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52992606/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com