customer-service-system
v1.0.3
Published
A customizable customer service system UI component
Downloads
6
Readme
客服系统
js实现客服系统,不使用框架,导出umd格式文件,文件名customer-service-system.js,导出默认函数名为customService
功能
- 客服弹窗,
- 客服列表
- 客服分类
域名切换
- 通过路径上的参数来切换域名,默认域名是customer.bitbrowser.net,当路径上有browser911=true时域名切换为customer.911browser.net
- 调用时通过props参数切换,当props.browser911为布尔值true时,域名切换为customer.911browser.net;当props.browser911为域名时,则切换为props.browser911的值;
使用方法
1. 传统项目
1. 下载文件,将文件放入项目中,在html文件中引入文件,使用方法如下:
2. 引入文件,使用方法如下:
<script src="./customer-service-system.js"></script>
使用方法
<script>
customService({
projectId: 'xxx', // 项目ID,必填
lang: 'en', // 语言,默认en
})
</script>2. vue项目
1. npm下载文件
npm install customer-service-system
2. 在main.js文件中引入文件,使用方法如下:
import customService from './customer-service-system.js'
使用方法
customService({
projectId: 'xxx', // 项目ID,必填
lang: 'en', // 语言,默认en
})参数说明
type: "", // 1.客服 2.商务合作 3.投诉建议
count: "", // 客服数量
projectId: "2e64b8e0d65b4c0d7cd8d84bb36c5e57", // 项目ID
lang: "en",
zIndex: 9999, // 层级
isApp: false, // 是否是APP
groupTypes: 'SocialMedia,WeChat,Telegram', // SocialMedia:社交媒体, EnterpriseWeChat:企业微信, EnterpriseWeChat_en:企业微信(英), WeChat:微信, WeChat_en:微信(英), OfficialAccounts:公众号, OfficialAccounts_en:公众号(英), Telegram:Telegram, Telegram_en:Telegram(英), WhatsApp: WhatsApp, WhatsApp_en: WhatsApp(英)
position: "right-bottom", // 位置 left-top left-bottom right-top right-bottom
customPosition: { // 自定义位置
top: "100px",
left: "10px",
bottom: "100px",
right: "100px",
},