Jump to content
IPS Community Suite 简体中文

Search the Community

Showing results for tags 'heartbeat'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Public docs
  • Server Softwares
    • IPS
    • WordPress
  • 其它
    • Scratch
    • Python
    • Ubuntu & LinuxMint
    • Softwares
    • WordPress Plugins

Blogs

  • Dev

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. 引入PHP脚本 wp_enqueue_script( 'heartbeat' ); wp_register_script('acg-faceid', FACE_ID_PLUGIN_URL . 'assets/js/faceid-0.9.js',array('jquery','heartbeat' ),false,true); Jq $(document).on('heartbeat-send', function(event, data) { data.acg_faceid = { 'uid': faceId.uid }; console.log(data); }); $(document).on('heartbeat-tick', function(event, data) { console.log('心跳响应'); if (data.acg_faceidd) { console.log(data.acg_faceidd); console.log('data.acg_faceidd.v'); console.log(data.acg_faceidd.v); if (true === data.acg_faceidd.v) { $('#acg-faceid-qr-c').remove(); $('#place_order').removeAttr('disabled'); if (wp.heartbeat.isQueued('acg_faceid')) { wp.heartbeat.dequeue('acg_faceid'); } } } }); jQ中wp.heartbeat可用的方法 connectNow: r() dequeue: w(a) disableSuspend: s() enqueue: u(a,b,c) getQueuedItem: x(a) hasConnectionError: q() hasFocus: p() interval: t(a,b) isQueued: v(a) interval 单位是秒,应在15-120之间。
×