视讯-入会-接口联调

main
ysn 2 days ago
parent 5d2f7faf1d
commit 9594b78920
  1. 9
      src/api/videoCommunication.js
  2. 42
      src/views/videoCommunication/index.vue

@ -1,5 +1,12 @@
import request from '@/utils/request'
// 视讯-加入会议
export function postConsultationInfo(data) {
return request({
url: '/consultation/info',
method: 'post',
data
})
}
// 视讯-会议列表
export function getConsultationList(data) {
return request({

@ -9,7 +9,7 @@
<!-- 口令入会区域 -->
<div class="join-area">
<el-input
v-model="meetingCode"
v-model="room_id"
placeholder="请输入数字口令"
class="join-input"
@keyup.enter="joinMeeting"
@ -175,6 +175,7 @@
<script>
import {
postConsultationInfo,
getConsultationList,
getConsultationMeetingInfo,
} from "@/api/videoCommunication";
@ -183,7 +184,7 @@ export default {
name: "VideoPage",
data() {
return {
meetingCode: "",
room_id: "",
loading: false,
queryParams: {
page: 1,
@ -248,30 +249,27 @@ export default {
},
//
joinMeeting() {
if (!this.meetingCode.trim()) {
this.$message.warning("请输入数字口令");
if (!this.room_id.trim()) {
this.$message.warning("入会口令格式错误");
return;
}
this.loading = true;
//
// joinMeeting({ meetingCode: this.meetingCode })
// .then(() => {
// this.$message.success("");
// this.meetingCode = "";
// })
// .catch(() => {
// this.$message.error("");
// })
// .finally(() => {
// this.loading = false;
// });
//
setTimeout(() => {
this.$message.success("成功加入会议");
this.meetingCode = "";
this.loading = false;
}, 500);
postConsultationInfo({
consultation_id: 0,
from_history: 0,
room_id: this.room_id,
})
.then(() => {
this.$message.success("成功加入会议");
this.room_id = "";
})
.catch(() => {
this.$message.error("入会失败,请检查口令是否正确");
})
.finally(() => {
this.loading = false;
});
},
//

Loading…
Cancel
Save