链接视频跳转
This commit is contained in:
+6
-2
@@ -1,7 +1,7 @@
|
|||||||
import axios from "@/utils/request";
|
import axios from "@/utils/request";
|
||||||
let baseUrlZc = 'https://api.xayunmei.com/zhongcaiapi';
|
let baseUrlZc = 'https://api.xayunmei.com/zhongcaiapi';
|
||||||
let baseUrl = 'https://api.xayunmei.com/tiaojieapitest';
|
let baseUrl = 'https://api.xayunmei.com/tiaojieapi';
|
||||||
// let baseUrl = 'http://121.40.189.20:6001';
|
// let baseUrl = 'http://172.16.1.4:6001';
|
||||||
// 获取usersig
|
// 获取usersig
|
||||||
export function getUsersig(userId) {
|
export function getUsersig(userId) {
|
||||||
let appType = sessionStorage.getItem('type');
|
let appType = sessionStorage.getItem('type');
|
||||||
@@ -30,3 +30,7 @@ export function reserveConferenceList(caseId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//根据id查询密文信息
|
||||||
|
export function getEncryptInfoByid(caseId) {
|
||||||
|
return axios.get(`${baseUrl}/shortMessage/getMeetingInfo?authId=${caseId}`);
|
||||||
|
}
|
||||||
+31
-10
@@ -8,7 +8,12 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input placeholder="请输入房间号" v-model="enterRoomFrom.roomId">
|
<el-input placeholder="请输入房间号" v-model="enterRoomFrom.roomId">
|
||||||
<template slot="append">
|
<template slot="append">
|
||||||
<el-button type="primary" @click="enterRoom" icon="el-icon-right">进入</el-button>
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="enterRoom"
|
||||||
|
icon="el-icon-right"
|
||||||
|
>进入</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -19,7 +24,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { reserveConferenceList } from "@/api/home.js";
|
import { reserveConferenceList, getEncryptInfoByid } from "@/api/home.js";
|
||||||
import TRTC from "trtc-sdk-v5";
|
import TRTC from "trtc-sdk-v5";
|
||||||
let trtc = null;
|
let trtc = null;
|
||||||
export default {
|
export default {
|
||||||
@@ -33,10 +38,17 @@ export default {
|
|||||||
userCode: null,
|
userCode: null,
|
||||||
caseId: null,
|
caseId: null,
|
||||||
roleFlag: false,
|
roleFlag: false,
|
||||||
token:""
|
token: "",
|
||||||
|
queryObj: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**获取链接参数 */
|
||||||
|
async getEncryptInfoByidFn(data) {
|
||||||
|
await getEncryptInfoByid(data).then((res) => {
|
||||||
|
this.queryObj = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
async enterRoom() {
|
async enterRoom() {
|
||||||
// if (this.roomId != this.enterRoomFrom.roomId) {
|
// if (this.roomId != this.enterRoomFrom.roomId) {
|
||||||
// this.$message({
|
// this.$message({
|
||||||
@@ -53,16 +65,16 @@ export default {
|
|||||||
flag: this.roleFlag,
|
flag: this.roleFlag,
|
||||||
caseId: this.caseId,
|
caseId: this.caseId,
|
||||||
id: this.userCode,
|
id: this.userCode,
|
||||||
token: this.token
|
token: this.token,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitRoom() {
|
submitRoom() {
|
||||||
this.$refs["formLabelAlign"].validate(valid => {});
|
this.$refs["formLabelAlign"].validate((valid) => {});
|
||||||
},
|
},
|
||||||
// 根据案件id查询主持人信息
|
// 根据案件id查询主持人信息
|
||||||
async reserveConferenceListFn(data) {
|
async reserveConferenceListFn(data) {
|
||||||
await reserveConferenceList(data).then(res => {
|
await reserveConferenceList(data).then((res) => {
|
||||||
if (res.data.length >= 1) {
|
if (res.data.length >= 1) {
|
||||||
if (this.userCode == res.data[0].userId) {
|
if (this.userCode == res.data[0].userId) {
|
||||||
this.roleFlag = true;
|
this.roleFlag = true;
|
||||||
@@ -73,15 +85,24 @@ export default {
|
|||||||
this.roleFlag = false;
|
this.roleFlag = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
let routeParams = this.$route.query;
|
let routeParams = this.$route.query;
|
||||||
|
await this.getEncryptInfoByidFn(routeParams.authId);
|
||||||
|
if (routeParams.authId) {
|
||||||
|
this.userId = this.queryObj.userName;
|
||||||
|
this.roomId = this.queryObj.roomId;
|
||||||
|
this.userCode = this.queryObj.userId;
|
||||||
|
this.caseId = this.queryObj.caseId;
|
||||||
|
this.token = this.queryObj.token;
|
||||||
|
} else {
|
||||||
this.userId = routeParams.name;
|
this.userId = routeParams.name;
|
||||||
this.roomId = routeParams.roomId;
|
this.roomId = routeParams.roomId;
|
||||||
this.userCode = routeParams.userId;
|
this.userCode = routeParams.userId;
|
||||||
this.caseId = routeParams.id;
|
this.caseId = routeParams.id;
|
||||||
this.token = routeParams.token;
|
this.token = routeParams.token;
|
||||||
|
}
|
||||||
if (this.caseId) {
|
if (this.caseId) {
|
||||||
await this.reserveConferenceListFn(this.caseId);
|
await this.reserveConferenceListFn(this.caseId);
|
||||||
await this.enterRoom();
|
await this.enterRoom();
|
||||||
@@ -89,10 +110,10 @@ export default {
|
|||||||
trtc = TRTC.create();
|
trtc = TRTC.create();
|
||||||
const config = {
|
const config = {
|
||||||
view: document.getElementById("video"),
|
view: document.getElementById("video"),
|
||||||
publish: false
|
publish: false,
|
||||||
};
|
};
|
||||||
await trtc.startLocalVideo(config);
|
await trtc.startLocalVideo(config);
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user