Selaa lähdekoodia

视频会议解决无法判断仲裁还是调解bug

wangqiong 2 vuotta sitten
vanhempi
commit
b1c1cde3c9

BIN
dist.zip Näytä tiedosto


+ 0
- 1
dist/css/104.edc93351.css Näytä tiedosto

@@ -1 +0,0 @@
1
-.homepage[data-v-f23aeb60]{width:100%;height:100vh;background-color:#302e2e;display:flex;align-items:center;justify-content:space-around}#video[data-v-f23aeb60]{width:40%;height:50%}.enterRoom[data-v-f23aeb60],.reservation[data-v-f23aeb60]{width:20%;height:50%;background-color:#1c1b1b}.title[data-v-f23aeb60]{width:100%;text-align:center;color:#3f1ab7;line-height:30px;font-size:18px;margin-bottom:20px}.enterForm[data-v-f23aeb60]{width:100%;display:flex;justify-content:center}.homepage[data-v-66f2b650]{width:100%;height:100vh;background-color:#302e2e;display:flex;flex-direction:column;align-items:center}#video[data-v-66f2b650]{width:90%;height:50%}.enterRoom[data-v-66f2b650]{margin-top:30px;width:90%;height:10%}.reservation[data-v-66f2b650]{width:20%;height:50%;background-color:#1c1b1b}.title[data-v-66f2b650]{width:100%;text-align:center;color:#3f1ab7;line-height:30px;font-size:18px;margin-bottom:20px}.enterForm[data-v-66f2b650]{width:100%;display:flex;justify-content:center}

+ 0
- 22
dist/css/667.3bf6bdf1.css
File diff suppressed because it is too large
Näytä tiedosto


+ 1
- 1
dist/index.html Näytä tiedosto

@@ -1 +1 @@
1
-<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>nouiroom</title><script defer="defer" src="/js/chunk-vendors.b16260de.js"></script><script defer="defer" src="/js/app.b526e971.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.b59bb92e.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but nouiroom doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
1
+<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>nouiroom</title><script defer="defer" src="/js/chunk-vendors.5307e452.js"></script><script defer="defer" src="/js/app.f09cb758.js"></script><link href="/css/chunk-vendors.10dd4e95.css" rel="stylesheet"><link href="/css/app.b59bb92e.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but nouiroom doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>

+ 0
- 2
dist/js/104.15b7bedb.js Näytä tiedosto

@@ -1,2 +0,0 @@
1
-"use strict";(self["webpackChunknouiroom"]=self["webpackChunknouiroom"]||[]).push([[104],{5104:function(e,o,t){t.r(o),t.d(o,{default:function(){return k}});var r=function(){var e=this,o=e._self._c;return o("div",{staticClass:"homepage"},[e.modileFlag?o("homepc"):e._e(),e.modileFlag?e._e():o("homePhone")],1)},s=[],i=function(){var e=this,o=e._self._c;return o("div",{staticClass:"homepage"},[o("div",{attrs:{id:"video"}}),o("div",{staticClass:"enterRoom"},[o("div",{staticClass:"title"},[e._v(" 仲裁会议室 ")]),o("div",{staticClass:"enterForm"},[o("el-form",{ref:"enterRoomFrom",attrs:{model:e.enterRoomFrom}},[o("el-form-item",[o("el-input",{attrs:{placeholder:"请输入房间号"},model:{value:e.enterRoomFrom.roomId,callback:function(o){e.$set(e.enterRoomFrom,"roomId",o)},expression:"enterRoomFrom.roomId"}},[o("template",{slot:"append"},[o("el-button",{attrs:{type:"primary",icon:"el-icon-right"},on:{click:e.enterRoom}},[e._v("进入")])],1)],2)],1)],1)],1)])])},l=[],n=(t(560),t(2268)),a=t(2799),m=t.n(a);let d=null;var u={name:"App",data(){return{formLabelAlign:{},enterRoomFrom:{},trtc:null,userId:null,userCode:null,caseId:null,roleFlag:!1}},methods:{async enterRoom(){this.roomId==this.enterRoomFrom.roomId?this.$router.push({name:"Room",query:{userId:this.userId,roomId:this.enterRoomFrom.roomId,flag:this.roleFlag,caseId:this.caseId,id:this.userCode}}):this.$message({message:"房间号不是对应案件的房间号",type:"error"})},submitRoom(){this.$refs["formLabelAlign"].validate((e=>{}))},reserveConferenceListFn(e){(0,n.Je)(e).then((e=>{this.userCode==e.data[0].userId?this.roleFlag=!0:this.roleFlag=!1}))}},async mounted(){let e=this.$route.query;this.userId=e.name,this.roomId=e.roomId,this.userCode=e.userId,this.caseId=e.id,this.caseId&&this.reserveConferenceListFn(this.caseId),d=m().create();const o={view:document.getElementById("video"),publish:!1};await d.startLocalVideo(o)}},h=u,c=t(1001),I=(0,c.Z)(h,i,l,!1,null,"f23aeb60",null),p=I.exports,v=function(){var e=this,o=e._self._c;return o("div",{staticClass:"homepage"},[o("div",{staticClass:"title"},[e._v(" 仲裁会议室 ")]),o("div",{attrs:{id:"video"}}),o("div",{staticClass:"enterRoom"},[o("el-form",{ref:"enterRoomFrom",attrs:{model:e.enterRoomFrom}},[o("el-form-item",[o("el-input",{attrs:{placeholder:"请输入房间号"},model:{value:e.enterRoomFrom.roomId,callback:function(o){e.$set(e.enterRoomFrom,"roomId",o)},expression:"enterRoomFrom.roomId"}},[o("template",{slot:"append"},[o("el-button",{attrs:{type:"primary",icon:"el-icon-right"},on:{click:e.enterRoom}},[e._v("进入")])],1)],2)],1)],1)],1)])},f=[];let F=null;var g={name:"App",data(){return{formLabelAlign:{},enterRoomFrom:{},trtc:null,userId:null,userCode:null,caseId:null,roleFlag:!1}},methods:{async enterRoom(){this.roomId==this.enterRoomFrom.roomId?this.$router.push({name:"Room",query:{userId:this.userId,roomId:this.enterRoomFrom.roomId,flag:this.roleFlag,caseId:this.caseId}}):this.$message({message:"房间号不是对应案件的房间号",type:"error"})},submitRoom(){this.$refs["formLabelAlign"].validate((e=>{}))},reserveConferenceListFn(e){(0,n.Je)(e).then((e=>{this.userCode==e.data[0].userId?this.roleFlag=!0:this.roleFlag=!1}))}},async mounted(){let e=this.$route.query;this.userId=e.name,this.roomId=e.roomId,this.userCode=e.userId,this.caseId=e.id,this.caseId&&this.reserveConferenceListFn(this.caseId),F=m().create();const o={view:document.getElementById("video"),publish:!1};await F.startLocalVideo(o)}},R=g,C=(0,c.Z)(R,v,f,!1,null,"66f2b650",null),b=C.exports,y=t(6097),_={name:"App",components:{homepc:p,homePhone:b},data(){return{modileFlag:!1}},methods:{},mounted(){this.modileFlag=(0,y.Qv)()}},L=_,$=(0,c.Z)(L,r,s,!1,null,"d34b2652",null),k=$.exports}}]);
2
-//# sourceMappingURL=104.15b7bedb.js.map

+ 0
- 1
dist/js/104.15b7bedb.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 2
dist/js/315.35b56b98.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/js/315.35b56b98.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 17
dist/js/667.c7c4d337.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/js/667.c7c4d337.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 2
dist/js/app.b526e971.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/js/app.b526e971.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 25
dist/js/chunk-vendors.b16260de.js
File diff suppressed because it is too large
Näytä tiedosto


+ 0
- 1
dist/js/chunk-vendors.b16260de.js.map
File diff suppressed because it is too large
Näytä tiedosto


+ 3
- 0
src/App.vue Näytä tiedosto

@@ -9,6 +9,9 @@
9 9
 export default {
10 10
   name: 'App',
11 11
   components: {
12
+  },
13
+  created(){
14
+   
12 15
   }
13 16
 }
14 17
 </script>

+ 22
- 5
src/api/home.js Näytä tiedosto

@@ -1,15 +1,32 @@
1 1
 import axios from "@/utils/request";
2
-// let baseUrl = 'https://api.xayunmei.com/zhongcaiapi';
3
-let baseUrl = 'http://121.40.189.20:6001'
2
+let baseUrlZc = 'https://api.xayunmei.com/zhongcaiapi';
3
+let baseUrl = 'https://api.xayunmei.com/tiaojieapitest';
4
+// let baseUrl = 'http://121.40.189.20:6001';
4 5
 // 获取usersig
5 6
 export function getUsersig(userId) {
6
-    return axios.get(`${baseUrl}/video/generateUserSign?userId=${userId}`);
7
+    let appType = sessionStorage.getItem('type');
8
+    if (appType == 'tiaojie') {
9
+        return axios.get(`${baseUrl}/caseApplication/generateUserSign?userId=${userId}`);
10
+    } else {
11
+        return axios.get(`${baseUrlZc}/caseApplication/generateUserSign?userId=${userId}`);
12
+    }
7 13
 }
8 14
 // 获取房间号
9 15
 export function getRoomId(caseId) {
10
-    return axios.get(`${baseUrl}/video/createRoomId?caseId=${caseId}`);
16
+    let appType = sessionStorage.getItem('type');
17
+    if (appType == 'tiaojie') {
18
+        return axios.get(`${baseUrl}/caseApplication/createRoomId?caseId=${caseId}`);
19
+    } else {
20
+        return axios.get(`${baseUrlZc}/caseApplication/createRoomId?caseId=${caseId}`);
21
+    }
11 22
 }
12 23
 // 根据案件id查询相关信息
13 24
 export function reserveConferenceList(caseId) {
14
-    return axios.get(`${baseUrl}/video/reserveConferenceList?caseId=${caseId}`);
25
+    let appType = sessionStorage.getItem('type');
26
+    if (appType == 'tiaojie') {
27
+        return axios.get(`${baseUrl}/caseApplication/reserveConferenceList?caseId=${caseId}`);
28
+    } else {
29
+        return axios.get(`${baseUrlZc}/caseApplication/reserveConferenceList?caseId=${caseId}`);
30
+    }
31
+    
15 32
 }

+ 33
- 7
src/api/room.js Näytä tiedosto

@@ -1,23 +1,49 @@
1 1
 import axios from "@/utils/request";
2
-// let baseUrl = 'https://api.xayunmei.com/zhongcaiapi';
3
-let baseUrl = 'http://121.40.189.20:6001'
2
+let baseUrlZC = 'https://api.xayunmei.com/zhongcaiapi';
3
+let baseUrl = 'https://api.xayunmei.com/tiaojieapitest';
4
+// let baseUrl = 'http://121.40.189.20:6001';
4 5
 // 开始云端录制
5 6
 export function startVideo(data) {
6
-    return axios.post(`${baseUrl}/video/openCloudRecording`,data);
7
+    let appType = sessionStorage.getItem('type');
8
+    if (appType == 'tiaojie') {
9
+        return axios.post(`${baseUrl}/video/openCloudRecording`, data);
10
+    } else {
11
+        return axios.post(`${baseUrlZC}/video/openCloudRecording`, data);
12
+    }
7 13
 }
8 14
 // 结束云端录制
9 15
 export function stopVideo(data) {
10
-    return axios.post(`${baseUrl}/video/closeDeleteCloudRecording?taskId=${data}`);
16
+    let appType = sessionStorage.getItem('type');
17
+    if (appType == 'tiaojie') {
18
+        return axios.post(`${baseUrl}/video/closeDeleteCloudRecording?taskId=${data}`);
19
+    } else {
20
+        return axios.post(`${baseUrlZC}/video/closeDeleteCloudRecording?taskId=${data}`);
21
+    }
11 22
 }
12 23
 // 解散房间
13 24
 export function destructionRoom(data) {
14
-    return axios.post(`${baseUrl}/video/dissolveRoom`,data);
25
+    let appType = sessionStorage.getItem('type');
26
+    if (appType == 'tiaojie') {
27
+        return axios.post(`${baseUrl}/video/dissolveRoom`, data);
28
+    } else {
29
+        return axios.post(`${baseUrlZC}/video/dissolveRoom`, data);
30
+    }
15 31
 }
16 32
 // 根据html字符串转pdf并且和案件关联
17 33
 export function htmlToPDF(data) {
18
-    return axios.post(`${baseUrl}/video/htmlToPDF`,data);
34
+    let appType = sessionStorage.getItem('type');
35
+    if (appType == 'tiaojie') {
36
+        return axios.post(`${baseUrl}/video/htmlToPDF`, data);
37
+    } else {
38
+        return axios.post(`${baseUrlZC}/video/htmlToPDF`, data);
39
+    }
19 40
 }
20 41
 // 根据userId查询该用户是否是秘书
21 42
 export function secretaryRoleByUserId(userId) {
22
-    return axios.get(`${baseUrl}/video/secretaryRoleByUserId?userId=${userId}`);
43
+    let appType = sessionStorage.getItem('type');
44
+    if (appType == 'tiaojie') {
45
+        return axios.get(`${baseUrl}/video/secretaryRoleByUserId?userId=${userId}`);
46
+    } else {
47
+        return axios.get(`${baseUrlZC}/video/secretaryRoleByUserId?userId=${userId}`);
48
+    }
23 49
 }

+ 102
- 101
src/components/homeh5.vue Näytä tiedosto

@@ -1,134 +1,135 @@
1 1
 <template>
2
-    <div class="homepage">
3
-        <div class="title">
4
-            仲裁会议室
5
-        </div>
6
-        <div id="video">
7
-
8
-        </div>
9
-        <div class="enterRoom">
10
-            <el-form :model="enterRoomFrom" ref="enterRoomFrom">
11
-                <el-form-item>
12
-                    <el-input placeholder="请输入房间号" v-model="enterRoomFrom.roomId">
13
-                        <template slot="append"><el-button type="primary" @click="enterRoom"
14
-                                icon="el-icon-right">进入</el-button></template></el-input>
15
-                </el-form-item>
16
-            </el-form>
17
-        </div>
2
+  <div class="homepage">
3
+    <div class="title">仲裁会议室</div>
4
+    <div id="video"></div>
5
+    <div class="enterRoom">
6
+      <el-form :model="enterRoomFrom" ref="enterRoomFrom">
7
+        <el-form-item>
8
+          <el-input placeholder="请输入房间号" v-model="enterRoomFrom.roomId">
9
+            <template slot="append">
10
+              <el-button type="primary" @click="enterRoom" icon="el-icon-right">进入</el-button>
11
+            </template>
12
+          </el-input>
13
+        </el-form-item>
14
+      </el-form>
18 15
     </div>
16
+  </div>
19 17
 </template>
20 18
   
21 19
 <script>
22
-import { reserveConferenceList } from '@/api/home.js'
23
-import TRTC from 'trtc-sdk-v5';
20
+import { reserveConferenceList } from "@/api/home.js";
21
+import TRTC from "trtc-sdk-v5";
24 22
 let trtc = null;
25 23
 export default {
26
-    name: 'App',
27
-    data() {
28
-        return {
29
-            formLabelAlign: {},
30
-            enterRoomFrom: {},
31
-            trtc: null,
32
-            userId: null,
33
-            userCode: null,
34
-            caseId: null,
35
-            roleFlag: false
36
-        };
37
-    },
38
-    methods: {
39
-        async enterRoom() {
40
-            if (this.roomId != this.enterRoomFrom.roomId) {
41
-                this.$message({
42
-                    message: "房间号不是对应案件的房间号",
43
-                    type: 'error'
44
-                });
45
-                return
46
-            }
47
-            this.$router.push({
48
-                name: 'Room',
49
-                query: {
50
-                    userId: this.userId,
51
-                    roomId: this.enterRoomFrom.roomId,
52
-                    flag: this.roleFlag,
53
-                    caseId: this.caseId
54
-                }
55
-            })
56
-        },
57
-        submitRoom() {
58
-            this.$refs["formLabelAlign"].validate((valid) => {
59
-
60
-            })
61
-        },
62
-        // 根据案件id查询主持人信息
63
-        reserveConferenceListFn(data) {
64
-            reserveConferenceList(data).then(res => {
65
-                if (this.userCode == res.data[0].userId) {
66
-                    this.roleFlag = true;
67
-                } else {
68
-                    this.roleFlag = false;
69
-                }
70
-            })
24
+  name: "App",
25
+  data() {
26
+    return {
27
+      formLabelAlign: {},
28
+      enterRoomFrom: {},
29
+      trtc: null,
30
+      userId: null,
31
+      userCode: null,
32
+      caseId: null,
33
+      roleFlag: false
34
+    };
35
+  },
36
+  methods: {
37
+    async enterRoom() {
38
+      if (this.roomId != this.enterRoomFrom.roomId) {
39
+        this.$message({
40
+          message: "房间号不是对应案件的房间号",
41
+          type: "error"
42
+        });
43
+        return;
44
+      }
45
+      this.$router.push({
46
+        name: "Room",
47
+        query: {
48
+          userId: this.userId,
49
+          roomId: this.enterRoomFrom.roomId,
50
+          flag: this.roleFlag,
51
+          caseId: this.caseId
71 52
         }
53
+      });
72 54
     },
73
-    async mounted() {
74
-        let routeParams = this.$route.query;
75
-        this.userId = routeParams.name;
76
-        this.roomId = routeParams.roomId;
77
-        this.userCode = routeParams.userId;
78
-        this.caseId = routeParams.id;
79
-        if (this.caseId) {
80
-            this.reserveConferenceListFn(this.caseId);
81
-        }
82
-        trtc = TRTC.create()
83
-        const config = {
84
-            view: document.getElementById('video'),
85
-            publish: false
86
-        }
87
-        await trtc.startLocalVideo(config);
55
+    submitRoom() {
56
+      this.$refs["formLabelAlign"].validate(valid => {});
88 57
     },
58
+    // 根据案件id查询主持人信息
59
+    async reserveConferenceListFn(data) {
60
+      await reserveConferenceList(data).then(res => {
61
+        if (res.data.length > 1) {
62
+          if (this.userCode == res.data[0].userId) {
63
+            this.roleFlag = true;
64
+          } else {
65
+            this.roleFlag = false;
66
+          }
67
+        } else {
68
+          this.roleFlag = false;
69
+        }
70
+      });
71
+    }
72
+  },
73
+  async mounted() {
74
+    let routeParams = this.$route.query;
75
+    this.userId = routeParams.name;
76
+    this.roomId = routeParams.roomId;
77
+    this.userCode = routeParams.userId;
78
+    this.caseId = routeParams.id;
79
+    sessionStorage.setItem('type',appType);
80
+    if (this.caseId) {
81
+      await this.reserveConferenceListFn(this.caseId);
82
+    }
83
+    trtc = TRTC.create();
84
+    const config = {
85
+      view: document.getElementById("video"),
86
+      publish: false
87
+    };
88
+    await trtc.startLocalVideo(config);
89
+  }
89 90
 };
90 91
 </script>
91 92
   
92 93
 <style scoped>
93 94
 .homepage {
94
-    width: 100%;
95
-    height: 100vh;
96
-    background-color: #302e2e;
97
-    display: flex;
98
-    flex-direction: column;
99
-    align-items: center;
95
+  width: 100%;
96
+  height: 100vh;
97
+  background-color: #302e2e;
98
+  display: flex;
99
+  flex-direction: column;
100
+  align-items: center;
100 101
 }
101 102
 
102 103
 #video {
103
-    width: 90%;
104
-    height: 50%;
104
+  width: 90%;
105
+  height: 50%;
105 106
 }
106 107
 
107 108
 .enterRoom {
108
-    margin-top: 30px;
109
-    width: 90%;
110
-    height: 10%;
109
+  margin-top: 30px;
110
+  width: 90%;
111
+  height: 10%;
111 112
 }
112 113
 
113 114
 .reservation {
114
-    width: 20%;
115
-    height: 50%;
116
-    background-color: #1c1b1b;
115
+  width: 20%;
116
+  height: 50%;
117
+  background-color: #1c1b1b;
117 118
 }
118 119
 
119 120
 .title {
120
-    width: 100%;
121
-    text-align: center;
122
-    color: #3f1ab7;
123
-    line-height: 30px;
124
-    font-size: 18px;
125
-    margin-bottom: 20px;
121
+  width: 100%;
122
+  text-align: center;
123
+  color: #3f1ab7;
124
+  line-height: 30px;
125
+  font-size: 18px;
126
+  margin-bottom: 20px;
126 127
 }
127 128
 
128 129
 .enterForm {
129
-    width: 100%;
130
-    display: flex;
131
-    justify-content: center;
130
+  width: 100%;
131
+  display: flex;
132
+  justify-content: center;
132 133
 }
133 134
 </style>
134 135
   

+ 105
- 105
src/components/homepc.vue Näytä tiedosto

@@ -1,138 +1,138 @@
1 1
 <template>
2
-    <div class="homepage">
3
-        <div id="video">
4
-
5
-        </div>
6
-        <div class="enterRoom">
7
-            <div class="title">
8
-                仲裁会议室
9
-            </div>
10
-            <div class="enterForm">
11
-                <el-form :model="enterRoomFrom" ref="enterRoomFrom">
12
-                    <el-form-item>
13
-                        <el-input placeholder="请输入房间号" v-model="enterRoomFrom.roomId">
14
-                            <template slot="append"><el-button type="primary" @click="enterRoom"
15
-                                    icon="el-icon-right">进入</el-button></template></el-input>
16
-                    </el-form-item>
17
-                </el-form>
18
-            </div>
19
-        </div>
2
+  <div class="homepage">
3
+    <div id="video"></div>
4
+    <div class="enterRoom">
5
+      <div class="title">仲裁会议室</div>
6
+      <div class="enterForm">
7
+        <el-form :model="enterRoomFrom" ref="enterRoomFrom">
8
+          <el-form-item>
9
+            <el-input placeholder="请输入房间号" v-model="enterRoomFrom.roomId">
10
+              <template slot="append">
11
+                <el-button type="primary" @click="enterRoom" icon="el-icon-right">进入</el-button>
12
+              </template>
13
+            </el-input>
14
+          </el-form-item>
15
+        </el-form>
16
+      </div>
20 17
     </div>
18
+  </div>
21 19
 </template>
22 20
   
23 21
 <script>
24
-import { reserveConferenceList } from '@/api/home.js'
25
-import TRTC from 'trtc-sdk-v5';
22
+import { reserveConferenceList } from "@/api/home.js";
23
+import TRTC from "trtc-sdk-v5";
26 24
 let trtc = null;
27 25
 export default {
28
-    name: 'App',
29
-    data() {
30
-        return {
31
-            formLabelAlign: {},
32
-            enterRoomFrom: {},
33
-            trtc: null,
34
-            userId: null,
35
-            userCode: null,
36
-            caseId: null,
37
-            roleFlag: false
38
-        };
39
-    },
40
-    methods: {
41
-        async enterRoom() {
42
-            // if (this.roomId != this.enterRoomFrom.roomId) {
43
-            //     this.$message({
44
-            //         message: "房间号不是对应案件的房间号",
45
-            //         type: 'error'
46
-            //     });
47
-            //     return
48
-            // }
49
-            this.$router.push({
50
-                name: 'Room',
51
-                query: {
52
-                    userId: this.userId,
53
-                    roomId: this.roomId,
54
-                    flag: this.roleFlag,
55
-                    caseId: this.caseId,
56
-                    id: this.userCode
57
-                }
58
-            })
59
-        },
60
-        submitRoom() {
61
-            this.$refs["formLabelAlign"].validate((valid) => {
62
-
63
-            })
64
-        },
65
-        // 根据案件id查询主持人信息
66
-        async reserveConferenceListFn(data) {
67
-            await reserveConferenceList(data).then(res => {
68
-                if (this.userCode == res.data[0].userId) {
69
-                    this.roleFlag = true;
70
-                } else {
71
-                    this.roleFlag = false;
72
-                }
73
-            })
26
+  name: "App",
27
+  data() {
28
+    return {
29
+      formLabelAlign: {},
30
+      enterRoomFrom: {},
31
+      trtc: null,
32
+      userId: null,
33
+      userCode: null,
34
+      caseId: null,
35
+      roleFlag: false
36
+    };
37
+  },
38
+  methods: {
39
+    async enterRoom() {
40
+      // if (this.roomId != this.enterRoomFrom.roomId) {
41
+      //     this.$message({
42
+      //         message: "房间号不是对应案件的房间号",
43
+      //         type: 'error'
44
+      //     });
45
+      //     return
46
+      // }
47
+      this.$router.push({
48
+        name: "Room",
49
+        query: {
50
+          userId: this.userId,
51
+          roomId: this.roomId,
52
+          flag: this.roleFlag,
53
+          caseId: this.caseId,
54
+          id: this.userCode
74 55
         }
56
+      });
75 57
     },
76
-    async mounted() {
77
-        let routeParams = this.$route.query;
78
-        this.userId = routeParams.name;
79
-        this.roomId = routeParams.roomId;
80
-        this.userCode = routeParams.userId;
81
-        this.caseId = routeParams.id;
82
-        if (this.caseId) {
83
-            await this.reserveConferenceListFn(this.caseId);
84
-            await this.enterRoom()
85
-        }
86
-        trtc = TRTC.create()
87
-        const config = {
88
-            view: document.getElementById('video'),
89
-            publish: false
90
-        }
91
-        await trtc.startLocalVideo(config);
58
+    submitRoom() {
59
+      this.$refs["formLabelAlign"].validate(valid => {});
92 60
     },
61
+    // 根据案件id查询主持人信息
62
+    async reserveConferenceListFn(data) {
63
+      await reserveConferenceList(data).then(res => {
64
+        if (res.data.length > 1) {
65
+          if (this.userCode == res.data[0].userId) {
66
+            this.roleFlag = true;
67
+          } else {
68
+            this.roleFlag = false;
69
+          }
70
+        }else{
71
+          this.roleFlag = false;
72
+        }
73
+      });
74
+    }
75
+  },
76
+  async mounted() {
77
+    let routeParams = this.$route.query;
78
+    this.userId = routeParams.name;
79
+    this.roomId = routeParams.roomId;
80
+    this.userCode = routeParams.userId;
81
+    this.caseId = routeParams.id;
82
+    if (this.caseId) {
83
+      await this.reserveConferenceListFn(this.caseId);
84
+      await this.enterRoom();
85
+    }
86
+    trtc = TRTC.create();
87
+    const config = {
88
+      view: document.getElementById("video"),
89
+      publish: false
90
+    };
91
+    await trtc.startLocalVideo(config);
92
+  }
93 93
 };
94 94
 </script>
95 95
   
96 96
 <style scoped>
97 97
 .homepage {
98
-    width: 100%;
99
-    height: 100vh;
100
-    background-color: #302e2e;
101
-    display: flex;
102
-    align-items: center;
103
-    justify-content: space-around;
98
+  width: 100%;
99
+  height: 100vh;
100
+  background-color: #302e2e;
101
+  display: flex;
102
+  align-items: center;
103
+  justify-content: space-around;
104 104
 }
105 105
 
106 106
 #video {
107
-    width: 40%;
108
-    height: 50%;
107
+  width: 40%;
108
+  height: 50%;
109 109
 }
110 110
 
111 111
 .enterRoom {
112
-    width: 20%;
113
-    height: 50%;
114
-    background-color: #1c1b1b;
112
+  width: 20%;
113
+  height: 50%;
114
+  background-color: #1c1b1b;
115 115
 }
116 116
 
117 117
 .reservation {
118
-    width: 20%;
119
-    height: 50%;
120
-    background-color: #1c1b1b;
118
+  width: 20%;
119
+  height: 50%;
120
+  background-color: #1c1b1b;
121 121
 }
122 122
 
123 123
 .title {
124
-    width: 100%;
125
-    text-align: center;
126
-    color: #3f1ab7;
127
-    line-height: 30px;
128
-    font-size: 18px;
129
-    margin-bottom: 20px;
124
+  width: 100%;
125
+  text-align: center;
126
+  color: #3f1ab7;
127
+  line-height: 30px;
128
+  font-size: 18px;
129
+  margin-bottom: 20px;
130 130
 }
131 131
 
132 132
 .enterForm {
133
-    width: 100%;
134
-    display: flex;
135
-    justify-content: center;
133
+  width: 100%;
134
+  display: flex;
135
+  justify-content: center;
136 136
 }
137 137
 </style>
138 138
   

+ 24
- 24
src/views/home.vue Näytä tiedosto

@@ -4,38 +4,38 @@
4 4
  * @LastEditTime: 2022-03-29 17:01:32
5 5
 -->
6 6
 <template>
7
-    <div class="homepage">
8
-        <homepc v-if="modileFlag"></homepc>
9
-        <homePhone v-if="!modileFlag"></homePhone>
10
-    </div>
7
+  <div class="homepage">
8
+    <homepc v-if="modileFlag"></homepc>
9
+    <homePhone v-if="!modileFlag"></homePhone>
10
+  </div>
11 11
 </template>
12 12
   
13 13
 <script>
14
-import homepc from '@/components/homepc.vue';
15
-import homePhone from '@/components/homeh5.vue';
16
-import { getModile } from '@/utils/utils'
14
+import homepc from "@/components/homepc.vue";
15
+import homePhone from "@/components/homeh5.vue";
16
+import { getModile } from "@/utils/utils";
17 17
 export default {
18
-    name: 'App',
19
-    components:{
20
-        homepc,
21
-        homePhone
22
-    },
23
-    data() {
24
-        return {
25
-            modileFlag:false
26
-        };
27
-    },
28
-    methods: {
29
-        
30
-    },
31
-    mounted() {
32
-        this.modileFlag = getModile()
33
-    },
18
+  name: "App",
19
+  components: {
20
+    homepc,
21
+    homePhone
22
+  },
23
+  data() {
24
+    return {
25
+      modileFlag: false
26
+    };
27
+  },
28
+  methods: {},
29
+  created() {
30
+    this.modileFlag = getModile();
31
+    let routeParams = this.$route.query;
32
+    let appType = routeParams.type;
33
+    sessionStorage.setItem("type", appType);
34
+  }
34 35
 };
35 36
 </script>
36 37
   
37 38
 <style scoped>
38
-
39 39
 </style>
40 40
   
41 41