| | |
| | | <div class="button-group"> |
| | | <button @click="connectWS" :disabled="connected" class="btn btn-connect">连接WS</button> |
| | | </div> |
| | | |
| | | <!-- 头像--> |
| | | <div class="contactAvatar"> |
| | | <img :src="defaultAvatar" alt=""></img> |
| | | </div> |
| | | <div class="button-group"> |
| | | <button @click="requestCall" :disabled="!connected || state!=='idle'" class="btn btn-call">呼叫</button> |
| | | |
| | |
| | | |
| | | <script setup> |
| | | import { useRoute } from 'vue-router' |
| | | |
| | | import defaultAvatar from '@/appDataSource/appwork/defaultAvatar.svg' |
| | | const route = useRoute() |
| | | /** ✅ 你的 WS 地址前缀(后面拼 userId) */ |
| | | const WS_BASE = 'wss://wrj.shuixiongit.com/ws/chat?userId=' |
| | |
| | | <style scoped lang="scss"> |
| | | .call-container { |
| | | padding: 20px; |
| | | background-color: #f5f5f5; |
| | | min-height: 100vh; |
| | | font-family: Arial, sans-serif; |
| | | } |
| | |
| | | display: flex; |
| | | gap: 10px; |
| | | flex-wrap: wrap; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .btn { |
| | |
| | | .hidden-audio { |
| | | display: none; |
| | | } |
| | | .contactAvatar { |
| | | width: 172rpx; |
| | | height: 172rpx; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | img{ |
| | | width: 172rpx; |
| | | height: 172rpx; |
| | | } |
| | | } |
| | | </style> |