仲裁视频会议H5

d93e90e7b1e630f75f6acfb5bfef98782a453e33bf6b00e1ff4e32dd2be11eb7.json 6.7KB

1
  1. {"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\nimport { reserveConferenceList } from '@/api/home.js';\nimport TRTC from 'trtc-sdk-v5';\nlet trtc = null;\nexport default {\n name: 'App',\n data() {\n return {\n formLabelAlign: {},\n enterRoomFrom: {},\n trtc: null,\n userId: null,\n userCode: null,\n caseId: null\n };\n },\n methods: {\n async enterRoom() {\n if (this.roomId != this.enterRoomFrom.roomId) {\n this.$message({\n message: \"房间号不是对应的房间号\",\n type: 'error'\n });\n return;\n }\n await this.$router.push({\n name: 'Room',\n query: {\n userId: this.userId,\n roomId: this.enterRoomFrom.roomId\n }\n });\n },\n submitRoom() {\n this.$refs[\"formLabelAlign\"].validate(valid => {});\n },\n // 根据案件id查询主持人信息\n reserveConferenceListFn(data) {\n reserveConferenceList(data).then(res => {\n console.log(res.data[0], \"oooooooooooo\");\n if (this.userCode == res.data[0].userId) {\n console.log(\"主持人\");\n } else {\n console.log(\"不是主持人\");\n }\n });\n }\n },\n async mounted() {\n let routeParams = this.$route.query;\n this.userId = routeParams.name;\n this.roomId = routeParams.roomId;\n this.userCode = routeParams.userId;\n this.caseId = routeParams.id;\n this.reserveConferenceListFn(this.caseId);\n trtc = TRTC.create();\n const config = {\n view: document.getElementById('video'),\n publish: false\n };\n await trtc.startLocalVideo(config);\n }\n};","map":{"version":3,"names":["reserveConferenceList","TRTC","trtc","name","data","formLabelAlign","enterRoomFrom","userId","userCode","caseId","methods","enterRoom","roomId","$message","message","type","$router","push","query","submitRoom","$refs","validate","valid","reserveConferenceListFn","then","res","console","log","mounted","routeParams","$route","id","create","config","view","document","getElementById","publish","startLocalVideo"],"sources":["src/components/homepc.vue"],"sourcesContent":["<template>\n <div class=\"homepage\">\n <div id=\"video\">\n\n </div>\n <div class=\"enterRoom\">\n <div class=\"title\">\n 仲裁会议室\n </div>\n <div class=\"enterForm\">\n <el-form :model=\"enterRoomFrom\" ref=\"enterRoomFrom\">\n <el-form-item>\n <el-input placeholder=\"请输入房间号\" v-model=\"enterRoomFrom.roomId\">\n <template slot=\"append\"><el-button type=\"primary\" @click=\"enterRoom\"\n icon=\"el-icon-right\">进入</el-button></template></el-input>\n </el-form-item>\n </el-form>\n </div>\n </div>\n </div>\n</template>\n \n<script>\nimport {reserveConferenceList} from '@/api/home.js'\nimport TRTC from 'trtc-sdk-v5';\nlet trtc = null;\nexport default {\n name: 'App',\n data() {\n return {\n formLabelAlign: {},\n enterRoomFrom: {},\n trtc: null,\n userId: null,\n userCode:null,\n caseId:null\n };\n },\n methods: {\n async enterRoom() {\n if (this.roomId != this.enterRoomFrom.roomId) {\n this.$message({\n message: \"房间号不是对应的房间号\",\n type: 'error'\n });\n return\n }\n await this.$router.push({\n name: 'Room',\n query: {\n userId: this.userId,\n roomId: this.enterRoomFrom.roomId\n }\n })\n },\n submitRoom() {\n this.$refs[\"formLabelAlign\"].validate((valid) => {\n\n })\n },\n // 根据案件id查询主持人信息\n reserveConferenceListFn(data){\n reserveConferenceList(data).then(res=>{\n console.log(res.data[0],\"oooooooooooo\");\n if(this.userCode == res.data[0].userId){\n console.log(\"主持人\");\n }else{\n console.log(\"不是主持人\");\n }\n })\n }\n },\n async mounted() {\n let routeParams = this.$route.query;\n this.userId = routeParams.name;\n this.roomId = routeParams.roomId;\n this.userCode = routeParams.userId;\n this.caseId = routeParams.id;\n this.reserveConferenceListFn(this.caseId);\n trtc = TRTC.create()\n const config = {\n view: document.getElementById('video'),\n publish: false\n }\n await trtc.startLocalVideo(config);\n },\n};\n</script>\n \n<style scoped>\n.homepage {\n width: 100%;\n height: 100vh;\n background-color: #302e2e;\n display: flex;\n align-items: center;\n justify-content: space-around;\n}\n\n#video {\n width: 40%;\n height: 50%;\n}\n\n.enterRoom {\n width: 20%;\n height: 50%;\n background-color: #1c1b1b;\n}\n\n.reservation {\n width: 20%;\n height: 50%;\n background-color: #1c1b1b;\n}\n\n.title {\n width: 100%;\n text-align: center;\n color: #3f1ab7;\n line-height: 30px;\n font-size: 18px;\n margin-bottom: 20px;\n}\n\n.enterForm {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n</style>\n \n \n "],"mappings":";AAuBA,SAAAA,qBAAA;AACA,OAAAC,IAAA;AACA,IAAAC,IAAA;AACA;EACAC,IAAA;EACAC,KAAA;IACA;MACAC,cAAA;MACAC,aAAA;MACAJ,IAAA;MACAK,MAAA;MACAC,QAAA;MACAC,MAAA;IACA;EACA;EACAC,OAAA;IACA,MAAAC,UAAA;MACA,SAAAC,MAAA,SAAAN,aAAA,CAAAM,MAAA;QACA,KAAAC,QAAA;UACAC,OAAA;UACAC,IAAA;QACA;QACA;MACA;MACA,WAAAC,OAAA,CAAAC,IAAA;QACAd,IAAA;QACAe,KAAA;UACAX,MAAA,OAAAA,MAAA;UACAK,MAAA,OAAAN,aAAA,CAAAM;QACA;MACA;IACA;IACAO,WAAA;MACA,KAAAC,KAAA,mBAAAC,QAAA,CAAAC,KAAA,KAEA;IACA;IACA;IACAC,wBAAAnB,IAAA;MACAJ,qBAAA,CAAAI,IAAA,EAAAoB,IAAA,CAAAC,GAAA;QACAC,OAAA,CAAAC,GAAA,CAAAF,GAAA,CAAArB,IAAA;QACA,SAAAI,QAAA,IAAAiB,GAAA,CAAArB,IAAA,IAAAG,MAAA;UACAmB,OAAA,CAAAC,GAAA;QACA;UACAD,OAAA,CAAAC,GAAA;QACA;MACA;IACA;EACA;EACA,MAAAC,QAAA;IACA,IAAAC,WAAA,QAAAC,MAAA,CAAAZ,KAAA;IACA,KAAAX,MAAA,GAAAsB,WAAA,CAAA1B,IAAA;IACA,KAAAS,MAAA,GAAAiB,WAAA,CAAAjB,MAAA;IACA,KAAAJ,QAAA,GAAAqB,WAAA,CAAAtB,MAAA;IACA,KAAAE,MAAA,GAAAoB,WAAA,CAAAE,EAAA;IACA,KAAAR,uBAAA,MAAAd,MAAA;IACAP,IAAA,GAAAD,IAAA,CAAA+B,MAAA;IACA,MAAAC,MAAA;MACAC,IAAA,EAAAC,QAAA,CAAAC,cAAA;MACAC,OAAA;IACA;IACA,MAAAnC,IAAA,CAAAoC,eAAA,CAAAL,MAAA;EACA;AACA"},"metadata":{},"sourceType":"module","externalDependencies":[]}