|  | @@ -10,7 +10,7 @@ import {
 | 
	
		
			
				|  |  |  import styles from './index.module.less';
 | 
	
		
			
				|  |  |  import icon_back from '../../image/icon_back.svg';
 | 
	
		
			
				|  |  |  import icon_play from '../../image/icon_class.png';
 | 
	
		
			
				|  |  | -import pre from '../../image/pre.png'
 | 
	
		
			
				|  |  | +import pre from '../../image/pre.png';
 | 
	
		
			
				|  |  |  import { useRouter } from 'vue-router';
 | 
	
		
			
				|  |  |  import { listenerMessage, postMessage } from '@/helpers/native-message';
 | 
	
		
			
				|  |  |  import { showToast } from 'vant';
 | 
	
	
		
			
				|  | @@ -58,9 +58,9 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        isClick: false
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      const showGuide = ref(false);
 | 
	
		
			
				|  |  | -    const isend = ref(false)
 | 
	
		
			
				|  |  | -    const step = ref(0)
 | 
	
		
			
				|  |  | -    const CoursewareDetailRef = ref()
 | 
	
		
			
				|  |  | +    const isend = ref(false);
 | 
	
		
			
				|  |  | +    const step = ref(0);
 | 
	
		
			
				|  |  | +    const CoursewareDetailRef = ref();
 | 
	
		
			
				|  |  |      const handleCreate = (key: string, url: string) => {
 | 
	
		
			
				|  |  |        return new Promise((resolve, reject) => {
 | 
	
		
			
				|  |  |          const _s = document.head.querySelector(`script[data-key="${key}"]`);
 | 
	
	
		
			
				|  | @@ -81,7 +81,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        //   await handleCreate('turn', '/book/turn.js');
 | 
	
		
			
				|  |  |        console.log('初始化完成');
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  | -    const isFirest = ref(true)
 | 
	
		
			
				|  |  | +    const isFirest = ref(true);
 | 
	
		
			
				|  |  |      let book: any = null;
 | 
	
		
			
				|  |  |      let timer: any = null;
 | 
	
		
			
				|  |  |      const handleBook = () => {
 | 
	
	
		
			
				|  | @@ -101,8 +101,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          height: data.height, // 高度 单位 px
 | 
	
		
			
				|  |  |          gradients: true // 是否显示翻页阴影效果
 | 
	
		
			
				|  |  |          // display: 'single', //设置单页还是双页
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |        book.bind('start', (event: Event, pageObject: any, corner: any) => {
 | 
	
		
			
				|  |  |          // console.log(event, 'last', pageObject.next)
 | 
	
	
		
			
				|  | @@ -117,13 +116,13 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (data.isClick) {
 | 
	
		
			
				|  |  |            nextTick(() => {
 | 
	
		
			
				|  |  | -            data.isClick = false
 | 
	
		
			
				|  |  | +            data.isClick = false;
 | 
	
		
			
				|  |  |              if (corner == 'tl' || corner == 'tr') {
 | 
	
		
			
				|  |  |                event.preventDefault();
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                book.turn('page', pageObject.next);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -          })
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |        book.bind('turned', (event: Event, page: any, corner: any) => {
 | 
	
	
		
			
				|  | @@ -137,8 +136,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          nextTick(() => {
 | 
	
		
			
				|  |  |            showGuide.value = true;
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // if (page + 1 === book.turn('pages')) {
 | 
	
		
			
				|  |  |          //   // noanimateClose()
 | 
	
	
		
			
				|  | @@ -200,7 +198,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |      const handleClose = (gotoOne = true) => {
 | 
	
		
			
				|  |  | -      showGuide.value = false
 | 
	
		
			
				|  |  | +      showGuide.value = false;
 | 
	
		
			
				|  |  |        // book.turn('disabled', false);
 | 
	
		
			
				|  |  |        if (isend.value) {
 | 
	
		
			
				|  |  |          return;
 | 
	
	
		
			
				|  | @@ -232,7 +230,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        listenerMessage('webViewOnResume', () => {
 | 
	
		
			
				|  |  |          data.lastTime = localStorage.getItem(lastTimeKey);
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      const getList = () => {
 | 
	
		
			
				|  |  |        if (!props.bookData?.lessonList) return;
 | 
	
	
		
			
				|  | @@ -268,7 +265,6 @@ export default defineComponent({
 | 
	
		
			
				|  |  |        () => props.show,
 | 
	
		
			
				|  |  |        () => {
 | 
	
		
			
				|  |  |          if (props.show) {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |            getList();
 | 
	
		
			
				|  |  |            nextTick(() => {
 | 
	
		
			
				|  |  |              handleBook();
 | 
	
	
		
			
				|  | @@ -289,6 +285,7 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          const query = queryString.stringify({
 | 
	
		
			
				|  |  |            id: item.id,
 | 
	
		
			
				|  |  |            lessonCoursewareId: item.lessonCoursewareId,
 | 
	
		
			
				|  |  | +          courseId: props.bookData.id,
 | 
	
		
			
				|  |  |            lessonCoursewareDetailId: item.lessonCoursewareDetailId,
 | 
	
		
			
				|  |  |            name: item.name,
 | 
	
		
			
				|  |  |            subjectId: props.subjectId,
 | 
	
	
		
			
				|  | @@ -306,37 +303,37 @@ export default defineComponent({
 | 
	
		
			
				|  |  |              c_orientation: 0 // 0 横屏 1 竖屏
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          });
 | 
	
		
			
				|  |  | -        // router.push({
 | 
	
		
			
				|  |  | -        //   path: '/courseware-play',
 | 
	
		
			
				|  |  | -        //   query: {
 | 
	
		
			
				|  |  | -        //     id: item.id,
 | 
	
		
			
				|  |  | -        //     subjectId: props.subjectId,
 | 
	
		
			
				|  |  | -        //     lessonCoursewareId: item.lessonCoursewareId,
 | 
	
		
			
				|  |  | -        //     lessonCoursewareDetailId: item.lessonCoursewareDetailId,
 | 
	
		
			
				|  |  | -        //     name: item.name,
 | 
	
		
			
				|  |  | -        //     tab: props.tab
 | 
	
		
			
				|  |  | -        //   }
 | 
	
		
			
				|  |  | -        // });
 | 
	
		
			
				|  |  | +        router.push({
 | 
	
		
			
				|  |  | +          path: '/courseware-play',
 | 
	
		
			
				|  |  | +          query: {
 | 
	
		
			
				|  |  | +            id: item.id,
 | 
	
		
			
				|  |  | +            subjectId: props.subjectId,
 | 
	
		
			
				|  |  | +            lessonCoursewareId: item.lessonCoursewareId,
 | 
	
		
			
				|  |  | +            courseId: props.bookData.id,
 | 
	
		
			
				|  |  | +            lessonCoursewareDetailId: item.lessonCoursewareDetailId,
 | 
	
		
			
				|  |  | +            name: item.name,
 | 
	
		
			
				|  |  | +            tab: props.tab
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      const isStartAnimate = (item: any) => {
 | 
	
		
			
				|  |  |        // console.log(item) item.name.length > 9 ? true :
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      return false
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +      return false;
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      const changeShowGuide = (flag: boolean) => {
 | 
	
		
			
				|  |  | -      showGuide.value = flag
 | 
	
		
			
				|  |  | +      showGuide.value = flag;
 | 
	
		
			
				|  |  |        if (flag) {
 | 
	
		
			
				|  |  | -        console.log('changeShowGuide禁用')
 | 
	
		
			
				|  |  | +        console.log('changeShowGuide禁用');
 | 
	
		
			
				|  |  |          // book.turn('disabled', true);
 | 
	
		
			
				|  |  |        } else {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        console.log('changeShowGuide取消禁用')
 | 
	
		
			
				|  |  | +        console.log('changeShowGuide取消禁用');
 | 
	
		
			
				|  |  |          // book.turn('disabled', false);
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    };
 | 
	
		
			
				|  |  |      return () => (
 | 
	
		
			
				|  |  |        <div
 | 
	
		
			
				|  |  |          class={[styles.book, data.show ? '' : styles.bookHide]}
 | 
	
	
		
			
				|  | @@ -393,13 +390,19 @@ export default defineComponent({
 | 
	
		
			
				|  |  |                                    class={styles.name}
 | 
	
		
			
				|  |  |                                    style={{ lineHeight: '20Px' }}>
 | 
	
		
			
				|  |  |                                    {data.lastTime === item.id && (
 | 
	
		
			
				|  |  | -                                    <img src={pre} alt="" class={styles.preIcon} />
 | 
	
		
			
				|  |  | +                                    <img
 | 
	
		
			
				|  |  | +                                      src={pre}
 | 
	
		
			
				|  |  | +                                      alt=""
 | 
	
		
			
				|  |  | +                                      class={styles.preIcon}
 | 
	
		
			
				|  |  | +                                    />
 | 
	
		
			
				|  |  |                                    )}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -                                  <div class={styles.nameText}> {item.name}</div>
 | 
	
		
			
				|  |  | +                                  <div class={styles.nameText}>
 | 
	
		
			
				|  |  | +                                    {' '}
 | 
	
		
			
				|  |  | +                                    {item.name}
 | 
	
		
			
				|  |  | +                                  </div>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                                    {/* <TheNoticeBar text={item.name} isAnimation={isStartAnimate(item)}></TheNoticeBar> */}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |                                  </div>
 | 
	
		
			
				|  |  |                                </div>
 | 
	
		
			
				|  |  |                              </>
 | 
	
	
		
			
				|  | @@ -431,9 +434,9 @@ export default defineComponent({
 | 
	
		
			
				|  |  |                </div>
 | 
	
		
			
				|  |  |              </div>
 | 
	
		
			
				|  |  |            )}
 | 
	
		
			
				|  |  | -        </div >
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  |          {/* {showGuide.value ? <CoursewareDetail onChangeShowGuide={changeShowGuide} ref={CoursewareDetailRef}></CoursewareDetail> : null} */}
 | 
	
		
			
				|  |  | -      </div >
 | 
	
		
			
				|  |  | +      </div>
 | 
	
		
			
				|  |  |      );
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  });
 |