Przeglądaj źródła

背景图,智慧教室修改

huliu 1 rok temu
rodzic
commit
ef3120516f

BIN
public/img/bg.png


+ 1 - 1
src/assets/css/home.scss

@@ -11,7 +11,7 @@
11 11
         margin-bottom: 20px;
12 12
         height: 70px;
13 13
         width: 100%;
14
-        top: 0;
14
+        top: 10px;
15 15
 
16 16
         img {
17 17
             width: 100%;

+ 2 - 0
src/assets/css/right.scss

@@ -225,6 +225,8 @@
225 225
                         position: absolute;
226 226
                         top: 0;
227 227
                         left: 10px;
228
+                        width: 80px;
229
+                        background-color: rgba(0, 0, 0, 0.38);
228 230
                     }
229 231
                 }
230 232
             }

+ 3 - 3
src/components/CircleProgress.vue

@@ -3,7 +3,7 @@
3 3
         <div class="number" v-if="textPosition == 'top'">
4 4
             <ul class="flex">
5 5
                 <ScrollNum v-for="(num, idx) of numArr" :key="idx" as="li" :i="num" :delay="idx + 1" />
6
-                <span> (人)</span>
6
+                <span></span>
7 7
             </ul>
8 8
         </div>
9 9
     </div>
@@ -11,8 +11,8 @@
11 11
         <svg viewBox="0 0 96 96" class="svg-circle-progress">
12 12
             <circle r="38" cx="48" cy="48" fill="none" stroke-miterlimit="20" stroke-width="4" class="svg-progress"
13 13
                 style="stroke-dasharray: 275, 279.602; stroke: rgba(255, 255, 255, 0.19)"></circle>
14
-            <circle r="38" cx="48" cy="48" fill="none" stroke-miterlimit="20" stroke-width="4" class="svg-progress"
15
-                :style="`stroke-dasharray: ${progressValue}, 279.602;stroke:${color};`"></circle>
14
+            <circle r="38" transform="rotate(180 48 48)" cx="48" cy="48" fill="none" stroke-miterlimit="20" stroke-width="4"
15
+                class="svg-progress" :style="`stroke-dasharray: ${progressValue}, 279.602;stroke:${color};`"></circle>
16 16
         </svg>
17 17
         <div class="mask">
18 18
             <slot></slot>

+ 16 - 45
src/components/Login.vue

@@ -4,20 +4,11 @@
4 4
             <img :src="loginimg" alt="" style="">
5 5
             <span @click="login"> 登录</span>
6 6
         </div>
7
-        <div class="slogan">
8
-            <span class="slogan1">
9
-                元宇宙智慧校园
10
-            </span>
11
-            <span class="slogan2">
12
-                校园最好的导游
13
-            </span>
14 7
 
15
-        </div>
16 8
     </div>
17 9
 </template>
18 10
 
19 11
 <script >
20
-import * as echarts from "echarts";
21 12
 import { ref } from "vue";
22 13
 // import login from '/''
23 14
 export default ({
@@ -44,10 +35,12 @@ export default ({
44 35
     height: 100%;
45 36
     margin: 0;
46 37
     padding: 0;
38
+    overflow: hidden;
47 39
     // border: 1px solid red;
48
-    z-index: 888;
40
+
49 41
     // background-color: darkcyan;
50 42
     background: url('/public/img/bg.png');
43
+
51 44
     background-size: cover;
52 45
     z-index: 888;
53 46
 
@@ -55,11 +48,18 @@ export default ({
55 48
 }
56 49
 
57 50
 .loginbutton {
51
+    position: absolute;
52
+    bottom: 10%;
53
+    left: 46%;
58 54
     display: flex;
59
-
55
+    background: #6171FF;
60 56
     align-items: center;
61
-    position: absolute;
62
-    right: 0;
57
+    justify-content: center;
58
+
59
+    width: 160px;
60
+    border-radius: 20px;
61
+    padding: 10px;
62
+    cursor: pointer;
63 63
 
64 64
     img {
65 65
         width: 24px;
@@ -67,42 +67,13 @@ export default ({
67 67
     }
68 68
 
69 69
     span {
70
-        cursor: pointer;
71 70
         color: #FFF;
72 71
         font-family: PingFang SC;
73
-        font-size: 18px;
72
+        font-size: 20px;
74 73
         font-style: normal;
75
-        font-weight: 700;
74
+        font-weight: 400;
75
+        line-height: 24px;
76 76
         margin-left: 3px;
77 77
     }
78 78
 }
79
-
80
-.slogan {
81
-    width: 635px;
82
-    display: flex;
83
-    flex-direction: column;
84
-    // border: 1px solid aliceblue;
85
-    color: #fff;
86
-    // display: ;
87
-    font-family: MF LangQian (Noncommercial);
88
-
89
-    font-size: 64px;
90
-    font-style: normal;
91
-    font-weight: 400;
92
-    line-height: 126px;
93
-    position: absolute;
94
-    bottom: 246px;
95
-    left: 112px;
96
-
97
-    .slogan1 {
98
-        display: flex;
99
-
100
-    }
101
-
102
-    .slogan2 {
103
-        display: flex;
104
-
105
-        justify-content: flex-end
106
-    }
107
-}
108 79
 </style>

+ 13 - 12
src/components/right.vue

@@ -58,18 +58,15 @@
58 58
 
59 59
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
60 60
                                 <span>{{ item.title }}</span>
61
-                                <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item.src)">
62
-                                <!-- <img :src="'src/assets/img/' + 'rb2' + '.png'" alt="" @click="lookVideo(item.src)"> -->
61
+                                <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item)">
63 62
                             </div>
64 63
                         </div>
65 64
 
66
-                        <p style="margin-top: 5px;">{{ item.activeMonitor.title }}</p>
65
+                        <p style="margin-top: 5px;">{{ item.activeMonitor.title1 }}</p>
67 66
                         <div class="interactclass">
68
-                            <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
67
+                            <div class="room" v-for="(item, index) in item.activeMonitor.array1" :key="index">
69 68
                                 <span>{{ item.title }}</span>
70 69
                                 <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item.src)">
71
-
72
-                                <!-- <img :src="'src/assets/img/' + 'rb2' + '.png'" alt="" @click="lookVideo(item.src)"> -->
73 70
                             </div>
74 71
                         </div>
75 72
                     </el-carousel-item>
@@ -80,7 +77,7 @@
80 77
     </el-aside>
81 78
 
82 79
     <!-- 视频播放弹框 -->
83
-    <el-dialog class="videoDialog" v-model="videoDialog" title="互动教师1" width="60%" align="center" top="4%">
80
+    <el-dialog class="videoDialog" v-model="videoDialog" :title="dialogTitle" width="60%" align="center" top="4%">
84 81
         <videoPlay v-bind="videoData" />
85 82
         <!-- {{ videoData.src }} -->
86 83
     </el-dialog>
@@ -104,7 +101,7 @@ export default ({
104 101
             width: "100%", //播放器高度
105 102
             height: "100%", //播放器高度
106 103
             color: "red", //主题色
107
-            title: "互动教室", //视频名称
104
+            // title: "互动教室", //视频名称
108 105
             // src: "https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/IronMan.mp4", //视频源
109 106
             src: "",
110 107
             type: "m3u8",
@@ -131,12 +128,15 @@ export default ({
131 128
         });
132 129
         //视频播放弹框
133 130
         const videoDialog = ref(false)
131
+        const dialogTitle = ref("")
134 132
         // 播放视频
135
-        const lookVideo = function (src) {
133
+        const lookVideo = function (item) {
136 134
             videoDialog.value = true;
137
-            // console.log("点击了播放视频", 12312312, "播放路径", src)
138
-            getVideoUrl({ "rtsp": src }).then((res) => {
135
+            dialogTitle.value = item.title
136
+            console.log("点击了播放视频", 12312312, "播放路径", item)
137
+            getVideoUrl({ "rtsp": item.src }).then((res) => {
139 138
                 console.log("视频处理", res);
139
+
140 140
                 videoData.src = res.data.httpFlv
141 141
             })
142 142
             // videoData.src = src
@@ -190,7 +190,8 @@ export default ({
190 190
             d12img,
191 191
             d2img,
192 192
             d3img,
193
-            deviceImg
193
+            deviceImg,
194
+            dialogTitle
194 195
         }
195 196
     },
196 197
 })

+ 1 - 1
src/request/api.js

@@ -16,4 +16,4 @@ export const getDevice = () => service.get("/wisdomClass/deviceStatistic")
16 16
 
17 17
 export const getClassDetail = (deviceCode) => service.get(`/wisdomClass/deviceDetail/${deviceCode}`)
18 18
 
19
-export const getVideoUrl = (data) => service.post(`/ioc-server/camera/getUrl`, data)
19
+export const getVideoUrl = (data) => service.post(`/camera/getUrl`, data)

+ 1 - 1
src/request/http.js

@@ -44,7 +44,7 @@ service.interceptors.response.use(
44 44
                     console.error("网络错误,请稍后再试");
45 45
                     break;
46 46
                 case 404:
47
-                    console.eroor("请求路径出错");
47
+                    console.error("请求路径出错");
48 48
                     break;
49 49
 
50 50
                 default: