<template>
  <div id="app">
    <yb-cti></yb-cti>
    <button @click="callOut">发起外呼</button>
  </div>
</template>

<script>
export default {
  name: 'App',
  mounted() {
    let params = {
      requestId:'request001',
      channelId:'10001',
      accessToken:'',
      account:'ybbx006',
      secretKey:'1GzXxojW0YTFKy5lZ7ILsQJ9evDnBAHt'
    }
    window.ybcti.initCTI(params).then((res)=>{
      console.log(res)
    })
  },
  methods:{
    callOut(){
      console.log('我是外呼')
      window.ybcti.callOut({customId:'3320536',callMode:1}).then((res)=>{
        console.log(res)
      })
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
* {
  padding: 0;
  margin: 0;
}
</style>
