瀏覽代碼

更新打包

lex 3 年之前
父節點
當前提交
f46aadb37f

文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index-legacy.78f58d2a.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/index.1e494328.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/live-detail-legacy.26e1d3e0.js


文件差異過大導致無法顯示
+ 0 - 0
dist/assets/live-detail.224191a1.js


+ 2 - 2
dist/index.html

@@ -35,7 +35,7 @@
     <meta name="msapplication-tap-highlight" content="no" />
     <title>酷乐秀</title>
     <script src="./flexible.js" charset="UTF-8"></script>
-    <script type="module" crossorigin src="./assets/index.60cdb79c.js"></script>
+    <script type="module" crossorigin src="./assets/index.1e494328.js"></script>
     <link rel="modulepreload" href="./assets/vendor.d36f0b16.js">
     <link rel="modulepreload" href="./assets/index.e2218507.js">
     <link rel="stylesheet" href="./assets/vendor.18cd339d.css">
@@ -50,6 +50,6 @@
     <!-- <script type="module" src="/src/teacher/main.ts"></script> -->
     <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
     <script nomodule id="vite-legacy-polyfill" src="./assets/polyfills-legacy.691dc2b1.js"></script>
-    <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.c9e3751c.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
+    <script nomodule id="vite-legacy-entry" data-src="./assets/index-legacy.78f58d2a.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
   </body>
 </html>

+ 48 - 0
src/business-components/course-plan-step/index.module.less

@@ -68,6 +68,12 @@
     }
   }
 
+  .videoText {
+    padding-top: 6px;
+    color: var(--van-primary);
+    font-size: 14px;
+  }
+
   .videoImg {
     margin-top: 10px;
     width: 150px;
@@ -94,3 +100,45 @@
     }
   }
 }
+
+.videoList {
+  padding: 16px;
+
+  .videoTitle {
+    font-size: 18px;
+    font-weight: 500;
+    color: #333333;
+    line-height: 30px;
+    display: flex;
+    align-items: center;
+    i {
+      display: inline-block;
+      width: 4px;
+      height: 18px;
+      margin-right: 8px;
+      border-radius: 2px;
+      background-color: var(--van-primary);
+    }
+  }
+
+  .videoSection {
+    padding-top: 12px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    flex-wrap: wrap;
+  }
+
+  .videoItem {
+    width: 48%;
+    border-radius: 6px;
+    margin-bottom: 8px;
+  }
+
+  :global {
+    .plyr {
+      // width: 130px;
+      min-width: 50%;
+    }
+  }
+}

+ 50 - 3
src/business-components/course-plan-step/index.tsx

@@ -1,12 +1,16 @@
 import { defineComponent, PropType } from 'vue'
 import styles from './index.module.less'
-import { Icon, Image } from 'vant'
+import { Icon, Image, Popup } from 'vant'
 import videoStop from '@common/images/icon_video_stop.png'
+import VideoList from './video-list'
+import request from '@/helpers/request'
 
 interface IProps {
   courseTime: string
   coursePlan: string
   videoPosterUrl?: string
+  roomUid?: string
+  liveState?: number
   id?: number | string
 }
 
@@ -23,9 +27,32 @@ export default defineComponent({
       default: []
     }
   },
+  data() {
+    return {
+      videoStatus: false,
+      list: []
+    }
+  },
   mounted() {
     console.log(this.courseId, 'courseId 121212')
   },
+  methods: {
+    async onLookVideo(item: any) {
+      // console.log(item)
+      try {
+        const res = await request.get('/api-student/liveRoomVideo/queryVideo', {
+          params: {
+            roomUid: item.roomUid
+          }
+        })
+        console.log(res)
+        this.list = res.data || []
+        this.videoStatus = true
+      } catch {
+        //
+      }
+    }
+  },
   render() {
     return (
       <div class={styles['col-steps']}>
@@ -53,7 +80,18 @@ export default defineComponent({
                     </div>
                     <div class={styles.stepContent}>
                       <p>{item.coursePlan}</p>
-                      {item.videoPosterUrl && (
+
+                      {item.liveState === 2 && (
+                        <div
+                          class={styles.videoText}
+                          onClick={() => {
+                            this.onLookVideo(item)
+                          }}
+                        >
+                          查看回放{'>>'}
+                        </div>
+                      )}
+                      {/* {item.videoPosterUrl && (
                         <div class={styles.videoImg}>
                           <Image src={item.videoPosterUrl} fit="cover" />
                           <Icon
@@ -62,7 +100,7 @@ export default defineComponent({
                             size={32}
                           />
                         </div>
-                      )}
+                      )} */}
                     </div>
                   </div>
                 )}
@@ -72,6 +110,15 @@ export default defineComponent({
             </div>
           ))}
         </div>
+
+        <Popup
+          v-model:show={this.videoStatus}
+          closeable
+          round
+          style={{ width: '90%' }}
+        >
+          {this.videoStatus && <VideoList list={this.list} />}
+        </Popup>
       </div>
     )
   }

+ 42 - 0
src/business-components/course-plan-step/video-list.tsx

@@ -0,0 +1,42 @@
+import ColVideo from '@/components/col-video'
+import { defineComponent } from 'vue'
+import styles from './index.module.less'
+import videoBg from '@/common/images/video_default.png'
+import ColResult from '@/components/col-result'
+
+export default defineComponent({
+  name: 'VideoList',
+  props: {
+    list: {
+      type: Array,
+      default: []
+    }
+  },
+  render() {
+    return (
+      <div class={styles.videoList}>
+        <div class={styles.videoTitle}>
+          <i></i>视频列表
+        </div>
+        {this.list.length > 0 ? (
+          <div class={styles.videoSection}>
+            {this.list.map((item: any, index: number) => (
+              <div class={styles.videoItem}>
+                <ColVideo
+                  poster={videoBg}
+                  src={item.url}
+                  preload="none"
+                  height="82px"
+                  currentTime={false}
+                />
+                <p>{item.startTime}</p>
+              </div>
+            ))}
+          </div>
+        ) : (
+          <ColResult btnStatus={false} classImgSize="SMALL" tips="暂无视频" />
+        )}
+      </div>
+    )
+  }
+})

二進制
src/common/images/video_default.png


+ 17 - 3
src/components/col-video/index.tsx

@@ -1,4 +1,4 @@
-import { defineComponent } from 'vue'
+import { defineComponent, PropType } from 'vue'
 import styles from './index.module.less'
 import Plyr from 'plyr'
 import 'plyr/dist/plyr.css'
@@ -37,6 +37,14 @@ export default defineComponent({
       type: Object,
       default: () => ({})
     },
+    preload: {
+      type: String as PropType<'auto' | 'metadata' | 'none'>,
+      default: 'auto'
+    },
+    currentTime: {
+      type: Boolean,
+      default: true
+    },
     playsinline: {
       type: Boolean,
       default: true
@@ -96,14 +104,15 @@ export default defineComponent({
       //   'fullscreen' ,  // 切换全屏
       // ] ;
       let controls = [
-        'current-time',
         'play-large',
         'play',
         'progress',
         'captions',
         'fullscreen'
       ]
-
+      if (this.currentTime) {
+        controls.push('current-time')
+      }
       const params: any = {
         controls: controls,
         ...this.setting,
@@ -129,8 +138,12 @@ export default defineComponent({
         ? (this.player.elements.container.style.height = this.height || '210px')
         : null
 
+      if (this.preload === 'none') {
+        this.loading = false
+      }
       this.player.on('loadedmetadata', () => {
         this.loading = false
+        console.log('loading 1111')
         if (this.trySee) {
           this.domPlayVisibility()
         } else {
@@ -196,6 +209,7 @@ export default defineComponent({
           src={this.src}
           playsinline={this.playsinline}
           poster={this.poster}
+          preload={this.preload}
           style={{ ...this.styleValue }}
         />
         {/* 加载视频使用 */}

+ 5 - 1
src/student/live-class/live-detail.tsx

@@ -14,6 +14,8 @@ interface IProps {
   courseTime: string
   coursePlan: string
   videoPosterUrl?: string
+  roomUid?: string
+  liveState?: number
   id?: number | string
 }
 export default defineComponent({
@@ -59,6 +61,8 @@ export default defineComponent({
             startTime
           ).format('HH:mm')}~${dayjs(endTime).format('HH:mm')}`,
           coursePlan: item.plan,
+          roomUid: item.roomUid,
+          liveState: item.liveState,
           id: item.courseId
         })
       })
@@ -160,7 +164,7 @@ export default defineComponent({
             courseGroupId: live.courseGroupId,
             courseGroupName: live.courseGroupName,
             coursePrice: live.coursePrice,
-            teacherName: live.teacherName || `游客${live.teacherId || ''}`,
+            teacherName: live.userName || `游客${live.teacherId || ''}`,
             teacherId: live.teacherId,
             avatar: live.avatar,
             courseInfo: this.courseInfo

+ 1 - 1
src/student/trade/tradeOrder.ts

@@ -35,7 +35,7 @@ export const formatOrderDetail = async (item: any) => {
             courseGroupId: live.courseGroupId,
             courseGroupName: live.courseGroupName,
             coursePrice: live.coursePrice,
-            teacherName: live.teacherName || `游客${live.teacherId || ''}`,
+            teacherName: live.userName || `游客${live.teacherId || ''}`,
             teacherId: live.teacherId,
             avatar: live.avatar,
             courseInfo

+ 6 - 1
src/teacher/live-class/create-components/detail.tsx

@@ -13,6 +13,8 @@ interface IProps {
   courseTime: string
   coursePlan: string
   videoPosterUrl?: string
+  roomUid?: string
+  liveState?: number
   id?: number | string
 }
 export default defineComponent({
@@ -47,7 +49,10 @@ export default defineComponent({
           courseTime: `${dayjs(item.startTime).format('YYYY-MM-DD')} ${dayjs(
             item.startTime
           ).format('HH:mm')}~${dayjs(item.endTime).format('HH:mm')}`,
-          coursePlan: item.plan
+          roomUid: item.roomUid,
+          liveState: item.liveState,
+          coursePlan: item.plan,
+          id: item.courseId
         })
       })
       return tempArr || []

+ 4 - 0
src/teacher/live-class/live-detail.tsx

@@ -14,6 +14,8 @@ interface IProps {
   courseTime: string
   coursePlan: string
   videoPosterUrl?: string
+  roomUid?: string
+  liveState?: number
   id?: number | string
 }
 export default defineComponent({
@@ -60,6 +62,8 @@ export default defineComponent({
             startTime
           ).format('HH:mm')}~${dayjs(endTime).format('HH:mm')}`,
           coursePlan: item.plan,
+          roomUid: item.roomUid,
+          liveState: item.liveState,
           id: item.courseId
         })
       })

+ 6 - 0
src/views/article-center/help-center.tsx

@@ -11,6 +11,11 @@ export default defineComponent({
     const query = this.$route.query
     const title = query.catalogType == '2' ? '公告列表' : '帮助中心'
     document.title = title
+
+    // 处理兼容性问题
+    if (query.mode === 'accompany') {
+      query.platformType = 'ANALYSIS'
+    }
     return {
       list: [],
       dataShow: true, // 判断是否有数据
@@ -22,6 +27,7 @@ export default defineComponent({
         catalogIds: query.catalogType || 1,
         title: '',
         status: 1,
+        // STUDENT:学生 TEACHER:老师 ANALYSIS:智能陪练
         catalogType: query.platformType || state.platformType,
         page: 1,
         rows: 20

部分文件因文件數量過多而無法顯示