<div ID="WebChatButtonD" onclick="開啟WebChat的function"></div><div id="WebChatDialog"></div>
|
interface IBotChatUIConfig {
botId: string,
botName: string,
userId: string,
userName: string,
botChatIconUrl: string, //下方機器人的圖示
chatTitle: string, // WebChat Header 的文字
directLineOptions: any, //DirectLine 的設定
locale: string, //語系
showWebChatButton: boolean // 是否顯示下方的機器人圖示
}
|
<!-- chatbot -->
<link href="Botchat/CSS/botchat.css" rel="stylesheet" />
<link href="Botchat/CSS/botchat-fullwindow.css" rel="stylesheet" />
<link href="Botchat/CSS/botchatCustom.css" rel="stylesheet" />
<script src="Botchat/Scripts/botchat-es5.js"></script>
<script src="Botchat/Scripts/BotChatUI.js"></script>
<script>
var botChatUI = new BotChatUI({
botId: 'RainmakerBot',
botName: '小亂機器人',
userId: 'Rainmaker',
userName: '亂馬客',
chatTitle: '小亂機器人, 按我可縮小',
locale: 'zh-tw',
directLineOptions: {
secret: '',
token: '',
domain: 'http://localhost:3000/directline/gssbot',
pollingInterval: 1000,
webSocket: false
},
botChatIconUrl: 'https://avatars2.githubusercontent.com/u/11240907?s=400&u=597a9c2ae536885dae848ed245dc2dfb591a8c28&v=4',
showWebChatButton: true
});
</script>
<!-- chatbot -->
|