1***@qq.com
1***@qq.com
  • 发布:2020-10-09 20:38
  • 更新:2020-10-09 20:38
  • 阅读:551

工具更新最新版本后为啥返回的参数获取不到了?

分类:HBuilderX

uni.request({
url: that.serverapi+'/api/login',
data:data,
method:'POST',
header:{'content-type':'application/x-www-form-urlencoded'},
success: (res) => {
console.log(res.data)
console.log(res.data.retCode)
}
})

打印结果1:
20:33:46.829 {"retCode":0,"retMsg":"登录成功","data":{"token":"Njk1MDAx","phone":"18513233949"}} at pages/login/login.vue:184

打印结果2:
20:33:46.849 undefined at pages/login/login.vue:185

2020-10-09 20:38 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复