Online customer service SDK, supporting multiple frameworks:
<!-- bytedesk.com -->
<script src="https://www.weiyuai.cn/embed/bytedesk-web.js"></script>
<script>
const config = {
chatPath: '/chat', // default: /chat, thread history: /chat/thread
placement: 'bottom-right',
theme: {
backgroundColor: '#0066FF',
textColor: '#ffffff'
},
chatConfig: {
org: 'df_org_uid',
t: '2',
sid: 'df_rt_uid'
}
};
const bytedesk = new BytedeskWeb(config);
bytedesk.init();
</script>
/chat/thread)Set chatPath to /chat/thread to open the visitor history thread page when clicking the icon or calling showChat().
const config = {
chatPath: '/chat/thread',
chatConfig: {
org: 'df_org_uid',
t: '1',
sid: 'df_wg_uid',
visitorUid: 'visitor_001',
nickname: 'Visitor',
avatar: 'https://weiyuai.cn/assets/images/avatar/02.jpg'
}
};
Direct URL usage (same params as /chat):
https://cdn.weiyuai.cn/chat/thread?org=df_org_uid&t=1&sid=df_wg_uid&visitorUid=visitor_001&nickname=Visitor&avatar=https%3A%2F%2Fweiyuai.cn%2Fassets%2Fimages%2Favatar%2F02.jpg&lang=en&mode=light