liushengqiang 2 سال پیش
والد
کامیت
1612f18854

+ 0 - 3
src/views/courseware-list/component/book/index.module.less

@@ -25,9 +25,6 @@
             transition: margin-left 0.2s ease-in-out;
         }
 
-        #flipbook {
-            // margin: 0 auto;
-        }
 
         .page {
             background: white;

+ 9 - 5
src/views/courseware-list/component/book/index.tsx

@@ -53,8 +53,8 @@ export default defineComponent({
       });
     };
     const init = async () => {
-    //   await handleCreate('jquery', '/book/jquery.min.1.7.js');
-    //   await handleCreate('turn', '/book/turn.js');
+      //   await handleCreate('jquery', '/book/jquery.min.1.7.js');
+      //   await handleCreate('turn', '/book/turn.js');
       console.log('初始化完成');
     };
     let book: any = null;
@@ -134,7 +134,7 @@ export default defineComponent({
     const getList = () => {
       if (!props.bookData?.lessonList) return;
       const step = Math.floor((document.body.clientHeight * 0.8 - 40) / 50);
-      console.log("🚀 ~ step:", step)
+      console.log('🚀 ~ step:', step);
       const list = [];
       let listItem = [] as any[];
       for (let i = 0; i < props.bookData.lessonList.length; i++) {
@@ -179,7 +179,7 @@ export default defineComponent({
         </div>
         <div class="bookWrap" style={{ width: data.width + 'px' }}>
           {!!data.list.length && (
-            <div id="flipbook" class={[data.show && "animated"]}>
+            <div id="flipbook" class={[data.show && 'animated']}>
               <div class="page">
                 <img
                   style="width: 100%; height: 100%; object-fit: cover;"
@@ -195,7 +195,11 @@ export default defineComponent({
                         return (
                           <div
                             class={[styles.item, item.id && styles.des]}
-                            onClick={() => {
+                            onTouchstart={(e: TouchEvent) => {
+                                e.stopPropagation();
+                            }}
+                            onClick={(e: Event) => {
+                              e.stopPropagation();
                               if (item.id) {
                                 router.push({
                                   path: '/courseware-play',

+ 11 - 11
src/views/courseware-play/index.tsx

@@ -70,17 +70,17 @@ export default defineComponent({
       //设置容器16:9
       setContainer();
       // 横屏
-      postMessage(
-        {
-          api: 'setRequestedOrientation',
-          content: {
-            orientation: type
-          }
-        },
-        () => {
-          console.log(234);
-        }
-      );
+      // postMessage(
+      //   {
+      //     api: 'setRequestedOrientation',
+      //     content: {
+      //       orientation: type
+      //     }
+      //   },
+      //   () => {
+      //     console.log(234);
+      //   }
+      // );
       // 头,包括返回箭头
       // postMessage({
       //   api: 'setTitleBarVisibility',