0.0.9 • Published 3 years ago

js-face-plugin v0.0.9

Weekly downloads
9
License
ISC
Repository
-
Last release
3 years ago

js-face-plugin

使用方式

script引入

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/js-face-plugin@版本号/dist/main.css">
<script src="https://cdn.jsdelivr.net/npm/js-face-plugin@版本号/dist/js-face-plugin.bundle.js"></script>

<script>
new GDFace.BDFace({
  el: '#face', // 挂载的dom
  access_token: '51aa3297-477f-47e3-84a1-4b5635db6ec7', // 认证平台token
  auth_id: '23345678929', // 流程id
  // 认证成功的回调
  success: function (res) {
    console.log('success: ', res)
  },
  // 失败的回调
  error: function (error) {
    console.log('error: ', error)
  }
})
</script>

npm 引入

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/js-face-plugin@版本号/dist/main.css">
import GDFace from 'js-face-plugin'

// 以vue为例
export default {
  mounted() {
    new GDFace.BDFace({
      el: "#face",
      access_token: "51aa3297-477f-47e3-84a1-4b5635db6ec7",
      auth_id: "23345678929",
      success: function (res) {
        console.log("success: ", res);
      },
      error: function (error) {
        console.log("error: ", error);
      },
    });
  },
}
0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.4

3 years ago

0.0.1

3 years ago