人脸注册时,最后这一步,注册始终提示110错误
tanghong135 发布于2019-09 浏览:1659 回复:7
0
收藏

wx.request({
url: 'https://aip.baidubce.com/rest/2.0/face/v3/faceset/user/add?access_token=' + token,
method: 'POST',
data: {
uid: 'user_test1',
group_id: 'user_face_1', //自己的组id
image: face,
user_info: 'user_test2'
//image_type: 'BASE64'
//user_id: username //昵称
},
header: {
'Content-Type': 'application/x-www-form-urlencoded' // 默认值
},
success(res) {
console.log("返回参数:" + res.data.error_code)
console.log("返回参数:" + res.data.log_id)
console.log("返回参数:" + res.data.error_msg)
console.log("返回参数:" + res.data.log_id)
var errorcode = res.data.error_code
//做成功判断
if (errorcode == 0) {
wx.showToast({
title: '注册成功',
icon: 'success',
duration: 500
})
//注册成功,跳转到主界面
wx.switchTab({
url: '../UI/ui'
})
} else {
wx.showToast({
title: '注册失败!',
icon: 'fail',
duration: 500
})
}
},
fail: function (res) {
console.log('注册失败!' + res.errMsg)
}

 

 

收藏
点赞
0
个赞
共7条回复 最后由wangwei8638回复于2019-09
#8wangwei8638回复于2019-09
#4 用户已被禁言回复
你给错了。是access_token 不是refresh_token https://ai.baidu.com/docs#/Auth/75d80ed1
展开

正解

0
#7rose20135188回复于2019-09

来学习学习。

0
#6用户已被禁言回复于2019-09

调接口  数据要认清呢

0
#5tanghong135回复于2019-09

喔,还真是哈,谢谢各位喽,我还真没注意还有这个区别,光看到token了..............       没注意access_token 不是refresh_token是两个不同的

0
#4用户已被禁言回复于2019-09
#2 tanghong135回复
有没有人知道这是为什么呢,请指教一下,谢谢喽~~~

你给错了。是access_token 不是refresh_token

https://ai.baidu.com/docs#/Auth/75d80ed1

2
#3用户已被禁言回复于2019-09
#2 tanghong135回复
有没有人知道这是为什么呢,请指教一下,谢谢喽~~~

你给的token是24.xxx开头的吗?

2
#2tanghong135回复于2019-09

有没有人知道这是为什么呢,请指教一下,谢谢喽~~~

0
TOP
切换版块