更新记录
1.0.1(2026-01-16) 下载此版本
增加ocr
1.0.0(2026-01-16) 下载此版本
安卓tencent-face
平台兼容性
uni-app(4.87)
| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|
| - | - | - | - | - | - | - | - | - |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|
| - | - | - | - | - | - | - | - | - | - | - |
uni-app x(4.87)
| Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
|---|---|---|---|---|---|
| × | × | 7.0 | × | × | × |
tencent-face
开发文档
UTS 语法 UTS API插件 UTS uni-app兼容模式组件 UTS 标准模式组件 Hello UTS
import { initSdk, InputDataObj } from "@/uni_modules/tencent-face";
export default {
data() {
return {
}
},
methods: {
button_click() {
//
let p : InputDataObj = {
faceId: resdata?.getString("faceId","") as string,
orderNo: resdata?.getString("orderNo","") as string,
appId: resdata?.getString("appId","") as string,
nonce: resdata?.getString("nonce","") as string,
userId: resdata?.getString("userId","") as string,
sign: resdata?.getString("sign","") as string,
licence: resdata?.getString("keyLicence","") as string,
};
this.startsdk(p)
},
startsdk(p:InputDataObj){
initSdk({
param: p,
success(res) {
console.log(res)
},
fail(res) {
uni.showToast({
title: '' + res,
icon: 'none'
});
}
})
},
}
}
ocr 参数
import { ocrInitSdk,OCRInputDataObj} from "@/uni_modules/tencent-face";
let p : OCRInputDataObj = {
orderNo: resdata?.getString("orderNo","") as string,
appId: resdata?.getString("appId","") as string,
nonce: resdata?.getString("nonce","") as string,
userId: resdata?.getString("userId","") as string,
sign: resdata?.getString("sign","") as string,
side: 2 as number//身份证 1正面 2-反面 3-连续
};
this.startocr(p)
startocr(p:OCRInputDataObj){
ocrInitSdk({
param: p,
success(res) {
console.log(res)
},
fail(res) {
uni.showToast({
title: '' + res,
icon: 'none'
});
}
})
}

收藏人数:
下载插件并导入HBuilderX
赞赏(0)
下载 1
赞赏 0
下载 13352350
赞赏 1845
赞赏
京公网安备:11010802035340号