npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-qb-baidu-utils

v1.0.4

Published

## Getting started

Downloads

10

Readme

react-native-qb-baidu-utils

Getting started

$ npm install react-native-qb-baidu-utils --save

Mostly automatic installation

$ react-native link react-native-qb-baidu-utils

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-qb-baidu-utils and add RNReactNativeBaiduLiveDetect.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNReactNativeBaiduLiveDetect.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNBaiduUtilsPackage; to the imports at the top of the file
  • Add new RNBaiduUtilsPackage() to the list returned by the getPackages() method
  • problem add react-native.config.js
    const path = require('path')
    module.exports = {
    dependencies: {
    	'react-native-qb-baidu-utils': {
    	platforms: {
    		android: null, // disable Android platform, other platforms will still autolink if provided
    	},
    	// root: path.join(__dirname, 'node_modules/react-native-qb-baidu-utils'),//注意,不能用相對路徑
    	},
    },
    }
  1. Append the following lines to android/settings.gradle:

    include ':react-native-qb-baidu-utils'
    project(':react-native-qb-baidu-utils').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-qb-baidu-utils/android')
    
    include 'faceplatform-release'
    project(':faceplatform-release').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-qb-baidu-utils/android/faceplatform-release')
    
    include 'ocr_ui'
    project(':ocr_ui').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-qb-baidu-utils/android/ocr_ui')
    
    include 'faceplatform-ui'
    project(':faceplatform-ui').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-qb-baidu-utils/android/faceplatform-ui')  
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:

      compile project(':react-native-qb-baidu-utils')
  3. 如需使用前端活体头像功能

    <receiver android:name="com.baidu.liantian.LiantianReceiver" android:exported="false">
      <intent-filter>
        <action android:name="com.baidu.action.Liantian.VIEW" />
        <category android:name="com.baidu.category.liantian"/>
        <category android:name="android.intent.category.DEFAULT"/>
      </intent-filter>
      <intent-filter android:priority="2147483647">
        <action android:name="android.intent.action.BOOT_COMPLETED"/>
      </intent-filter>
    </receiver>
    
    <provider
      android:name="com.baidu.liantian.LiantianProvider"
      android:authorities="com.ali_live_demo.liantian.ac.provider"  //<!--将com.ali_live_demo替换成您工程的包名-->
      android:exported="true" />
    
    <service
      android:name="com.baidu.liantian.LiantianService"
      android:exported="false">
      <intent-filter>
        <action android:name="com.baidu.action.Liantian.VIEW" />
        <category android:name="com.baidu.category.liantian"/>
        <category android:name="android.intent.category.DEFAULT"/>
      </intent-filter>
    </service>
  4. 授权文件

    下载license拷贝到工程的assets目录

Windows

Read it! :D

用法

```js
import { NativeModules } from "react-native";
const FaceCheckHelper = NativeModules.RNBaiduFaceModule;
const BaiduAi = NativeModules.RNBaiduScanId;


//调起活体检测界面 返回最佳照片
FaceCheckHelper.startVerify({
}).then(req=>{
  console.log("gotoFace",req)
})

//req 数据结构
// {
// 	result:{
// 		img:{
// 			imgBase64:"",
// 			filePath:""
// 		}
// 	}
// }

//扫描身份证 front true 为正面 false 反面
//使用之前需要先验证aksk
BaiduAi.authWithAKSK(
  " ",
  " "
);

BaiduAi.scanIdCard({
	front:true
}).then(req => {
  console.log("getIDcard", req);
});

//扫描银行卡
BaiduAi.scanBankCard(obj={}).then(req => {
  console.log("getBankCard", req);
});
//req 数据结构
// {
// 	result:{
// 		img:{
// 			imgBase64:"",
// 			filePath:""
// 		},
		// data:{
		// 	result:{}
		// }
// 	}
// }
```