Pārlūkot izejas kodu

Merge branch 'iteration-20241018-courseware' into jenkins-main

lex-xin 3 mēneši atpakaļ
vecāks
revīzija
2dcd55cc6b

+ 7 - 2
src/views/coursewarePlay/component/courseware-tips/index.tsx

@@ -1,4 +1,4 @@
-import { defineComponent, PropType } from "vue";
+import { defineComponent, PropType, ref, watch } from "vue";
 import styles from './index.module.less'
 
 export default defineComponent({
@@ -11,6 +11,10 @@ export default defineComponent({
     content: {
       type: String,
       default: ''
+    },
+    show: {
+      type: Boolean,
+      default: false
     }
   },
   emits: ['close'],
@@ -22,7 +26,8 @@ export default defineComponent({
       <div class={styles.title}>
         {props.titleName}
       </div>
-      <div class={styles.content} v-html={props.content}></div>
+      {props.show && <div class={styles.content} v-html={props.content}></div>}
+      
     </div>
   }
 })

+ 3 - 1
src/views/coursewarePlay/component/courseware-type/index.tsx

@@ -1,4 +1,4 @@
-import { defineComponent } from 'vue';
+import { defineComponent, onUnmounted, ref, watch } from 'vue';
 import styles from './index.module.less';
 import { iconMenucw, iconArrow } from '../../image/icons.json';
 import { NoticeBar } from 'vant';
@@ -13,6 +13,8 @@ export default defineComponent({
   },
   emits: ["confirm"],
   setup(props, { emit }) {
+   
+
     return () => (
       <div class={styles.container}>
         <div class={styles.pointHead}>

+ 8 - 7
src/views/coursewarePlay/component/video-play.tsx

@@ -4,13 +4,14 @@ import { defineComponent, nextTick, onMounted, reactive, toRefs, watch } from 'v
 import { ref } from 'vue'
 import styles from './video.module.less'
 
-import iconLoop from '../image/icon-loop.svg'
-import iconLoopActive from '../image/icon-loop-active.svg'
-import iconplay from '../image/icon-play.svg'
-import iconpause from '../image/icon-pause.svg'
+// import iconLoop from '../image/icon-loop.svg'
+// import iconLoopActive from '../image/icon-loop-active.svg'
+// import iconPlay from '../image/icon-play.svg'
+// import iconPause from '../image/icon-pause.svg'
+import { iconLoop, iconLoopActive, iconPlay, iconPause, iconSpeed } from '../image/icons.json'
 import { postMessage } from '@/helpers/native-message'
 import qs from 'query-string'
-import { iconSpeed } from '../image/icons.json'
+// import { iconSpeed } from '../image/icons.json'
 import TCPlayer from 'tcplayer.js'
 import 'tcplayer.js/dist/tcplayer.min.css'
 import { showToast, Slider } from 'vant'
@@ -414,9 +415,9 @@ export default defineComponent({
                   onToggleAudio(data.playState === 'pause' ? 'play' : 'pause')
                 }}
               >
-                <img src={data.playState === 'pause' ? iconplay : iconpause} />
+                <img src={data.playState === 'pause' ? iconPlay : iconPause} />
               </div>
-              <div class={styles.actionBtn} onClick={() => {
+              <div class={[styles.actionBtn, styles.btnLoop]} onClick={() => {
                   toggleLoop()
                   showToast(data.loop ? '已打开循环播放' : '已关闭循环播放')
                 }}>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
src/views/coursewarePlay/component/video.module.less


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
src/views/coursewarePlay/image/icons.json


+ 10 - 3
src/views/coursewarePlay/index.module.less

@@ -37,6 +37,7 @@
   background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
   transition: transform 0.5s;
   box-sizing: border-box;
+  pointer-events: none;
 
   div {
     box-sizing: border-box;
@@ -56,6 +57,7 @@
   :global {
     .van-icon {
       margin-right: 8px;
+      pointer-events: auto;
     }
   }
 
@@ -65,6 +67,7 @@
       font-size: 16px;
       color: #ffffff;
       line-height: 22px;
+      pointer-events: auto;
     }
   }
   .titleContent {
@@ -75,17 +78,19 @@
       font-size: 14px;
       color: #ffffff;
       line-height: 20px;
+      pointer-events: auto;
     }
     span {
       margin-left: 6px;
       font-size: 11px;
       color: #ffffff;
-      line-height: 1.3;
+      line-height: 1.4;
       background: rgba(0, 0, 0, 0.1);
-      border-radius: 10px;
+      border-radius: 15px;
       border: 1px solid rgba(255, 255, 255, 0.7);
-      padding: 2px 8px;
+      padding: 3px 8px 2px;
       box-sizing: content-box;
+      pointer-events: auto;
     }
   }
 }
@@ -106,6 +111,7 @@
     color: #FFFFFF;
     line-height: 20px;
     padding-right: 20px;
+    pointer-events: auto;
   }
 
   .rightBtn {
@@ -113,6 +119,7 @@
     justify-content: center;
     align-items: center;
     height: 100%;
+    pointer-events: auto;
 
     img {
       width: 24px;

+ 2 - 2
src/views/coursewarePlay/index.tsx

@@ -1255,7 +1255,7 @@ export default defineComponent({
                 </div>
             </div>
           </div>
-          {data.isCourse && <PlayRecordTime ref={playRef} isCurrentCoursewareMenu={isCurrentCoursewareMenu.value} list={data.knowledgePointList} />}
+          {data.isCourse && isCurrentCoursewareMenu.value && <PlayRecordTime ref={playRef} isCurrentCoursewareMenu={isCurrentCoursewareMenu.value} list={data.knowledgePointList} />}
           {/* <div
             class={styles.menu}
             onClick={() => {
@@ -1393,7 +1393,7 @@ export default defineComponent({
           onClose={handleClosePopup}>
           <CoursewareTips onClose={() => {
             popupData.pointOpen = false
-          }} content={popupData.pointContent} titleName={popupData.pointTitle} />
+          }} show={popupData.pointOpen} content={popupData.pointContent} titleName={popupData.pointTitle} />
         </Popup>
 
         <GlobalTools />

+ 0 - 8
src/views/coursewarePlay/playRecordTime.tsx

@@ -30,14 +30,6 @@ export default defineComponent({
       }
     })
 
-    watch(() => props.isCurrentCoursewareMenu, () => {
-      if (!props.isCurrentCoursewareMenu) {
-        handleOut()
-      } else {
-        getPlayTime(true)
-      }
-    })
-
     const handleOut = () => {
       clearInterval(timerRecord.value)
       handleRecord(true)

+ 1 - 1
vite.config.ts

@@ -12,7 +12,7 @@ function resolve(dir: string) {
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
 // const proxyUrl = 'https://online.lexiaoya.cn/';
-const proxyUrl = 'https://dev.lexiaoya.cn/'
+const proxyUrl = 'https://test.lexiaoya.cn/'
 // const proxyUrl = 'http://47.98.131.38:8989/'
 // const proxyUrl = 'http://192.168.3.20:8989/' // 邹旋
 // const proxyUrl = 'http://192.168.3.143:8989/' // 尚科

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels