Taro: Taro.request success回调无效 微信小程序

Created on 22 Jun 2018  ·  4Comments  ·  Source: NervJS/taro

Taro.request({
url: 'https://...',
success: function(res){
console.log(res)
},
fail: function(res){
console.log(res)
},
})

Most helpful comment

Taro.request({
url: 'http://localhost:8080/test',
data: {
foo: 'foo',
bar: 10
},
header: {
'content-type': 'application/json'
}
})
.then(res => console.log(res.data))

All 4 comments

Taro.request({
url: 'http://localhost:8080/test',
data: {
foo: 'foo',
bar: 10
},
header: {
'content-type': 'application/json'
}
})
.then(res => console.log(res.data))

文档里面写可以用success和fail的啊

@btstack 已经修复啦,下个版本支持

感谢! @luckyadam

Was this page helpful?
0 / 5 - 0 ratings