吉安感知网项目-前端
张含笑
2026-01-15 ebfe5dfdd321028722888a3f90559e2cf811b8cf
feat:自动呼叫
1 files modified
9 ■■■■ changed files
applications/mobile-web-view/src/appPages/voiceCallDetail/index.vue 9 ●●●● patch | view | raw | blame | history
applications/mobile-web-view/src/appPages/voiceCallDetail/index.vue
@@ -21,7 +21,7 @@
                <img :src="defaultAvatar" alt=""></img>
            </div>
        <div class="button-group">
            <button @click="requestCall" :disabled="!connected || state!=='idle'" class="btn btn-call">呼叫</button>
            <button v-if="false" @click="requestCall" :disabled="!connected || state!=='idle'" class="btn btn-call">呼叫</button>
          
            <button v-if="state==='ringing'" @click="acceptCall" class="btn btn-accept">接听</button>
            <button v-if="state==='ringing'" @click="rejectCall" class="btn btn-reject">拒绝</button>
@@ -489,6 +489,13 @@
    connectWS()
})
// 监听连接状态,连接成功后自动呼叫
watch(() => connected.value, (newVal) => {
    if (newVal && state.value === 'idle') {
        requestCall()
    }
})
  onBeforeUnmount(() => {
    cleanup(false)
    stopPing()