Browse Source

Merge branch 'zhuf'

bzkf3 2 years ago
parent
commit
159557372d
5 changed files with 128 additions and 45 deletions
  1. 15 19
      src/pages/zbkt/ssys/content.vue
  2. 13 6
      src/pages/zbkt/ssys/index.vue
  3. 73 0
      src/pages/zbkt/ssys/rtc.vue
  4. 25 18
      src/router/index.js
  5. 2 2
      src/utils/request.js

+ 15 - 19
src/pages/zbkt/ssys/content.vue

@@ -1,30 +1,26 @@
 <script setup>
 import request from '~/utils/request';
+import { getFullUrl } from '~/utils/helper';
 import commonHeader from "@/components/header/index.vue";
-import img_lczs1 from '~/assets/zbktssys/1.png';
-import img_lczs2 from '~/assets/zbktssys/2.png';
-import img_lczs3 from '~/assets/zbktssys/3.png';
-import img_lczs from '~/assets/zbktssys/bar.png';
-import img_tx from '~/assets/zbktssys/tx.png';
-
 
 // const data_zy = $ref([
 //   { img: img_lczs1, title: '走进生肖文化——寅虎卯兔', bfl: 100, desc: '领略生肖传奇,品味传统文化!', nj: '四年级', xk: '美术', ls: '尚老师', tx: img_tx, zt: '1' },
 //   { img: img_lczs2, title: '走进生肖文化——寅虎卯兔', bfl: 100, desc: '领略生肖传奇,品味传统文化!', nj: '四年级', xk: '美术', ls: '尚老师', tx: img_tx, zt: '' },
 //   { img: img_lczs3, title: '走进生肖文化——寅虎卯兔', bfl: 100, desc: '领略生肖传奇,品味传统文化!', nj: '四年级', xk: '美术', ls: '尚老师', tx: img_tx, zt: '' },
 // ])
+const props = defineProps({
+  id: String
+})
 
-
-function hrefTo(href) {
-  window.open(href, '_blank')
-}
-
-let detailInfo = $ref({
-  file: false
+let detailInfo = $ref({})
+request({
+  url: '/kzkt/ssyskc/detail',
+  data: {
+    ks_id: props.id
+  }
+}).then(res => {
+  detailInfo = res.data.one_info
 })
-// request({
-//   url:''
-// })
 </script>
   
   <template>
@@ -53,9 +49,9 @@ let detailInfo = $ref({
 
       <div class="w-full h-730px mb-4 bg-light-500">
         <!-- <video class="w-full h-full" src=""></video> -->
-        <template v-if="detailInfo.file"> <iframe
-            :src="`https://view.officeapps.live.com/op/view.aspx?src=${detailInfo.file}`" width='100%' height='100%'
-            frameborder='0'></iframe>
+        <template v-if="detailInfo.ks_kj">
+          <iframe :src="`https://view.officeapps.live.com/op/view.aspx?src=${getFullUrl(detailInfo.ks_kj)}`"
+            width='100%' height='100%' frameborder='0'></iframe>
         </template>
         <el-result v-else icon="error" title="错误信息" sub-title="文件格式不支持">
         </el-result>

+ 13 - 6
src/pages/zbkt/ssys/index.vue

@@ -1,11 +1,14 @@
 <script setup>
 import commonHeader from "@/components/header/index.vue";
+import CheckRow from "~/components/CheckRow/index.vue";
+
 import img_lczs1 from '~/assets/zbktssys/1.png';
 import img_lczs2 from '~/assets/zbktssys/2.png';
 import img_lczs3 from '~/assets/zbktssys/3.png';
 import img_lczs from '~/assets/zbktssys/bar.png';
 import img_tx from '~/assets/zbktssys/tx.png';
 
+
 import { View as IconView, Histogram as IconHistogram, Search as IconSearch } from '@element-plus/icons-vue';
 import { getFullUrl, getAvatarUrl } from '~/utils/helper';
 
@@ -56,9 +59,14 @@ function hrefTo(href) {
 
 const router = useRouter()
 
-function handleJyClick() {
-  router.push('/zbkt/ssys/content')
+function handleJyClick(row) {
+  router.push(`/zbkt/ssys/content/${row.ks_id}`)
 }
+
+function handleRtcClick(row) {
+  router.push(`/zbkt/ssys/rtc/${row.ks_id}`)
+}
+
 </script>
 
 <template>
@@ -153,13 +161,12 @@ function handleJyClick() {
             </div>
 
             <div class="flex text-sm justify-between items-center">
-              <div @click="hrefTo('https://rtc.bozedu.net/index.html?uroom=18&uname=txsxnxxb&stream=18_2')"
-                class="cursor-pointer flex items-center">
+              <div class="cursor-pointer flex items-center">
                 <el-avatar :size="16" :src="getAvatarUrl(i.user_id)" /><span class="ml-1">{{ i.ks_zjjsxm }}</span>
               </div>
-              <div @click="hrefTo('https://rtc.bozedu.net/index.html?uroom=18&uname=txsxnxxa&stream=18')"
+              <div @click="handleRtcClick(i)"
                 class="h-26px rounded-14px px-2 flex items-center text-hex-0083C5 cursor-pointer"
-                :class="i.ks_status === '2' && 'border border-hex-f00 text-hex-f00'">
+                :class="i.ks_status === 2 && 'border border-hex-f00 text-hex-f00'">
                 <!-- <el-icon :color="i.zt ? '#FF0000' : '#949494'">
                   <icon-histogram />
                 </el-icon> -->

+ 73 - 0
src/pages/zbkt/ssys/rtc.vue

@@ -0,0 +1,73 @@
+<script setup>
+  import request from '~/utils/request';
+  import commonHeader from "@/components/header/index.vue";
+
+  
+
+  
+
+  
+  let detailInfo = $ref({
+    file: false
+  })
+  // request({
+  //   url:''
+  // })
+  </script>
+    
+    <template>
+    <common-header />
+    <div class="w-full flex items-center justify-center shadow h-60px bg-hex-fefefe">
+      <div class="w-1400px flex items-center">
+        <div class="text-lg text-hex-050026">内容</div>
+        <el-divider direction="vertical" />
+        <div class="text-sm">
+          <span class="text-hex-949494">直播课堂</span>
+          <span class="text-hex-949494"> - 双师一生</span>
+          <span> - 内容</span>
+        </div>
+      </div>
+    </div>
+  
+    <div class="w-full flex items-center justify-center shadow h-60px bg-hex-fefefe">
+      <div class="w-1400px flex items-center">
+        <div class="text-lg text-hex-050026">信息技术与学科教学的深度融合</div>
+      </div>
+    </div>
+  
+  
+    <div class="w-full flex items-center justify-center mt-4">
+      <div class="w-1400px flex flex-col">
+  
+        <div class="w-full h-730px mb-4 bg-light-500">
+          <!-- <video class="w-full h-full" src=""></video> -->
+          <template v-if="detailInfo.file"> <iframe
+              :src="`https://view.officeapps.live.com/op/view.aspx?src=${detailInfo.file}`" width='100%' height='100%'
+              frameborder='0'></iframe>
+          </template>
+          <el-result v-else icon="error" title="错误信息" sub-title="文件格式不支持">
+          </el-result>
+        </div>
+  
+        <!-- <div class="w-full flex justify-between items-center">
+          <el-button type="primary" :icon="ArrowLeft" circle size="large" />
+  
+          <div class="flex-auto flex justify-start items-center">
+            <div class="w-19/100 mx-4 flex flex-col cursor-pointer" v-for="i in data_zy">
+              <div class="w-full flex-none overflow-hidden  rounded-xl">
+                <img :src="i.img" alt="" class="w-full h-full">
+              </div>
+              <div class="p-2">
+                {{  i.title  }}
+              </div>
+            </div>
+          </div>
+  
+          <el-button type="primary" :icon="ArrowRight" circle size="large" />
+        </div> -->
+  
+      </div>
+    </div>
+  </template>
+    
+    

+ 25 - 18
src/router/index.js

@@ -76,27 +76,27 @@ export default createRouter({
 			component: () => import('~/pages/szmsg/tzkc/index.vue'),
 		},
 		{
-			path:'/tzkc_detail',
-			name:'tzkc_detail',
-			component: () =>import('~/pages/szmsg/tzkc/tzkc_detail/index.vue')
+			path: '/tzkc_detail',
+			name: 'tzkc_detail',
+			component: () => import('~/pages/szmsg/tzkc/tzkc_detail/index.vue')
 		},
 		{
-			path:'/yslm',
-			name:'yslm',
+			path: '/yslm',
+			name: 'yslm',
 			component: () => import('~/pages/szmsg/yslm/index.vue')
 		},
-    {
-      path: '/resource',
-	  name: 'resource',
-      title:'首页',
-      component: () => import("~/pages/courseResources.vue"),
-    },
-    {
-      path: '/resourceAll',
-	  name: 'resourceAll',
-      title:'首页',
-      component: () => import("~/pages/courseResourcesAll.vue"),
-    },
+		{
+			path: '/resource',
+			name: 'resource',
+			title: '首页',
+			component: () => import("~/pages/courseResources.vue"),
+		},
+		{
+			path: '/resourceAll',
+			name: 'resourceAll',
+			title: '首页',
+			component: () => import("~/pages/courseResourcesAll.vue"),
+		},
 		{
 			path: '/zbkt',
 			title: '直播课堂',
@@ -115,9 +115,16 @@ export default createRouter({
 							component: () => import("~/pages/zbkt/ssys/index.vue"),
 						},
 						{
-							path: 'content',
+							path: 'content/:id',
 							name: 'ssys_content',
 							component: () => import("~/pages/zbkt/ssys/content.vue"),
+							props: true
+						},
+						{
+							path: 'rtc/:id',
+							name: 'ssys_rtc',
+							component: () => import("~/pages/zbkt/ssys/rtc.vue"),
+							props: true
 						},
 					]
 				},

+ 2 - 2
src/utils/request.js

@@ -17,7 +17,7 @@ _request.interceptors.request.use(
     if (config.method?.toLocaleLowerCase() === 'get') {
       config.params = Object.assign({ token, }, config.params)
     } else {
-      config.data = Object.assign({ token, client: 'web', api: 'json', issubmit: '1', }, config.data)
+      config.data = Object.assign({ token, client: 'web', api: 'json', issubmit: '1', site: 'tyyx' }, config.data)
     }
     return config
   },
@@ -34,7 +34,7 @@ _request.interceptors.response.use(
     response.data.msg = response.data.msg.replaceAll(/<.*?>/g, ' ')
     const { code, msg } = response.data
     if (code !== '1') {
-        ElMessage.error(msg)
+      ElMessage.error(msg)
     }
     return response.data
   },