Browse Source

Merge branch 'master' of http://git.dayaedu.com/lex/orchestra-app

mo 2 years ago
parent
commit
107585baff

+ 1 - 0
src/teacher/screen-projection/index.tsx

@@ -51,6 +51,7 @@ export default defineComponent({
       router.push({
         path: '/coursewarePlay',
         query: {
+          ...query,
           id: query.lessonCoursewareDetailId,
           kId: n.knowledgePointId,
           mId: n.id

+ 3 - 2
src/views/accompany/category.tsx

@@ -15,6 +15,7 @@ export default defineComponent({
     }
   },
   setup(props, ctx) {
+    console.log("🚀 ~ props", props.musicTree)
     const router = useRouter()
 
     return () => (
@@ -44,9 +45,9 @@ export default defineComponent({
             </div>
           )
         })}
-        <Button onClick={() => {
+        {/* <Button onClick={() => {
             location.href = `http://192.168.3.114:1000/#/accompany`
-        }}>测试</Button>
+        }}>测试</Button> */}
       </div>
     )
   }

+ 7 - 6
src/views/accompany/index.tsx

@@ -49,27 +49,28 @@ export default defineComponent({
         )
         if (Array.isArray(res?.data)) {
           data.svgs = res.data.map((n: any, index: number) => {
-            // console.log('🚀 ~ n', n)
             return {
               ...n,
               id: n.id,
               icon: n.coverImg,
               btnIcon: getImage('b2.svg'),
-              color: svgs[index].color,
+              color: '#9881FF',
               title: n.name,
-              subtitle: svgs[index].subtitle,
+              subtitle: '',
               btnText: 'GO >'
             }
           })
-          //   console.log('🚀 ~ data.svgs', data.svgs)
+            console.log('🚀 ~ data.svgs', data.svgs)
         }
-      } catch (error) {}
+      } catch (error) {
+        console.log(error)
+      }
       handleOpen()
     }
     const handleOpen = () => {
       const src: string = route?.path || 'accompany'
-    //   console.log('🚀 ~ route.path', src)
       data.childPath = src.replace(/\//g, '') || 'accompany'
+        console.log('🚀 ~ route.path', data.childPath)
     }
     watch(
       () => route.path,

+ 2 - 2
src/views/accompany/music-list.tsx

@@ -204,7 +204,7 @@ export default defineComponent({
           </div>
         </div>
         {headerData.height && <div style={{height: headerData.height + 'px'}}></div>}
-        <Cell
+        {/* <Cell
           center
           title="无别,胜强测试"
           isLink
@@ -226,7 +226,7 @@ export default defineComponent({
                 location.href = src
             }
           }}
-        ></Cell>
+        ></Cell> */}
         <PullRefresh v-model:modelValue={data.refreshing} onRefresh={onRefresh}>
           <List
             immediateCheck={false}

+ 4 - 1
src/views/courseList/index.tsx

@@ -12,9 +12,11 @@ export default defineComponent({
     const route = useRoute()
     const router = useRouter()
     const data = reactive({
+      loading: true,
       list: [] as any
     })
     const getList = async () => {
+      data.loading = true
       if (route.query.courseScheduleId) {
         try {
           const res: any = await request.post(
@@ -40,6 +42,7 @@ export default defineComponent({
           }
         } catch (error) {}
       }
+      data.loading = false
     }
     onMounted(() => {
       getList()
@@ -115,7 +118,7 @@ export default defineComponent({
             )
           })}
         </Grid>
-        {!data.list.length && <Empty description="空空如也" />}
+        {!data.loading && !data.list.length && <Empty description="空空如也" />}
         {/* <Button
           onClick={() => {
             location.href =

+ 24 - 3
src/views/coursewarePlay/component/points.tsx

@@ -1,6 +1,7 @@
-import { defineComponent } from 'vue'
+import { defineComponent, reactive } from 'vue'
 import styles from './point.module.less'
 import iconMulv from '../image/icon-mulv.svg'
+import { Collapse, CollapseItem } from 'vant'
 export default defineComponent({
   name: 'points',
   props: {
@@ -14,7 +15,10 @@ export default defineComponent({
     }
   },
   emits: ['handleSelect'],
-  setup(props, {emit}) {
+  setup(props, { emit }) {
+    const pointData = reactive({
+      active: 1
+    })
     return () => (
       <div class={styles.container}>
         <div>
@@ -34,7 +38,13 @@ export default defineComponent({
                             styles.item,
                             `${item.id}-${n.id}` === props.active ? styles.itemActive : ''
                           ]}
-                          onClick={() => emit('handleSelect', {id: item.id, index, active: `${item.id}-${n.id}`})}
+                          onClick={() =>
+                            emit('handleSelect', {
+                              id: item.id,
+                              index,
+                              active: `${item.id}-${n.id}`
+                            })
+                          }
                         >
                           {item.name}-{n.name}
                         </div>
@@ -44,6 +54,17 @@ export default defineComponent({
               )
             })}
           </div>
+          <Collapse modelValue={pointData.active} accordion>
+            {[1, 2, 3].map((item: any) => {
+              return (
+                <CollapseItem title={'标题' + item} name={item}>
+                  {[1, 2, 3, 4].map((n: any) => {
+                    return <div>12</div>
+                  })}
+                </CollapseItem>
+              )
+            })}
+          </Collapse>
         </div>
       </div>
     )

+ 1 - 1
src/views/coursewarePlay/index.module.less

@@ -105,7 +105,7 @@
   position: fixed;
   top: 50%;
   transform: translateY(-50%);
-  right: 40px;
+  right: 20px;
   .point {
     margin-top: 10px;
     border-bottom-left-radius: 0;