返回参数不一致
孤独永恒的心 发布于2017-12 浏览:1623 回复:6
0
收藏
快速回复

撸代码时判断识别是否成功我用的上面示例的msg,但实际返回参数并没有。识别成功返回{"log_id": 2520519803438148916, "words_result_num": 10, "words_result": {"证号": {"words": "440882199407247218"}, "有效期限": {"words": "20131112"}, "准驾车型": {"words": "C1"}, "住址": {"words": "广东省霞州市乌石镇吴宅村55号"}, "至": {"words": "20191101"}, "姓名": {"words": "吴伟文"}, "国籍": {"words": "中国"}, "出生日期": {"words": "19940724"}, "性别": {"words": "男"}, "初次领证日期": {"words": "20131101"}}}, 识别失败返回  {"log_id": 7354976359365269, "words_result_num": 10, "words_result": {"证号": {"words": ""}, "有效期限": {"words": "年"}, "准驾车型": {"words": "C1"}, "有效起始日期": {"words": ""}, "住址": {"words": ""}, "姓名": {"words": ""}, "国籍": {"words": ""}, "出生日期": {"words": ""}, "性别": {"words": "男"}, "初次领证日期": {"words": ""}}} ,那么得怎么判断识别成功或否?

收藏
点赞
0
个赞
共6条回复 最后由用户已被禁言回复于2022-04
#8追星逐月的家回复于2018-10

msg不就是显示成功了么

0
#7shoranxfyzhy回复于2017-12

看来对于文档的同步更新非常有必要呀

0
#5goJhou回复于2017-12

解决了就好!

0
#4用户已被禁言回复于2017-12
#3 孤独永恒的心回复
客服说目前已取消msg参数,请求失败会返回错误码error_code和error_msg
展开

恩。客服回复那就按客服的来。

1
#3孤独永恒的心回复于2017-12
#2 用户已被禁言回复
以实际返回为主。判断 words_result_num  如果错误是0  示例代码估计后续的更新会包一层errno msg字段。(个人猜测)
展开

客服说目前已取消msg参数,请求失败会返回错误码error_code和error_msg

0
#2用户已被禁言回复于2017-12

以实际返回为主。判断 words_result_num  如果错误是0 

示例代码估计后续的更新会包一层errno msg字段。(个人猜测)

1
TOP
切换版块