|
@@ -0,0 +1,1240 @@
|
|
|
+[TOC]
|
|
|
+
|
|
|
+# HHAROME接入文档
|
|
|
+
|
|
|
+## 更新日志
|
|
|
+
|
|
|
+2024/2/2 更新初始化刷脸,及传参
|
|
|
+2024/2/18 更新小程序调试流程和命令
|
|
|
+2024/2/20 更新scope注意点
|
|
|
+2024/3/8 新增小程序登录代码逻辑、获取设备参数
|
|
|
+2024/3/15 新增刷脸1:1人证
|
|
|
+2024/3/19 新增语音播报
|
|
|
+2024/3/25 更新常见问题
|
|
|
+2024/3/26 新增手输身份证号和小票打印
|
|
|
+2024/3/27 开启刷二维码监听和刷身份证监听
|
|
|
+2024/4/16 更新常见问题
|
|
|
+2024/4/23 新增刷证超时和取消、麦克风录音
|
|
|
+2024/5/6 新增麦克风录音状态、红外感应
|
|
|
+2024/5/9 新增小程序超时
|
|
|
+2024/5/12 版式调整
|
|
|
+2024/5/13 调整红外感应
|
|
|
+2024/6/7 令牌授权的应用不相符问题新增解决方案。预览命令
|
|
|
+2024/6/18 新增语音播报最新和语音暂停
|
|
|
+2024/6/19 更新常见问题——刷脸初始化失败提示E69015的解决方案
|
|
|
+2024/6/20 新增副屏
|
|
|
+
|
|
|
+## 小程序真机调试
|
|
|
+
|
|
|
+开发工具:支付宝小程序开发工具
|
|
|
+
|
|
|
+1. 开发环境安装node,检查版本 >= 16
|
|
|
+2. 安装minidev插件,文档地址:<https://opendocs.alipay.com/mini/02q17j>
|
|
|
+ 1. 安装插件 npm i -g minidev --registry=<https://registry.npmmirror.com>
|
|
|
+ 2. 更新插件(按需即可) npm update -g minidev && minidev -v
|
|
|
+ 3. 工具授权,终端输入minidev login,小程序开发者支付宝扫码授权
|
|
|
+3. 发起真机预览 (预览当前的开发代码)
|
|
|
+ 1. 终端指令:minidev remote-debug -c ampe -a \[miniprogram\_appid] --ampe-device-id \[machine\_sn] --ampe-product-id \[machine\_ productId] --ampe-host-app-id \[ampe\_appid]
|
|
|
+ 2. 示例调试指令:minidev remote-debug -c ampe -a ==2021004113634033(改成服务商需要调试的小程序appid)== --ampe-device-id ==13AK008002200004(改成服务商设备的sn号)== --ampe-product-id 9705850 --ampe-host-app-id 2021004108608975
|
|
|
+ 3. 预览指令:minidev preview -c ampe -a ==2021004113634033(改成服务商需要调试的小程序appid)== --ampe-device-id ==13AK008002200004(改成服务商设备的sn号)== --ampe-product-id 9705850 --ampe-host-app-id 2021004108608975
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+## 小程序接入代码
|
|
|
+
|
|
|
+### 一. 消息发送接收主函数
|
|
|
+
|
|
|
+```javascript
|
|
|
+/******* my.call方法支持小程序发送指令对象 params 给 app ,app 处理完后通过 res 返回,单次有效 *******/
|
|
|
+my.call('ampeHHCommunication', params , res => {
|
|
|
+ console.log(res)
|
|
|
+});
|
|
|
+
|
|
|
+/******* my.on方法支持小程序打开一个持续监听方法,app 会持续发送数据 res *******/
|
|
|
+my.on('xxxxxxxxxx', res => {
|
|
|
+ console.log(res)
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+### 二. params指令对象列表
|
|
|
+
|
|
|
+#### 请求参数
|
|
|
+
|
|
|
+| 字段 | 是否必填 | 类型 | 说明 |
|
|
|
+| ------ | ---- | ------ | ------------------------------------------------------------------------------------------------------------ |
|
|
|
+| action | 是 | String | getQRCode---------二维码,<br />getIDCardInfo-----身份证,<br />getFaceInfo---------刷脸,<br />getDeviceInfo------设备信息 |
|
|
|
+| event | 是 | String | open-开启/close-关闭 |
|
|
|
+| taskId | 是 | String | 任务id耗时任务时与其他任务区分比对用 |
|
|
|
+| params | 是 | Object | 配置参数,见下文 |
|
|
|
+
|
|
|
+#### 返回参数
|
|
|
+
|
|
|
+| 字段 | 是否必填 | 类型 | 说明 |
|
|
|
+| ------- | ---- | ------- | --------------------- |
|
|
|
+| action | 是 | String | 与请求action对应 |
|
|
|
+| event | 是 | String | 与请求event对应 |
|
|
|
+| taskId | 是 | String | 与请求taskId对应 |
|
|
|
+| success | 是 | boolean | success-成功 / false-失败 |
|
|
|
+| message | 是 | String | 结果描述 |
|
|
|
+| data | 是 | Object | 返回结果数据 |
|
|
|
+
|
|
|
+==指令是否成功执行可根据 success 参数判断==
|
|
|
+
|
|
|
+==true----解析 data==
|
|
|
+
|
|
|
+==false---处理 message==
|
|
|
+
|
|
|
+#### 1. 刷脸指令
|
|
|
+
|
|
|
+##### 1.1 初始化
|
|
|
+
|
|
|
+```javascript
|
|
|
+/***建议在 app.js 的onLaunch 钩子里执行一次初始化即可(若失败,可以执行 3s 再次尝试初始化操作)***/
|
|
|
+
|
|
|
+let params = {
|
|
|
+ "action": "initFace",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "12345",
|
|
|
+ "params": {
|
|
|
+ "serviceId": "",
|
|
|
+ "query": "",
|
|
|
+ "scope": "auth_user,yingpin"
|
|
|
+ }
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 | 是否必填 |
|
|
|
+| --------- | ------ | ----------------------------------------------------------------------------------- | ---- |
|
|
|
+| scope | String | 聚合授权参数,scope的值如果有多个,逗号后不要有空格,避免产生弹框不出来或者没有对应要授权的信息展示。<br />正确值示例:auth\_user,yingpin | 必填 |
|
|
|
+| serviceId | String | 刷脸参数,无特殊需要不填 | 非必填 |
|
|
|
+| query | String | 刷脸参数,无特殊需要不填 | 非必填 |
|
|
|
+
|
|
|
+**返回值:**
|
|
|
+
|
|
|
+初始化调用后约两秒后返回结果,注意增加友好提示
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "initFace",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "12345",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {}
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+action和event的值固定,taskId可自定义
|
|
|
+
|
|
|
+##### 1.2 唤起 1:N 刷脸
|
|
|
+
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "getFaceInfo",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "2"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**返回值:**
|
|
|
+
|
|
|
+```javascript
|
|
|
+/***extInfo中的authCode就是对应刷脸返回的结果,用来获取用户信息必备值
|
|
|
+注意。刷脸失败的时候,success为false,需要展示下messge,防止看起来刷脸了,但没有反应和提示***/
|
|
|
+
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "getFaceInfo",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "2",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ "alipayUid": "2088612116677214",
|
|
|
+ "code": 1000,
|
|
|
+ "extInfo": "{\"authCode\":\"5dc39621fe5a49deb21a87c98876HA21\"}",
|
|
|
+ "ftoken": "fp19bcc44f3a8be610d4d6833607201ah99",
|
|
|
+ "isvResult": true,
|
|
|
+ "subCode": "",
|
|
|
+ "subMessage": "",
|
|
|
+ "vid": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+刷脸成功后,会返回authcode(extInfo参数中),然后再去调用支付宝接口获取用户信息
|
|
|
+需要开发商自己申请带有用户信息三要素权限
|
|
|
+https://opendocs.alipay.com/open/a74a7068_alipay.user.info.share?pathHash=af2476d4
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+刷脸失败,在data里会有originFaceInfo字段,里面是支付宝刷脸返回所有的信息
|
|
|
+
|
|
|
+
|
|
|
+##### 1.3 唤起 1: 1 刷脸
|
|
|
+
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "getFaceInfoPersonCard",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "7",
|
|
|
+ "params": {
|
|
|
+ "certName": "",
|
|
|
+ "certNo": "",
|
|
|
+ "certPhotoBase64Str": ""
|
|
|
+ }
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 | 是否必填 |
|
|
|
+| ------------------ | ------ | ---------- | ---- |
|
|
|
+| certName | String | 用户姓名 | 必填 |
|
|
|
+| certNo | String | 用户身份证号 | 必填 |
|
|
|
+| certPhotoBase64Str | String | 用户头像base64 | 非必填 |
|
|
|
+
|
|
|
+**返回值:**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "getFaceInfoPersonCard",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "7",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ "alipayUid": "2088612116677214",
|
|
|
+ "code": 1000,
|
|
|
+ "extInfo": "{\"authCode\":\"\"}",
|
|
|
+ "ftoken": "fp19bcc44f3a8be610d4d6833607201ah99",
|
|
|
+ "isvResult": true,
|
|
|
+ "subCode": "",
|
|
|
+ "subMessage": "",
|
|
|
+ "vid": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+注意。刷脸失败的时候,success为false,需要展示下messge,防止看起来刷脸了,但没有反应和提示
|
|
|
+
|
|
|
+#### 2.刷身份证
|
|
|
+
|
|
|
+##### 2.1 刷身份证(单次)
|
|
|
+
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "getIDCardInfo",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "3",
|
|
|
+ "params": {
|
|
|
+ "infoType": "base,photo,other"
|
|
|
+ }
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+请求参数infoType中三个值分别对应data中返回结果
|
|
|
+
|
|
|
+base
|
|
|
+
|
|
|
+ "name": "",
|
|
|
+ "idNum": "",
|
|
|
+
|
|
|
+photo
|
|
|
+
|
|
|
+ "photoBase64": "/9j/4AAQSkZJRgABAgAAAQABABntRS5Sj//"
|
|
|
+
|
|
|
+other
|
|
|
+
|
|
|
+ "signingOrganization": "杭州市公安局余杭分局",
|
|
|
+ "address": "杭州市XXX",
|
|
|
+ "nation": "汉",
|
|
|
+ "sex": "男",
|
|
|
+ "beginTime": "20230529",
|
|
|
+ "endTime": "20430529",
|
|
|
+ "birthDate": "19800101",
|
|
|
+
|
|
|
+**返回值-成功**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "getIDCardInfo",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "3",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ "name": "姓名",
|
|
|
+ "idNum": "身份证号",
|
|
|
+ "signingOrganization": "杭州市公安局余杭分局",
|
|
|
+ "address": "杭州市XXX",
|
|
|
+ "nation": "汉",
|
|
|
+ "sex": "男",
|
|
|
+ "beginTime": "20230529",
|
|
|
+ "endTime": "20430529",
|
|
|
+ "birthDate": "19800101",
|
|
|
+ "photoBase64": "/9j/4AAQSkZJRgABAgAAAQABABntRS5Sj//"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+| ------------------- | ------ | ----------------------------------- |
|
|
|
+| name | String | 姓名 |
|
|
|
+| idNum | String | 身份证号 |
|
|
|
+| signingOrganization | String | 签发机关 |
|
|
|
+| address | String | 地址,注意门牌号返回的138,正常的数字是138。可能会搜索时对应不上 |
|
|
|
+| nation | String | 民族 |
|
|
|
+| sex | String | 性别 |
|
|
|
+| beginTime | String | 有效期开始时间 |
|
|
|
+| endTime | String | 有效期截止时间 |
|
|
|
+| birthDate | String | 出身年月日 |
|
|
|
+| photoBase64 | String | 头像base64 |
|
|
|
+
|
|
|
+**返回值-15s 未刷证超时**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "getIDCardInfo",
|
|
|
+ "data": {},
|
|
|
+ "event": "open",
|
|
|
+ "message": "超时",
|
|
|
+ "success": false,
|
|
|
+ "taskId": "3"
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+##### 2.2 关闭刷身份证(单次)
|
|
|
+
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "closeIDCardInfo",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "3",
|
|
|
+ "params": {
|
|
|
+ "infoType": "base,photo,other"
|
|
|
+ }
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+若是持续监听时要关闭,my.on可以不写,不处理返回数据,会在app程序关闭时,自动处理关闭
|
|
|
+
|
|
|
+**返回值**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "closeIDCardInfo",
|
|
|
+ "data": {},
|
|
|
+ "event": "close",
|
|
|
+ "message": "关闭成功",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "3"
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+##### 2.3 开启刷身份证监听(持续)
|
|
|
+
|
|
|
+在线识别的暂不可用,离线识别可用该监听
|
|
|
+开启后,持续监听。若有刷身份证,则会回调以下函数。
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.on('initIDCardListener',res =>{
|
|
|
+ console.log('刷身份证监听',res.data)
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+返回结果同——刷身份证(单次)
|
|
|
+
|
|
|
+#### 3.二维码
|
|
|
+
|
|
|
+##### 3.1 开启刷二维码(单次)
|
|
|
+
|
|
|
+请求一次,返回一次。无法持续监听
|
|
|
+
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "getQRCode",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "3"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+action和event的值固定如上,taskId可自定义
|
|
|
+
|
|
|
+**返回值**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "getQRCode",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "1",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ "qrCode": "11"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+| ------ | ------ | --------- |
|
|
|
+| qrCode | String | 刷二维码返回的结果 |
|
|
|
+
|
|
|
+##### 3.2 开启刷二维码监听(持续)
|
|
|
+
|
|
|
+开启后,持续监听。若有刷码,则会回调以下函数
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.on('initQRListener',res =>{
|
|
|
+ console.log('刷二维码监听',res.data)
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+返回结果同“开启刷二维码返回”
|
|
|
+
|
|
|
+#### 4.麦克风
|
|
|
+
|
|
|
+##### 4.1开启麦克风(单次)
|
|
|
+
|
|
|
+单次录音生成一整个mp3格式,转换后返回
|
|
|
+
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "startMicrophone",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "1"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**返回值**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "startMicrophone",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "1",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+##### 4.2 结束麦克风并返回录音结果(单次)
|
|
|
+
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "stopMicrophone",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "1"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**返回值**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "stopMicrophone",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "1",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ "voiceContent": "11"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+| ------------ | -------------- | ------------------------------------------------------------- |
|
|
|
+| voiceContent | String(base64) | 使用麦克风说话返回的结果,原始数据为采样率16K,采样位宽16bit的mp3。mp3-->byte\[]-->base64 |
|
|
|
+
|
|
|
+##### 4.3 开启麦克风(持续),app持续发录音数据给小程序
|
|
|
+
|
|
|
+先通过my.call的startMicrophoneListener开启录音,
|
|
|
+在my.on中持续接收(只需要开启一次),
|
|
|
+最后通过my.call的stopMicrophoneListener停止录音
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+###### 4.3.1 开启麦克风监听
|
|
|
+
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "startMicrophoneListener",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "3",
|
|
|
+ "params": {
|
|
|
+ "intervalTime": 1000
|
|
|
+ }
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**请求参数**
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 | 是否必填 |
|
|
|
+| ------------ | --- | ---------------------------------- | ---------- |
|
|
|
+| intervalTime | int | 间隔多久返回语音信息,(取值范围500-2000,建议1000)毫秒 | 非必填,默认1000 |
|
|
|
+
|
|
|
+**返回值**
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "startMicrophoneListener",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "3",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
+###### 4.3.2 麦克风持续监听
|
|
|
+```javascript
|
|
|
+my.on('initMicrophoneListener',res =>{
|
|
|
+ console.log('麦克风监听',res.data)
|
|
|
+})
|
|
|
+```
|
|
|
+返回结果同——结束麦克风并返回录音结果(单次)
|
|
|
+
|
|
|
+###### 4.3.2 停止麦克风监听
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "stopMicrophoneListener",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "3"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**返回值**
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "stopMicrophoneListener",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "3",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+录音持续返回的数据,在my.on中
|
|
|
+
|
|
|
+##### 4.4麦克风录音状态
|
|
|
+
|
|
|
+当小程序崩溃,或者退出小程序时,录音可能还在继续。
|
|
|
+小程序可先通过该接口获取录音状态。如果在录音需要先停止,再开启
|
|
|
+
|
|
|
+
|
|
|
+```javascript
|
|
|
+
|
|
|
+let params = {
|
|
|
+ "action": "getMicrophoneState",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "1"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**返回值:**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "getMicrophoneState",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "1",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ "microphoneListenerState": 1,
|
|
|
+ "microphoneState": 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+| ------------ | --- | ---------------------------------- |
|
|
|
+| microphoneListenerState | int | 是否持续录音状态,1是在录音,0是不 |
|
|
|
+| microphoneState | int | 是否单次录音状态,1是在录音,0是不 |
|
|
|
+
|
|
|
+
|
|
|
+#### 5.设备信息
|
|
|
+##### 5.1开启设备信息请求
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "getDeviceInfo",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "4"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+action和event的值固定,taskId可自定义
|
|
|
+
|
|
|
+**返回值**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "getDeviceInfo",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "4",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ "sn": "设备sn",
|
|
|
+ "deviceModel": "设备型号",
|
|
|
+ "appVersion": "app版本号",
|
|
|
+ "androidVersion": "7.1.2",
|
|
|
+ "deviceIP": "192.168.1.1",
|
|
|
+ "devicedDisplay": "设备固件号"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+| -------------- | ------ | ----------- |
|
|
|
+| sn | String | 设备sn |
|
|
|
+| deviceModel | String | deviceModel |
|
|
|
+| appVersion | String | app版本号 |
|
|
|
+| androidVersion | String | Android版本号 |
|
|
|
+| deviceIP | String | 设备ip |
|
|
|
+| devicedDisplay | String | 设备固件号 |
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#### 6. 语音播报请求
|
|
|
+
|
|
|
+##### 6.1 语音播报请求
|
|
|
+
|
|
|
+```javascript
|
|
|
+
|
|
|
+let params = {
|
|
|
+ "action": "speech",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "8",
|
|
|
+ "params": {
|
|
|
+ "text": "要播报的文字内容",
|
|
|
+ "pitch": 1.0f,
|
|
|
+ "rate": 1.0f,
|
|
|
+ "speechQueue": 0
|
|
|
+ }
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+action和event的值固定,taskId可自定义
|
|
|
+**请求参数:**
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 | 是否必填 |
|
|
|
+| ----- | ------ | --------------------------------- | ---- |
|
|
|
+| text | String | 要播报的文字内容 | 必填 |
|
|
|
+| pitch | float | 设置音调,值越大声音越尖(女声),值越小则变成男声,1.0f是常规 | 非必填 |
|
|
|
+| rate | float | 设置语速,1.0f是常规 | 非必填 |
|
|
|
+| speechQueue | int | 设置当前播报是否打断上次播报。0表示播完上次才开始播当前。1表示打断上一次播报内容,播报当前 | 非必填,默认0 |
|
|
|
+
|
|
|
+
|
|
|
+**返回值:**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "speech",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "8",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
+##### 6.2 语音暂停请求
|
|
|
+
|
|
|
+```javascript
|
|
|
+
|
|
|
+let params = {
|
|
|
+ "action": "speechStop",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "8"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+action和event的值固定,taskId可自定义
|
|
|
+
|
|
|
+
|
|
|
+**返回值**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "speechStop",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "8",
|
|
|
+ "message ": "成功"
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+#### 7. 手输身份证号
|
|
|
+
|
|
|
+##### 7.1 手输身份证号
|
|
|
+
|
|
|
+```javascript
|
|
|
+
|
|
|
+let params = {
|
|
|
+ "action": "enterIDNumber",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "9"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**返回值:**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "enterIDNumber",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "9",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ "idNum": "410922199611150054",
|
|
|
+ "alipayUid": "2088132815051624",
|
|
|
+ "code": 1000,
|
|
|
+ "extInfo": "{\"authCode\":\"\"}",
|
|
|
+ "ftoken": "fp1142504423f1f6fa7a618313e23919h60",
|
|
|
+ "isvResult": true,
|
|
|
+ "subCode": "OK_SUCCESS",
|
|
|
+ "subMessage": "SUCCESS",
|
|
|
+ "vid": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+超时返回,message返回手输证件号超时
|
|
|
+取消返回,message返回取消手输证件号
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#### 8. 小票打印机小程序
|
|
|
+
|
|
|
+##### 8.1 小票打印机小程序
|
|
|
+
|
|
|
+```javascript
|
|
|
+
|
|
|
+let params = {
|
|
|
+ "action": "receiptPrinting",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "10",
|
|
|
+ "params": {
|
|
|
+ "printList": [{
|
|
|
+ "text": "测试文字打印",
|
|
|
+ "textSize": 26,
|
|
|
+ "bold": false,
|
|
|
+ "algin": "left"
|
|
|
+ }, {
|
|
|
+ "imageBase64": "测试图片打印,实际传入base64图片值/9j/4AAQSkZJRgABAgAAAQABABntRS5Sj//",
|
|
|
+ "width": 376,
|
|
|
+ "height": 376
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+action和event的值固定,taskId可自定义
|
|
|
+
|
|
|
+**请求参数:**
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 | 是否必填 |
|
|
|
+| ----------- | ------- | -------------------------------------------- | ---- |
|
|
|
+| text | String | 打印的文字内容,默认"" | 必填 |
|
|
|
+| textSize | int | 字体大小,默认26 | 必填 |
|
|
|
+| bold | Boolean | 是否加粗,默认false | 必填 |
|
|
|
+| algin | String | 对齐方式,默认left,left -左对齐 center -居中 right -右对齐 | 必填 |
|
|
|
+| imageBase64 | String | Base64图片,不需要前缀,默认"" | 必填 |
|
|
|
+| width | String | 图片宽度尺寸,默认376(为8的倍数) | 必填 |
|
|
|
+| height | String | 图片高度尺寸,默认376(为8的倍数) | 必填 |
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+**返回值:**
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "receiptPrinting",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "10",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+#### 9. 小程序超时
|
|
|
+##### 9.1 小程序超时
|
|
|
+
|
|
|
+在app.js中的onLaunch中写
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.on('ampeOperationTimeout', e => {
|
|
|
+console.log("小程序超时", e);
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+然后在需要倒计时的地方去发送ampeStartOperationWatcher指令
|
|
|
+```javascript
|
|
|
+my.call('ampeStartOperationWatcher', {}, res => {
|
|
|
+ console.log(res)
|
|
|
+});
|
|
|
+```
|
|
|
+
|
|
|
+超时时间配置,需要进app的设置,输入密码,功能配置,里面可以配置时间,默认30秒。
|
|
|
+如果不需要该超时功能,设置0即可。
|
|
|
+设置完时间后,设备重启,以便配置生效
|
|
|
+
|
|
|
+
|
|
|
+#### 10. 红外感应
|
|
|
+
|
|
|
+先通过my.call的startInfraredInductionListener开启红外感应,
|
|
|
+在my.on中持续接收(只需要开启一次),
|
|
|
+最后通过my.call的stopInfraredInductionListener停止红外感应
|
|
|
+
|
|
|
+
|
|
|
+##### 10.1 开启红外感应监听
|
|
|
+
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "startInfraredInductionListener",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "3",
|
|
|
+ "params": {
|
|
|
+ "intervalTime": 3000
|
|
|
+ }
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**请求参数**
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 | 是否必填 |
|
|
|
+| ------------ | --- | ---------------------------------- | ---------- |
|
|
|
+| intervalTime | int | 间隔多久返回红外感应信息,(取值范围2000-5000,建议3000)毫秒 | 非必填,默认3000 |
|
|
|
+
|
|
|
+**返回值**
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "startInfraredInductionListener",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "3",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+
|
|
|
+##### 10.2 红外感应持续监听
|
|
|
+```javascript
|
|
|
+my.on('initInfraredInductionListener',res =>{
|
|
|
+ console.log('红外感应监听',res.data)
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**返回值**
|
|
|
+```
|
|
|
+ {"inductionCode":"1"}
|
|
|
+```
|
|
|
+
|
|
|
+| 字段 | 类型 | 说明 |
|
|
|
+| ------------ | --- | ---------------------------------- |
|
|
|
+| inductionCode | int | 1是代表感应到有人,0是未感应到 |
|
|
|
+
|
|
|
+##### 10.3 停止红外感应监听
|
|
|
+```javascript
|
|
|
+let params = {
|
|
|
+ "action": "stopInfraredInductionListener",
|
|
|
+ "event": "open",
|
|
|
+ "taskId": "3"
|
|
|
+}
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ //todo
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+**返回值**
|
|
|
+```javascript
|
|
|
+my.call("ampeHHCommunication", params, (res)=>{
|
|
|
+ console.log(res)
|
|
|
+ /**** todo
|
|
|
+ {
|
|
|
+ "action": "stopInfraredInductionListener",
|
|
|
+ "event": "open",
|
|
|
+ "success": true,
|
|
|
+ "taskId": "3",
|
|
|
+ "message ": "成功",
|
|
|
+ "data": {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ****/
|
|
|
+})
|
|
|
+```
|
|
|
+
|
|
|
+红外感应持续返回的数据,在my.on中
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+# 调试运行常见问题
|
|
|
+## 如何判断小程序运行在AMPE 设备上还是手机端
|
|
|
+
|
|
|
+```javascript
|
|
|
+my.getSystemInfo({
|
|
|
+ success: (res) => {
|
|
|
+ // 判断获取设备系统信息中arome.deviceId参数是否为空
|
|
|
+ if (res.arome_deviceId != null) {
|
|
|
+ //todo 设置信标,当前为 ampe 设备
|
|
|
+ //todo 获取用户信息
|
|
|
+ my.call(...)
|
|
|
+ }else{
|
|
|
+ //todo 设置信标,当前为手机端
|
|
|
+ //todo 获取用户信息
|
|
|
+ my.getAuthCode({
|
|
|
+ scopes: 'auth_user',
|
|
|
+ success: res => {
|
|
|
+ const authCode = res.authCode;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fail: (err) => {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ })
|
|
|
+```
|
|
|
+
|
|
|
+**获取设备参数(包含设备号、当前小程序运行环境)**
|
|
|
+
|
|
|
+ my.getSystemInfo({
|
|
|
+ success: (res) => {
|
|
|
+ console.log(res);
|
|
|
+ },
|
|
|
+ fail: (err) => {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+success结果
|
|
|
+
|
|
|
+ {
|
|
|
+ "apiLevel": 31,
|
|
|
+ "app": "alipay",
|
|
|
+ "appMode": "normal",
|
|
|
+ "bluetoothEnabled": false,
|
|
|
+ "bluetoothAuthorized": true,
|
|
|
+ "brand": "Redmi",
|
|
|
+ "cameraAuthorized": true,
|
|
|
+ "currentBattery": "46%",
|
|
|
+ "fontSizeSetting": 16,
|
|
|
+ "isIphoneXSeries": false,
|
|
|
+ "language": "zh-Hans",
|
|
|
+ "locationAuthorized": true,
|
|
|
+ "locationEnabled": true,
|
|
|
+ "microphoneAuthorized": false,
|
|
|
+ "model": "Xiaomi M2012K11AC",
|
|
|
+ "notificationAuthorized": true,
|
|
|
+ "overlayAuthorized": false,
|
|
|
+ "performance": "high",
|
|
|
+ "pixelRatio": 2.75,
|
|
|
+ "platform": "Android",
|
|
|
+ "screen": {
|
|
|
+ "height": 828,
|
|
|
+ "width": 393
|
|
|
+ },
|
|
|
+ "screenHeight": 2276,
|
|
|
+ "screenWidth": 1080,
|
|
|
+ "statusBarHeight": 30,
|
|
|
+ "storage": "242 GB",
|
|
|
+ "system": "12",
|
|
|
+ "titleBarHeight": 48,
|
|
|
+ "transparentTitle": false,
|
|
|
+ "version": "10.3.50.8100",
|
|
|
+ "wifiEnabled": false,
|
|
|
+ "windowHeight": 725,
|
|
|
+ "windowWidth": 393
|
|
|
+ }
|
|
|
+
|
|
|
+以上每个参数含义,参考
|
|
|
+<https://opendocs.alipay.com/mini/api/system-info>
|
|
|
+中的success 回调函数
|
|
|
+
|
|
|
+## 运行命令后提示——移动应用未绑定该小程序
|
|
|
+
|
|
|
+1.先必须有个正式版
|
|
|
+2.有正式版后,就可以用文档里的小程序调试代码进行真机预览
|
|
|
+
|
|
|
+## 运行命令后提示——业务请求失败:设备不存在
|
|
|
+
|
|
|
+检查sn有没有错,再检查sn是否有进件授权,@xinxin 授权
|
|
|
+
|
|
|
+
|
|
|
+## 运行命令后提示——移动应用未关联设备产品
|
|
|
+一般是命令输错,有空格啥的,仔细检查下
|
|
|
+
|
|
|
+
|
|
|
+## 真机调试无反应
|
|
|
+
|
|
|
+minidev真机调试是有这个毛病,我们自己调试时也经常遇到,发现最好的解决办法是,重启设备且进入小程序,新增一个终端,再minidev login 登陆一下,再执行真机调试 minidev remote
|
|
|
+
|
|
|
+minidev这两个命令,需要进入小程序后,新增一个终端运行,才能生效
|
|
|
+
|
|
|
+还不行的话。再尝试以下
|
|
|
+关掉开发者工具,重新打开
|
|
|
+换好点的wifi
|
|
|
+
|
|
|
+## 小程序启动后——进度卡在99%,或页面提示“该小程序已暂停服务”
|
|
|
+
|
|
|
+首先检查网络
|
|
|
+
|
|
|
+<https://open.alipay.com/>
|
|
|
+进开放平台查一下,是不是把小程序暂停了
|
|
|
+检查小程序类型,不支持支付宝iot小程序,必须是支付宝小程序才行
|
|
|
+
|
|
|
+## 页面提示ampe启动失败
|
|
|
+
|
|
|
+提供sn号,@xinxin检查进件和配置。
|
|
|
+若已经进件和配置,查看iot相关的所有安装包(含小程序引擎)是否都已经安装
|
|
|
+
|
|
|
+## 小程序运行后,卡在小程序服务引擎界面
|
|
|
+
|
|
|
+停在小程序服务引擎界面的话要技术支持查一下,一般都是网络状态不好再重新拉要打开的小程序运行包
|
|
|
+
|
|
|
+## 调试时,刷脸提示“点击过快”
|
|
|
+
|
|
|
+点击过快可能是由于反复真机预览造成的,反复初始化刷脸。建议重启设备
|
|
|
+
|
|
|
+## 刷脸提示“关闭服务时找不到当前任务(E69016)”
|
|
|
+
|
|
|
+一般是刷脸未初始化成功,就调用刷脸
|
|
|
+建议在 app.js 的onLaunch 钩子里执行一次初始化即可(若失败,可以执行 3s 再次尝试初始化操作)
|
|
|
+
|
|
|
+
|
|
|
+## 刷脸初始化失败。Message提示E69015
|
|
|
+点击设备上的IoT,查看smile。一般是smile未安装
|
|
|
+如果没有,联系厂商人员安装下
|
|
|
+
|
|
|
+
|
|
|
+## 刷脸初始化成功,但是没有唤起刷脸页面
|
|
|
+
|
|
|
+1.一般是网络连接问题,建议在小程序页面上增加网络监听提示,方便排查原因
|
|
|
+2.启动时的小程序调用了各类刷脸、获取设备信息等初始化指令,再运行mindev调试命令,调试小程序就不会再收到上述的返回结果。解决方案就是启动一个不会各类初始化指令的小程序,再运行调试小程序
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+## 刷脸获取用户信息
|
|
|
+
|
|
|
+刷脸成功后,会返回authcode,然后再去调用支付宝接口获取用户信息
|
|
|
+
|
|
|
+## 刷脸后一直刷脸
|
|
|
+
|
|
|
+提供sn号,@xinxin检查配置,看看是否场景配置政务。
|
|
|
+
|
|
|
+## 刷脸后无反应
|
|
|
+
|
|
|
+看下刷脸getFaceInfo结果是否有返回。如果有返回,但刷脸失败success为false,展示message
|
|
|
+
|
|
|
+## 刷脸获取用户信息提示——获取支付宝AccessToken失败\:Invalid Arguments,调用接口的应用标识(app\_id)与令牌授权的应用不相符
|
|
|
+
|
|
|
+需要开发商自己申请带有三要素权限
|
|
|
+<https://opendocs.alipay.com/open/a74a7068_alipay.user.info.share?pathHash=af2476d4>
|
|
|
+
|
|
|
+如已经提供,@xinxin进行配置和检查
|
|
|
+要检查下公私钥是不是这个appid下
|
|
|
+
|
|
|
+
|
|
|
+如果已经配置,且平常使用ok,偶现后,重启可以。那就需要替换成smile6.1.0.2455
|
|
|
+
|
|
|
+### 支付宝接口获取用户信息接口
|
|
|
+
|
|
|
+需要开发商自己申请带有用户信息三要素权限
|
|
|
+<https://opendocs.alipay.com/open/a74a7068_alipay.user.info.share?pathHash=af2476d4>
|
|
|
+
|
|
|
+## 刷脸失败
|
|
|
+
|
|
|
+返回系统异常(E69001),检查smile版本,建议6.1.0
|
|
|
+
|
|
|
+## 刷脸授权框出现HHK8
|
|
|
+由merchantAppid小程序名称决定,检查startBasspass入参
|
|
|
+当merchantAppid 为空时,会拿初始化用的刷脸应用 appid 的三要素权限,应该是配置问题
|
|
|
+
|
|
|
+## 进入小程序出现扫码授权弹框
|
|
|
+这个扫码弹框,不是我们app端弹出的
|
|
|
+是支付宝小程序引擎和ampe弹出的,具体由@去央解决处理
|
|
|
+支付宝技术反馈是触发了my.getauthcode
|
|
|
+
|
|
|
+
|
|
|
+## 小程序更新
|
|
|
+
|
|
|
+小程序更新后,在设备上进入小程序,会有更新弹框,然后工作人员点击更新就行
|
|
|
+
|
|
|
+## 小程序出错排查日志
|
|
|
+
|
|
|
+1.iot和小程序引擎等apk已安装,且已进件和配置
|
|
|
+2.安装下debug的apk版本
|
|
|
+3.进入小程序,右上角会有三个小圆点,长按,进入日志上传页面,点确定就行,然后拍下日志ID
|
|
|
+4.@对接群中的支付宝技术支持进行排查
|
|
|
+
|
|
|
+## HHarome仅提供刷脸、刷证等硬件功能,小程序操作后出现不符合预期的页面,请先联系小程序开发技术
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|