Jelajahi Sumber

Merge branch 'startLogin'

mo 1 tahun lalu
induk
melakukan
7e40ce992e

TEMPAT SAMPAH
src/components/layout/images/toolStartClass.png


TEMPAT SAMPAH
src/components/layout/images/toolbox.png


+ 16 - 14
src/components/layout/index.module.less

@@ -340,8 +340,8 @@
 }
 
 .toolboxImg {
-  width: 66px;
-  height: 62px;
+  width: 83px;
+  height: 83px;
   position: absolute;
   right: 32px;
   bottom: 84px;
@@ -350,19 +350,19 @@
 }
 
 .isDragIng {
-  width: 66px;
-  height: 62px;
+  width: 83px;
+  height: 83px;
 }
 
-.toolClassImg {
-  width: 66px;
-  height: 62px;
-  position: absolute;
-  right: 32px;
-  bottom: 160px;
-  cursor: pointer;
-  z-index: 1000;
-}
+// .toolClassImg {
+//   width: 100px;
+//   height: 100px;
+//   // position: absolute;
+//   // right: 32px;
+//   // bottom: 160px;
+//   // cursor: pointer;
+//   // z-index: 1000;
+// }
 
 :global {
   .moveable-control-box {
@@ -375,7 +375,7 @@
 }
 
 .booxToolWrap {
-  width: 286px;
+  // width: 286px;
   height: 95px;
   background: #ffffff;
   box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
@@ -387,11 +387,13 @@
   justify-content: space-between;
 
   .booxToolItem {
+    margin: 0 10px;
     display: flex;
     flex-direction: column;
     align-items: center;
     font-size: 12px;
     cursor: pointer;
+    text-align: center;
 
     &:hover {
       opacity: 0.8;

+ 46 - 13
src/components/layout/index.tsx

@@ -34,7 +34,7 @@ export default defineComponent({
     const showModalTone = ref(false);
     const showModalTime = ref(false);
     const showBoxConent = ref(false);
-    const dialog = useDialog()
+    const dialog = useDialog();
     const boxBoundaryInfo = reactive({
       isBoundary: true,
       isBoundaryType: 'right' as any,
@@ -318,15 +318,17 @@ export default defineComponent({
     };
     onMounted(() => {
       initMoveable();
-      initMoveableClass();
+      // initMoveableClass();
       const subdEl = document.getElementById(`moveNPopover`) as HTMLDivElement;
-      const classEl = document.getElementById(`moveNPopover2`) as HTMLDivElement;
-      initBoxRectInfo(subdEl,boxBoundaryInfo);
-      initBoxRectInfo(classEl,classBoundaryInfo);
-      initBoundaryWrap(subdEl,boxBoundaryInfo)
-      initBoundaryWrap(classEl,classBoundaryInfo)
+      // const classEl = document.getElementById(
+      //   `moveNPopover2`
+      // ) as HTMLDivElement;
+      initBoxRectInfo(subdEl, boxBoundaryInfo);
+      // initBoxRectInfo(classEl, classBoundaryInfo);
+      initBoundaryWrap(subdEl, boxBoundaryInfo);
+      // initBoundaryWrap(classEl, classBoundaryInfo);
     });
-    const initBoundaryWrap = (target:any,wrapInfo:any)=>{
+    const initBoundaryWrap = (target: any, wrapInfo: any) => {
       target.addEventListener('mouseenter', () => {
         if (wrapInfo.isBoundary) {
           // 如果在边框 就得还原 元素位置 还原完毕后 去除transition
@@ -372,11 +374,10 @@ export default defineComponent({
       //     }
       //   })
 
-
       // });
 
       actionEnd(target, 'right');
-    }
+    };
     const startShowModal = (val: 'setTimeIcon' | 'beatIcon' | 'toneIcon') => {
       if (val == 'setTimeIcon') {
         showModalTime.value = true;
@@ -427,7 +428,7 @@ export default defineComponent({
       }
     };
 
-    const initBoxRectInfo = (target:any,wrapInfo:any) => {
+    const initBoxRectInfo = (target: any, wrapInfo: any) => {
       // const subdEl = document.getElementById(`moveNPopover`) as HTMLDivElement;
       // console.log(subdEl, "subdEl", "drag");
       const subdElStyle = getComputedStyle(target, null);
@@ -476,7 +477,7 @@ export default defineComponent({
             {/* </div> */}
           </div>
         </div>
-        <img
+        {/* <img
           src={toolStartClass}
           id="moveNPopover2"
           style={{
@@ -492,7 +493,7 @@ export default defineComponent({
             isDragIng.value ? styles.isDragIng : ''
           ]}
           alt=""
-        />
+        /> */}
         <NPopover
           raw
           trigger="click"
@@ -538,6 +539,38 @@ export default defineComponent({
               <img src={setTimeIcon} alt="" />
               计时器
             </div>
+            <div   class={styles.booxToolItem} onClick={()=>{
+              showClass.value = true
+            }}  style={{
+                  display: [
+                    '/',
+                    '/home',
+                    '/classList',
+                    '/prepare-lessons'
+                  ].includes(route.path)
+                    ? 'none'
+                    : 'block'
+                }}>
+              <img
+                src={toolStartClass}
+
+                style={{
+                  display: [
+                    '/',
+                    '/home',
+                    '/classList',
+                    '/prepare-lessons'
+                  ].includes(route.path)
+                    ? 'none'
+                    : 'block'
+                }}
+                class={[
+                  styles.toolClassImg,
+                ]}
+                alt=""
+              />
+              开始上课
+            </div>
           </div>
         </NPopover>
 

+ 1 - 1
src/components/layout/layoutTop.tsx

@@ -81,7 +81,7 @@ export default defineComponent({
               class={styles.schoolIcon}
               previewDisabled></NImage>
             <p>
-              {info.value.schoolInfos[0].tenantName} |{' '}
+              {/* {info.value.schoolInfos[0].tenantName} |{' '} */}
               {info.value.schoolInfos[0].name}
             </p>
           </div>

+ 4 - 1
src/components/timerMeter/components/countdown.tsx

@@ -1,4 +1,4 @@
-import { defineComponent, ref, watch, nextTick, onMounted,computed } from 'vue';
+import { defineComponent, ref, watch, nextTick, onMounted,computed,onUnmounted } from 'vue';
 import styles from '../index.module.less';
 import { NTabs, NTabPane, NSpace, NButton, NImage, NInput, NInputNumber } from 'naive-ui';
 import { useRoute } from 'vue-router';
@@ -155,6 +155,9 @@ export default defineComponent({
       })
 
     })
+    onUnmounted(()=>{
+      soundVIdeo.pause()
+    })
    const addSecondTimer = (num:number)=>{
 
 

+ 20 - 0
src/custom-plugins/guide-page/api.ts

@@ -0,0 +1,20 @@
+import request from '@/utils/request';
+
+/**
+ * 设置引导页
+ */
+export const setGuidance = (params: any) => {
+  return request.post('/edu-app/functionGuidance/save', {
+    data: params
+  });
+};
+
+/**
+ * 获取引导页
+ */
+export const getGuidance = (params: any) => {
+  return request.get('/edu-app/functionGuidance/queryTagDetail', {
+    data: params,
+    params
+  });
+};

+ 29 - 12
src/custom-plugins/guide-page/attent-guide.tsx

@@ -12,6 +12,7 @@ import styles from './index.module.less';
 import { getImage } from './images';
 import { px2vw, px2vwH } from '@/utils/index';
 import { useRoute } from 'vue-router';
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'attent-guide',
   emits: ['close'],
@@ -133,12 +134,24 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).attentGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value &&guideInfo.value.attentGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+
+    getAllGuidance()
     const getStepELe = () => {
       const ele: HTMLElement = document.getElementById(`attent-${data.step}`)!;
 
@@ -180,16 +193,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { attentGuide: true };
+    const endGuide = async() => {
+
+      if (!guideInfo.value) {
+        guideInfo.value = { attentGuide: true };
       } else {
-        guideInfo.attentGuide = true;
+        guideInfo.value.attentGuide = true;
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
+      }
       //  localStorage.setItem('endC')
     };
     return () => (

+ 34 - 12
src/custom-plugins/guide-page/class-guide.tsx

@@ -11,6 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import { px2vw, px2vwH } from '@/utils/index';
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'coai-guide',
   emits: ['close'],
@@ -95,12 +96,30 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).classGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.classGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).classGuide) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
     const getStepELe = () => {
       const ele: HTMLElement = document.getElementById(`class-${data.step}`)!;
 
@@ -143,15 +162,18 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { classGuide: true };
+    const endGuide = async() => {
+
+      if (!guideInfo.value) {
+        guideInfo.value = { classGuide: true };
       } else {
-        guideInfo.classGuide = true;
+        guideInfo.value.classGuide = true;
+      }
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 36 - 12
src/custom-plugins/guide-page/data-guide.tsx

@@ -10,6 +10,7 @@ import {
 } from 'vue';
 import styles from './index.module.less';
 import { getImage } from './images';
+import {getGuidance,setGuidance} from './api'
 import {px2vw,px2vwH} from '@/utils/index'
 export default defineComponent({
   name: 'data-guide',
@@ -106,12 +107,30 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).dataGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.dataGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).dataGuide) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`data-${data.step}`)!;
@@ -155,15 +174,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo')|| '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { dataGuide: true };
+    const endGuide = async() => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo')|| '{}') || null;
+      if (!guideInfo.value) {
+        guideInfo.value = { dataGuide: true };
       } else {
-        guideInfo.dataGuide = true;
+        guideInfo.value.dataGuide = true;
+      }
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 30 - 12
src/custom-plugins/guide-page/home-guide.tsx

@@ -11,6 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import {px2vw,px2vwH} from '@/utils/index'
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'coai-guide',
   emits: ['close'],
@@ -172,12 +173,24 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).homeGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.homeGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`home-${data.step}`)!;
@@ -219,15 +232,20 @@ export default defineComponent({
       getStepELe();
     }
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { homeGuide: true };
+    const endGuide = async () => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
+      if (!guideInfo.value) {
+        guideInfo.value = { homeGuide: true };
       } else {
-        guideInfo.homeGuide = true;
+        guideInfo.value.homeGuide = true;
+      }
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 36 - 12
src/custom-plugins/guide-page/lessons-guide.tsx

@@ -11,6 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import {px2vw,px2vwH} from '@/utils/index'
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'lessons-guide',
   emits: ['close'],
@@ -144,12 +145,30 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).lessonsGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.lessonsGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).lessonsGuide) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`lessons-${data.step}`)!;
@@ -193,15 +212,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo')|| '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { lessonsGuide: true };
+    const endGuide = async() => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo')|| '{}') || null;
+      if (!guideInfo.value) {
+        guideInfo.value = { lessonsGuide: true };
       } else {
-        guideInfo.lessonsGuide = true;
+        guideInfo.value.lessonsGuide = true;
+      }
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 35 - 12
src/custom-plugins/guide-page/music-guide.tsx

@@ -11,6 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import {px2vw,px2vwH} from '@/utils/index'
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'music-guide',
   emits: ['close'],
@@ -102,12 +103,29 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).musicGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.musicGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).musicGuide) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`music-${data.step}`)!;
@@ -155,15 +173,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo')|| '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { musicGuide: true };
+    const endGuide = async() => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo')|| '{}') || null;
+      if (!guideInfo.value) {
+        guideInfo.value = { musicGuide: true };
       } else {
-        guideInfo.musicGuide = true;
+        guideInfo.value.musicGuide = true;
+      }
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 34 - 13
src/custom-plugins/guide-page/myColloge-guide.tsx

@@ -11,7 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import {px2vw} from '@/utils/index'
-
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'myColloge-guide',
   emits: ['close'],
@@ -55,12 +55,28 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).myColloge) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.myColloge) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
     }
+    getAllGuidance()
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).myColloge) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`myColloge-${data.step}`)!;
@@ -103,15 +119,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { myColloge: true };
+    const endGuide = async() => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
+      if (!guideInfo.value) {
+        guideInfo.value = { myColloge: true };
       } else {
-        guideInfo.myColloge = true;
+        guideInfo.value.myColloge = true;
+      }
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 36 - 13
src/custom-plugins/guide-page/myResources-guide.tsx

@@ -11,7 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import {px2vw} from '@/utils/index'
-
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'myResources-guide',
   emits: ['close'],
@@ -59,12 +59,30 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).myResourcesGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.myResourcesGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).myResourcesGuide) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`myResources-${data.step}`)!;
@@ -108,15 +126,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { myResourcesGuide: true };
+    const endGuide = async() => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
+      if (guideInfo.value) {
+        guideInfo.value = { myResourcesGuide: true };
       } else {
-        guideInfo.myResourcesGuide = true;
+        guideInfo.value.myResourcesGuide = true;
+      }
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 41 - 19
src/custom-plugins/guide-page/shareResources-guide.tsx

@@ -11,7 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import {px2vw} from '@/utils/index'
-
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'shareResources-guide',
   emits: ['close'],
@@ -51,7 +51,7 @@ export default defineComponent({
             height:28
           },
           boxStyle:{
-            borderRadius: '30px'
+            borderRadius: '30px',
           },
         },
         {
@@ -59,13 +59,13 @@ export default defineComponent({
           img: getImage('shareResources2.png'),
           imgStyle: {
 
-            left:  px2vw(134),
-            width: px2vw(515),
-            height:px2vw(227)
+            left:  px2vw(99),
+            width: px2vw(618),
+            height:px2vw(273)
           },
           btnsStyle: {
-            bottom: px2vw(75),
-            left: px2vw(253),
+            bottom: px2vw(88),
+            left: px2vw(240),
           },
 
           eleRectPadding:{
@@ -84,12 +84,29 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).shareResourcesGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.shareResourcesGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).shareResourcesGuide) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`shareResources-${data.step}`)!;
@@ -144,15 +161,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo')||'{}') || null;
-      if (!guideInfo) {
-        guideInfo = { shareResourcesGuide: true };
+    const endGuide = async() => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo')||'{}') || null;
+      if (!guideInfo.value) {
+        guideInfo.value = { shareResourcesGuide: true };
       } else {
-        guideInfo.shareResourcesGuide = true;
+        guideInfo.value.shareResourcesGuide = true;
+      }
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 35 - 12
src/custom-plugins/guide-page/student-guide.tsx

@@ -11,6 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import {px2vw,px2vwH} from '@/utils/index'
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'coai-guide',
   emits: ['close'],
@@ -79,12 +80,29 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).studentGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.studentGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).studentGuide) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`student-${data.step}`)!;
@@ -127,15 +145,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { studentGuide: true };
+    const endGuide = async() => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
+      if (!guideInfo.value) {
+        guideInfo.value = { studentGuide: true };
       } else {
-        guideInfo.studentGuide = true;
+        guideInfo.value.studentGuide = true;
+      }
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 36 - 12
src/custom-plugins/guide-page/teacher-guide.tsx

@@ -11,6 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import {px2vw,px2vwH} from '@/utils/index'
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'teacher-guide',
   emits: ['close'],
@@ -81,12 +82,30 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).teacherGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).teacherGuide) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
+
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.teacherGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`teacher-${data.step}`)!;
@@ -130,15 +149,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { teacherGuide: true };
+    const endGuide = async() => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
+      if (!guideInfo.value) {
+        guideInfo.value = { teacherGuide: true };
       } else {
-        guideInfo.teacherGuide = true;
+        guideInfo.value.teacherGuide = true;
+      }
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 35 - 12
src/custom-plugins/guide-page/train-guide.tsx

@@ -11,6 +11,7 @@ import {
 import styles from './index.module.less';
 import { getImage } from './images';
 import {px2vw,px2vwH} from '@/utils/index'
+import {getGuidance,setGuidance} from './api'
 export default defineComponent({
   name: 'train-guide',
   emits: ['close'],
@@ -56,12 +57,29 @@ export default defineComponent({
       step: 0
     });
     const tipShow = ref(false);
-    const guideInfo = localStorage.getItem('teacher-guideInfo');
-    if (guideInfo && JSON.parse(guideInfo).trainGuide) {
-      tipShow.value = false;
-    } else {
-      tipShow.value = true;
+    const guideInfo = ref({} as any)
+    const getAllGuidance = async()=>{
+      try{
+        const res = await getGuidance({guideTag:'teacher-guideInfo'})
+        guideInfo.value = JSON.parse(res.data?.guideValue)
+        if (guideInfo.value && guideInfo.value.trainGuide) {
+          tipShow.value = false;
+        } else {
+          tipShow.value = true;
+        }
+      }catch(e){
+        console.log(e)
+      }
+      // const guideInfo = localStorage.getItem('teacher-guideInfo');
+
     }
+    getAllGuidance()
+    // const guideInfo = localStorage.getItem('teacher-guideInfo');
+    // if (guideInfo && JSON.parse(guideInfo).trainGuide) {
+    //   tipShow.value = false;
+    // } else {
+    //   tipShow.value = true;
+    // }
     const getStepELe = () => {
 
       const ele: HTMLElement = document.getElementById(`train-${data.step}`)!;
@@ -104,15 +122,20 @@ export default defineComponent({
       getStepELe();
     };
 
-    const endGuide = () => {
-      let guideInfo =
-        JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
-      if (!guideInfo) {
-        guideInfo = { trainGuide: true };
+    const endGuide = async() => {
+      // let guideInfo =
+      //   JSON.parse(localStorage.getItem('teacher-guideInfo') || '{}') || null;
+      if (!guideInfo.value) {
+        guideInfo.value = { trainGuide: true };
       } else {
-        guideInfo.trainGuide = true;
+        guideInfo.value.trainGuide = true;
+      }
+      try{
+        const res = await setGuidance({guideTag:'teacher-guideInfo',guideValue:JSON.stringify(guideInfo.value)})
+      }catch(e){
+        console.log(e)
       }
-      localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
+      // localStorage.setItem('teacher-guideInfo', JSON.stringify(guideInfo));
       tipShow.value = false;
       //  localStorage.setItem('endC')
     };

+ 8 - 7
src/views/attend-class/index.module.less

@@ -436,8 +436,8 @@
 
 
 .toolboxImg {
-  width: 66px;
-  height: 62px;
+  width: 83px;
+  height: 83px;
   position: absolute;
   right: 16px;
   bottom: 164px;
@@ -446,13 +446,13 @@
 }
 
 .isDragIng {
-  width: 66px;
-  height: 62px;
+  width: 83px;
+  height: 83px;
 }
 
 .toolClassImg {
-  width: 66px;
-  height: 62px;
+  width: 83px;
+  height: 83px;
   position: absolute;
   right: 32px;
   bottom: 160px;
@@ -471,7 +471,7 @@
 }
 
 .booxToolWrap {
-  width: 286px;
+  // width: 286px;
   height: 95px;
   background: #ffffff;
   box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
@@ -484,6 +484,7 @@
   overflow: hidden;
 
   .booxToolItem {
+    margin: 0 10px;
     display: flex;
     flex-direction: column;
     align-items: center;

+ 13 - 1
src/views/prepare-lessons/components/lesson-main/courseware/index.tsx

@@ -195,11 +195,14 @@ export default defineComponent({
       console.log(state.application, 'state.application');
       if (state.application) {
         forms.previewModal = true;
+        fscreen()
         forms.previewParams = {
           type: 'preview',
           subjectId: prepareStore.getSubjectId,
           detailId: prepareStore.getSelectKey
         };
+
+
       } else {
         const { href } = router.resolve({
           path: '/attend-class',
@@ -212,7 +215,16 @@ export default defineComponent({
         window.open(href, +new Date() + '');
       }
     };
-
+    const fscreen=()=> {
+      const el = document.documentElement
+      const isFullscreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen
+      if (!isFullscreen) {
+        //进入全屏
+        (el.requestFullscreen && el.requestFullscreen()) ||
+        (el.mozRequestFullScreen && el.mozRequestFullScreen()) ||
+        (el.webkitRequestFullscreen && el.webkitRequestFullscreen()) ||
+        (el.msRequestFullscreen && el.msRequestFullscreen())
+      } }
     // 单个删除
     const onRemove = async (item: any) => {
       try {