gazo-call-client
v0.0.1
Published
``` <template> <div> <button @click="login">登录坐席</button> <button @click="callout">打电话</button>
Downloads
3
Readme
<template>
<div>
<button @click="login">登录坐席</button>
<button @click="callout">打电话</button>
<button @click="logout">退出坐席</button>
</div>
</template>
<script setup lang="ts">
import { onMounted } from 'vue'
import { CallPhone, CMD } from './call'
const target = new CallPhone('1', '2', '3', {
serverAddress: 'xxx',
onChange(EventCode, EventData) {
console.log(EventCode, EventData)
},
})
async function init() {
await target.init()
}
function login() {
target.login()
}
function logout() {
target.logout()
}
function callout() {
target.command(CMD.PLACECALL, xxxx)
}
onMounted(async () => {
await init()
})
</script>