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 🙏

© 2026 – Pkg Stats / Ryan Hefner

yb-xcti-sdk-v3

v0.0.1

Published

init

Readme

ybcti-js-sdk-v3

使用

  1. 使用呼叫中心js对接需进行请求代理转发配置,nginx代理示例:
如果您的账号为阿里云账号,并且js对接的环境为阿里云,则nginx代理配置为
location /comm {
  proxy_pass http://www.sobot.com;
  proxy_set_header Host 'www.sobot.com';
}
如果您的账号为腾讯云账号,并且js对接的环境为腾讯云,则nginx代理配置为
location /comm {
  proxy_pass http://www.soboten.com;
  proxy_set_header Host 'www.soboten.com';
}
  1. 需按照示例顺序分别引用四个js文件 (如您项目中已经引用了jquery以及jquery.json-2.4以上的版本,则无需引用这两个文件),文件引用位置为您页面的 body 标签内部。
阿里云账号对接示例如下:
<script src="https://www.sobot.com/paas/component/common/jquery.min.js"></script>
<script src="https://www.sobot.com/paas/component/common/jquery.json-2.4.min.js"></script>
<script src="https://www.sobot.com/paas/component/common/verto-min-1.1.js"></script>
<script src="https://www.sobot.com/paas/component/plugin/call_1.8.js"></script>
腾讯云账号对接示例如下:
<script src="https://www.soboten.com/paas/component/common/jquery.min.js"></script>
<script src="https://www.soboten.com/paas/component/common/jquery.json-2.4.min.js"></script>
<script src="https://www.soboten.com/paas/component/common/verto-min-1.1.js"></script>
<script src="https://www.soboten.com/paas/component/plugin/call_1.8.js"></script>

安装

通过npm进行安装

npm install yb-xcti-sdk-v3 -S

引用

// 在main.js文件中
import YBCTI from 'yb-xcti-sdk-v3';
Vue.use(YBCTI);
<!-- vue组件中 -->
<phone-bar
  :seat-info="seatInfo"
  environment="test"
  @ServNumShow="ServNumShow"
/>

参数说明

seatInfo

参数 | 类型 | 是否必选 | 描述 | :-: | :-: | :-: | :-: | requestId | String | 是 | 请求ID channelId | String | 是 | 合作渠道 ID accessToken | String | 是 |客户端接入 Token account | String | 是 |用户标识 secretKey | String | 是 |密钥 actionType | String | 是 |接口类型 securityType | 'aes' | 是 |加密方式 actionTime | 时间戳 | 是 |时间 data | String | 是 |加密账号

environment环境变量,默认值为'production',测试环境使用 'test',生产环境使用 'production'。

ServNumShow

methods: {
    // 获取外显号码,string类型,为空时不显示
    ServNumShow(ServNum) {
      console.log(ServNum)
    }
}

支持环境

  • 推荐使用chrome浏览器

开始

坐席操作

外呼

外呼使用示例

// callback 成功回调函数
// errorCallback  错误回调函数
window.ybcti.callOut(params, callback, errorCallback)

参数对象params

参数 | 类型 | 是否必选 | 描述 | :-: | :-: | :-: | :-: | customId | String | 是 | 线索Id | callMode | Number | 是 | 1、 自动号码外呼(推荐)3、 使用上次呼叫号码呼叫 2、 兜底号码外呼 |

返回字段说明

参数 | 类型 | 说明 | :-: | :-: | :-: |
code | Number | 结果码 | message | String | 返回结果描述 | data | Object | callId params | Object | 外呼信息