视讯-入会-接口联调

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

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

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

Loading…
Cancel
Save