<template>
|
<div>
|
<div class="remote-container"></div>
|
</div>
|
</template>
|
|
<script>
|
import DUIX from 'duix-guiji-light'
|
import {getDuixSign} from "../../api/dialogue";
|
import * as pptTemplateApi from "../../api/pptTemplate";
|
|
export default {
|
name: "index"
|
}
|
const tempConversationId ='dev-'+ Math.random().toString(36).substring(2, 11);
|
const duix = new DUIX()
|
|
getDuixSign().then(res => {
|
if (res.code === 200) {
|
duix.init({
|
sign: res.data.sign,
|
containerLable: '.remote-container',
|
conversationId: tempConversationId,
|
})
|
}
|
})
|
duix.on('getDuixSign', () => {
|
// start session
|
duix.start({
|
conversationId: tempConversationId,
|
openAsr: true
|
}).then(res => {
|
console.info(res)
|
})
|
})
|
</script>
|
|
<style scoped>
|
.remote-container{
|
width: 500px;
|
height: 500px;
|
}
|
</style>
|