0.0.1 • Published 6 months ago

gazo-call-client v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago
<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>
0.0.1

6 months ago