Explorar el Código

添加空状态居中样式

lex hace 2 años
padre
commit
370d78497a
Se han modificado 33 ficheros con 293 adiciones y 86 borrados
  1. 11 9
      src/school/orchestra-story/index.tsx
  2. 6 5
      src/school/orchestra/compontent/photo-create.tsx
  3. 1 1
      src/school/orchestra/compontent/photo-detail.tsx
  4. 2 1
      src/school/orchestra/compontent/photo.module.less
  5. 5 2
      src/school/orchestra/compontent/photo.tsx
  6. 90 0
      src/school/orchestra/modal/teacher-list.module.less
  7. 63 17
      src/school/orchestra/modal/teacher-list.tsx
  8. 1 1
      src/school/orchestra/orchestra-information.tsx
  9. 6 3
      src/school/ranking-list/components/day-bang.tsx
  10. 6 3
      src/school/ranking-list/components/timer-bang.tsx
  11. 2 2
      src/school/train-planning/component/train-content/index.tsx
  12. 2 2
      src/school/train-planning/modal/class-list/index.tsx
  13. 1 1
      src/student/member-center/index.tsx
  14. 5 1
      src/student/music-group/pre-apply/order-detail.tsx
  15. 6 2
      src/student/music-group/pre-apply/qrcode-payment/index.tsx
  16. 6 1
      src/student/music-group/shop-address/address-operation.tsx
  17. 1 1
      src/student/music-group/shop-address/index.tsx
  18. 1 1
      src/student/my-orchestra/photo-detail.tsx
  19. 5 2
      src/student/ranking-list/components/day-bang.tsx
  20. 5 2
      src/student/ranking-list/components/timer-bang.tsx
  21. 6 3
      src/student/trade-record/component/paid-list.tsx
  22. 6 3
      src/student/trade-record/component/refund-list.tsx
  23. 6 3
      src/student/trade-record/component/wait-pay.tsx
  24. 15 6
      src/views/exercise-record/exercis-detail.tsx
  25. 2 2
      src/views/exercise-record/index.tsx
  26. 1 1
      src/views/information/help-center/index.tsx
  27. 1 1
      src/views/information/index.tsx
  28. 9 4
      src/views/lessonCourseware/index.tsx
  29. 2 1
      src/views/mine-orchestra/index.module.less
  30. 7 2
      src/views/mine-orchestra/index.tsx
  31. 4 1
      src/views/mine-orchestra/my-photo/index.tsx
  32. 4 1
      src/views/mine-orchestra/orchestra-deeds/index.tsx
  33. 5 1
      src/views/unit-test/index.tsx

+ 11 - 9
src/school/orchestra-story/index.tsx

@@ -132,7 +132,7 @@ export default defineComponent({
       getOrchestras()
     })
     return () => (
-      <div class={styles.orchestraStory}>
+      <div class={[styles.orchestraStory, !state.listState.dataShow && 'emptyRootContainer']}>
         <OHeader>
           {{
             right: () => (
@@ -149,14 +149,16 @@ export default defineComponent({
         </OHeader>
 
         {state.orchestraList.length > 0 && (
-          <CellGroup inset class={styles.cellGroup}>
-            <Cell
-              title={state.selectOrchestra.text || ' '}
-              isLink
-              center
-              onClick={() => (state.orchestraStatus = true)}
-            ></Cell>
-          </CellGroup>
+          <div style={{ width: '100%' }}>
+            <CellGroup inset class={styles.cellGroup}>
+              <Cell
+                title={state.selectOrchestra.text || ' '}
+                isLink
+                center
+                onClick={() => (state.orchestraStatus = true)}
+              ></Cell>
+            </CellGroup>
+          </div>
         )}
 
         {state.listState.dataShow ? (

+ 6 - 5
src/school/orchestra/compontent/photo-create.tsx

@@ -18,6 +18,7 @@ import { useRoute, useRouter } from 'vue-router'
 import styles from './photo.module.less'
 import iconPhoneDefaut from '../images/icon-photo-default.png'
 import OHeader from '@/components/o-header'
+import OSticky from '@/components/o-sticky'
 
 export default defineComponent({
   name: 'phone',
@@ -174,11 +175,11 @@ export default defineComponent({
       getList()
     })
     return () => (
-      <>
-        <Sticky position="top">
+      <div class={!state.listState.dataShow && 'emptyRootContainer'}>
+        <OSticky position="top">
           <OHeader title={'创建相册'}></OHeader>
           <Button
-            style={{margin: '12px auto 0 auto', width: '90%'}}
+            style={{ margin: '12px auto 0 auto', width: '90%' }}
             icon="plus"
             block
             class={styles.addPhone}
@@ -189,7 +190,7 @@ export default defineComponent({
           >
             新建相册
           </Button>
-        </Sticky>
+        </OSticky>
         <div class={styles.phone}>
           {state.listState.dataShow ? (
             <List
@@ -274,7 +275,7 @@ export default defineComponent({
             ]}
           />
         </div>
-      </>
+      </div>
     )
   }
 })

+ 1 - 1
src/school/orchestra/compontent/photo-detail.tsx

@@ -261,7 +261,7 @@ export default defineComponent({
     })
 
     return () => (
-      <div class={styles.phoneDetail}>
+      <div class={[styles.phoneDetail, !state.listState.dataShow && 'emptyRootContainer']}>
         <OSticky position="top">
           <OHeader title={(route.query.name as any) || ''}>
             {{

+ 2 - 1
src/school/orchestra/compontent/photo.module.less

@@ -1,5 +1,5 @@
 .phone {
-  padding: 0 13px 32px;
+  padding: 0 13px 0;
 }
 .addPhone {
   margin-top: 12px;
@@ -13,6 +13,7 @@
   display: flex;
   justify-content: space-between;
   flex-wrap: wrap;
+  padding-bottom: 32px;
   .item {
     position: relative;
     padding-top: 12px;

+ 5 - 2
src/school/orchestra/compontent/photo.tsx

@@ -178,8 +178,11 @@ export default defineComponent({
       getList()
     })
     return () => (
-      <div class={styles.phone}>
-        <Sticky position="top" offsetTop={props.height}>
+      <div
+        class={[styles.phone, !state.listState.dataShow && 'emptyRootContainer']}
+        style={{ minHeight: `calc(100vh - ${props.height}px)` }}
+      >
+        <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
           <Button
             icon="plus"
             block

+ 90 - 0
src/school/orchestra/modal/teacher-list.module.less

@@ -29,3 +29,93 @@
     }
   }
 }
+
+.subjectContainer {
+  display: flex;
+  & > span {
+    flex-shrink: 0;
+  }
+  .tagSubject {
+    margin-right: 10px;
+    margin-bottom: 4px;
+  }
+}
+
+.manageCell {
+  padding: 15px 13px;
+  :global {
+    .van-cell__title {
+      flex: 1 auto;
+      flex-basis: 48%;
+    }
+  }
+
+  .teacherContent {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+
+    .content {
+      width: 70px;
+    }
+    .name {
+      font-size: 16px;
+      font-weight: 500;
+      color: #333333;
+      line-height: 22px;
+      max-width: 70px;
+    }
+    .subject {
+    }
+    .classNum {
+      text-align: center;
+      width: 60px;
+    }
+    .num {
+      font-size: 20px;
+      font-weight: bold;
+      color: #f67146;
+      line-height: 24px;
+    }
+    .numText {
+      font-size: 12px;
+      color: #333333;
+      line-height: 17px;
+    }
+
+    .messageImg {
+      margin-top: 5px;
+      width: 24px;
+      height: 24px;
+    }
+  }
+
+  .img {
+    width: 48px;
+    height: 48px;
+    overflow: hidden;
+    border-radius: 50%;
+    margin-right: 10px;
+  }
+
+  .name {
+    font-size: 16px;
+    font-weight: 500;
+    color: #333333;
+    line-height: 22px;
+  }
+  .phone {
+    font-size: 14px;
+    color: #777777;
+    line-height: 20px;
+  }
+
+  .status {
+    font-size: 16px;
+    font-weight: 500;
+    color: #333333;
+  }
+  .frozen {
+    color: #f44541;
+  }
+}

+ 63 - 17
src/school/orchestra/modal/teacher-list.tsx

@@ -131,7 +131,10 @@ export default defineComponent({
     })
 
     return () => (
-      <div class={!forms.listState.dataShow && 'emptyRootContainer'}>
+      <div
+        class={!forms.listState.dataShow && 'emptyRootContainer'}
+        style={{ background: '#F8F8F8', minHeight: '100%' }}
+      >
         <OSticky position="top" mode={props.mode}>
           {props.header && <OHeader title="选择伴学指导" />}
           <OSearch
@@ -154,22 +157,65 @@ export default defineComponent({
             immediateCheck={false}
           >
             {forms.list.map((item: any) => (
-              <Cell center class={styles.cellTeacher} onClick={() => onSelect(item)}>
-                {{
-                  icon: () => <Image class={styles.img} src={item.avatar || iconTeacher} />,
-                  title: () => (
-                    <div class={styles.content}>
-                      <p class={[styles.name, 'van-ellipsis']}>{item.nickname}</p>
-                      <p class={styles.class}>
-                        {item.subjectNames &&
-                          item.subjectNames.map((subject: any) => (
-                            <Tag type="primary">{subject}</Tag>
-                          ))}
-                      </p>
-                    </div>
-                  )
-                }}
-              </Cell>
+              // <Cell center class={styles.cellTeacher} onClick={() => onSelect(item)}>
+              //   {{
+              //     icon: () => <Image class={styles.img} src={item.avatar || iconTeacher} />,
+              //     title: () => (
+              //       <div class={styles.content}>
+              //         <p class={[styles.name, 'van-ellipsis']}>{item.nickname}</p>
+              //         <p class={styles.class}>
+              //           {item.subjectNames &&
+              //             item.subjectNames.map((subject: any) => (
+              //               <Tag type="primary">{subject}</Tag>
+              //             ))}
+              //         </p>
+              //       </div>
+              //     )
+              //   }}
+              // </Cell>
+              <CellGroup inset style={{ marginBottom: '12px' }} onClick={() => onSelect(item)}>
+                <Cell center class={styles.manageCell} clickable={false}>
+                  {{
+                    icon: () => (
+                      <Image
+                        class={styles.img}
+                        src={item.avatar ? item.avatar : iconTeacher}
+                        fit="cover"
+                      />
+                    ),
+                    title: () => (
+                      <div class={styles.teacherContent}>
+                        <div class={styles.content}>
+                          <p class={[styles.name, 'van-ellipsis']}>{item.nickname}</p>
+                        </div>
+                      </div>
+                    )
+                  }}
+                </Cell>
+                <Cell center>
+                  {{
+                    title: () => (
+                      <div class={styles.subjectContainer}>
+                        <span>声部:</span>
+                        <div style={{ display: 'flex', alignItems: 'center', flexWrap: 'wrap' }}>
+                          {item.subjectNames &&
+                            item.subjectNames.length > 0 &&
+                            item.subjectNames.map((subject: any) => (
+                              <Tag
+                                type="primary"
+                                class={styles.tagSubject}
+                                color="#FFE7DA"
+                                textColor="#F67146"
+                              >
+                                {subject}
+                              </Tag>
+                            ))}
+                        </div>
+                      </div>
+                    )
+                  }}
+                </Cell>
+              </CellGroup>
             ))}
           </List>
         ) : (

+ 1 - 1
src/school/orchestra/orchestra-information.tsx

@@ -129,7 +129,7 @@ export default defineComponent({
       getList()
     })
     return () => (
-      <div class={styles.information}>
+      <div class={[styles.information, !state.listState.dataShow && 'emptyRootContainer']}>
         <OSticky
           position="top"
           onGetHeight={(height: any) => {

+ 6 - 3
src/school/ranking-list/components/day-bang.tsx

@@ -173,9 +173,12 @@ export default defineComponent({
       getList()
     }
     return () => (
-      <>
+      <div
+        class={!showContact.value && 'emptyRootContainer'}
+        style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
+      >
         {/* <OSticky position="top" background="#FFF"> */}
-        <Sticky offsetTop={toTop.value}>
+        <Sticky offsetTop={toTop.value} style={{ width: '100%' }}>
           <div class={styles.chioseWrap}>
             <div style={{ padding: '0 13px', background: '#FFF' }}>
               <div
@@ -266,7 +269,7 @@ export default defineComponent({
           actions={state.subjects}
           onSelect={checkSubject}
         ></ActionSheet>
-      </>
+      </div>
     )
   }
 })

+ 6 - 3
src/school/ranking-list/components/timer-bang.tsx

@@ -172,9 +172,12 @@ export default defineComponent({
       getList()
     }
     return () => (
-      <>
+      <div
+        class={!showContact.value && 'emptyRootContainer'}
+        style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
+      >
         {/* <OSticky position="top" background="#FFF"> */}
-        <Sticky offsetTop={toTop.value}>
+        <Sticky offsetTop={toTop.value} style={{ width: '100%' }}>
           <div class={styles.chioseWrap}>
             <div style={{ padding: '0 13px', background: '#FFF' }}>
               <div
@@ -266,7 +269,7 @@ export default defineComponent({
           actions={state.subjects}
           onSelect={checkSubject}
         ></ActionSheet>
-      </>
+      </div>
     )
   }
 })

+ 2 - 2
src/school/train-planning/component/train-content/index.tsx

@@ -106,7 +106,7 @@ export default defineComponent({
     })
 
     return () => (
-      <>
+      <div class={base.contentList.length <= 0 && 'emptyRootContainer'}>
         <OHeader />
         {/* 训练内容 */}
 
@@ -158,7 +158,7 @@ export default defineComponent({
             </Button>
           </div>
         </OSticky>
-      </>
+      </div>
     )
   }
 })

+ 2 - 2
src/school/train-planning/modal/class-list/index.tsx

@@ -74,7 +74,7 @@ export default defineComponent({
       state.list = [...props.classList]
     })
     return () => (
-      <div class={styles.classList}>
+      <div class={[styles.classList, state.list.length <= 0 && 'emptyRootContainer']}>
         <OHeader title="指定伴学指导" desotry={false} />
 
         {state.list.map((item: any) => (
@@ -106,7 +106,7 @@ export default defineComponent({
         {/* 判断是否有班级没有设置伴学指导 */}
         {props.classList.length <= 0 && <OEmpty btnStatus={false} tips="暂无班级" />}
 
-        <Sticky position="bottom">
+        <Sticky position="bottom" style={{ width: '100%' }}>
           <div class={'btnGroup'}>
             <Button round block type="primary" onClick={onSubmit} disabled={state.isClick}>
               完成

+ 1 - 1
src/student/member-center/index.tsx

@@ -185,7 +185,7 @@ export default defineComponent({
   render() {
     return (
       <div class={styles['member-center']}>
-        <OHeader background="#ffe5cc" />
+        <OHeader background="#ffe5cc" border={false} />
         <div class={styles.member_container}>
           <Cell
             class={styles.userMember}

+ 5 - 1
src/student/music-group/pre-apply/order-detail.tsx

@@ -480,7 +480,11 @@ export default defineComponent({
             clearInterval(state.orderTimer)
           }}
         >
-          <QrcodePayment url={state.qrCodeUrl} />
+          <QrcodePayment
+            url={state.qrCodeUrl}
+            pay_channel={state.pay_channel}
+            orderType={orderType.value}
+          />
         </OPopup>
         {/* <Popup
           v-model:show={state.showQrcode}

+ 6 - 2
src/student/music-group/pre-apply/qrcode-payment/index.tsx

@@ -14,6 +14,10 @@ export default defineComponent({
     pay_channel: {
       type: String,
       default: 'wx_pub'
+    },
+    orderType: {
+      type: String,
+      default: ''
     }
   },
   setup(props) {
@@ -21,10 +25,10 @@ export default defineComponent({
       <div class={[styles.saveShareImage]}>
         <Image src={orchestraTopBg} class={styles.topImage} />
         <div class={[styles.shareContaienr, styles.orchestraContainer]}>
-          <div class={styles.schoolName}>报名缴费</div>
+          <div class={styles.schoolName}>{props.orderType === 'VIP' ? '会员购买' : '报名缴费'}</div>
           <div class={styles.shareType}>
             请截图下方二维码
-            <span>登录支付宝扫码支付</span>
+            <span>登录{props.pay_channel === 'wx_pub' ? '微信' : '支付宝'}扫码支付</span>
           </div>
 
           <div class={styles.qrcodeSection}>

+ 6 - 1
src/student/music-group/shop-address/address-operation.tsx

@@ -40,7 +40,12 @@ export default defineComponent({
           showToast('请选择收货人')
           return
         }
-        if (!state.phoneNumber && !/^1(3|4|5|6|7|8|9)\d{9}$/.test(state.phoneNumber as any)) {
+        if (
+          !state.phoneNumber ||
+          !/^((13[0-9])|(14(0|[5-7]|9))|(15([0-3]|[5-9]))|(16(2|[5-7]))|(17[0-8])|(18[0-9])|(19([0-3]|[5-9])))\d{8}$/.test(
+            state.phoneNumber as any
+          )
+        ) {
           showToast('手机号输入有误')
           return
         }

+ 1 - 1
src/student/music-group/shop-address/index.tsx

@@ -103,7 +103,7 @@ export default defineComponent({
       getList()
     })
     return () => (
-      <div class={styles.shopAddress}>
+      <div class={[styles.shopAddress, !form.listState.dataShow && 'emptyRootContainer']}>
         {form.listState.dataShow ? (
           <List
             // v-model:loading={form.listState.loading}

+ 1 - 1
src/student/my-orchestra/photo-detail.tsx

@@ -73,7 +73,7 @@ export default defineComponent({
     })
 
     return () => (
-      <div class={styles.phoneDetail}>
+      <div class={[styles.phoneDetail, !state.listState.dataShow && 'emptyRootContainer']}>
         {/* <OHeader title={(route.query.name as any) || ''}></OHeader> */}
 
         {state.listState.dataShow ? (

+ 5 - 2
src/student/ranking-list/components/day-bang.tsx

@@ -113,7 +113,10 @@ export default defineComponent({
       getList()
     }
     return () => (
-      <>
+      <div
+        class={!showContact.value && 'emptyRootContainer'}
+        style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
+      >
         {showContact.value ? (
           <div>
             <OFullRefresh
@@ -138,7 +141,7 @@ export default defineComponent({
         ) : (
           <OEmpty />
         )}
-      </>
+      </div>
     )
   }
 })

+ 5 - 2
src/student/ranking-list/components/timer-bang.tsx

@@ -110,7 +110,10 @@ export default defineComponent({
       getList()
     }
     return () => (
-      <>
+      <div
+        class={!showContact.value && 'emptyRootContainer'}
+        style={{ minHeight: `calc(100vh - ${toTop.value}px)` }}
+      >
         {/* <OSticky position="top" background="#FFF"> */}
 
         {showContact.value ? (
@@ -137,7 +140,7 @@ export default defineComponent({
         ) : (
           <OEmpty />
         )}
-      </>
+      </div>
     )
   }
 })

+ 6 - 3
src/student/trade-record/component/paid-list.tsx

@@ -198,8 +198,11 @@ export default defineComponent({
       })
     })
     return () => (
-      <>
-        <Sticky position="top" offsetTop={props.height}>
+      <div
+        class={!form.listState.dataShow && 'emptyRootContainer'}
+        style={{ minHeight: `calc(100vh - ${props.height}px)` }}
+      >
+        <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
           <div style={{ padding: '12px 13px 16px', background: '#F8F8F8' }}>
             <div class={styles.searchBand} onClick={() => (form.timeShow = true)}>
               {form.currentData[0]}年 <Icon name={form.timeShow ? 'arrow-up' : 'arrow-down'} />
@@ -359,7 +362,7 @@ export default defineComponent({
             </div>
           </div>
         </Popup>
-      </>
+      </div>
     )
   }
 })

+ 6 - 3
src/student/trade-record/component/refund-list.tsx

@@ -111,8 +111,11 @@ export default defineComponent({
       })
     })
     return () => (
-      <>
-        <Sticky position="top" offsetTop={props.height}>
+      <div
+        class={!form.listState.dataShow && 'emptyRootContainer'}
+        style={{ minHeight: `calc(100vh - ${props.height}px)` }}
+      >
+        <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
           <div style={{ padding: '12px 13px 16px', background: '#F8F8F8' }}>
             <div class={styles.searchBand} onClick={() => (form.timeShow = true)}>
               {form.currentData[0]}年 <Icon name={form.timeShow ? 'arrow-up' : 'arrow-down'} />
@@ -196,7 +199,7 @@ export default defineComponent({
             }}
           />
         </Popup>
-      </>
+      </div>
     )
   }
 })

+ 6 - 3
src/student/trade-record/component/wait-pay.tsx

@@ -161,8 +161,11 @@ export default defineComponent({
       })
     })
     return () => (
-      <>
-        <Sticky position="top" offsetTop={props.height}>
+      <div
+        class={!form.listState.dataShow && 'emptyRootContainer'}
+        style={{ minHeight: `calc(100vh - ${props.height}px)` }}
+      >
+        <Sticky position="top" offsetTop={props.height} style={{ width: '100%' }}>
           <div style={{ padding: '12px 13px 16px', background: '#F8F8F8' }}>
             <div class={styles.searchBand} onClick={() => (form.timeShow = true)}>
               {form.currentData[0]}年 <Icon name={form.timeShow ? 'arrow-up' : 'arrow-down'} />
@@ -280,7 +283,7 @@ export default defineComponent({
             }}
           />
         </Popup>
-      </>
+      </div>
     )
   }
 })

+ 15 - 6
src/views/exercise-record/exercis-detail.tsx

@@ -16,7 +16,7 @@ import {
 } from 'vant'
 import OFullRefresh from '@/components/o-full-refresh'
 import DetailItem from './modals/detail-item'
-import { defineComponent, onMounted, reactive, ref, onDeactivated, computed } from 'vue'
+import { defineComponent, onMounted, reactive, ref, onDeactivated, nextTick } from 'vue'
 import { useRoute, useRouter } from 'vue-router'
 import styles from './exercis-detail.module.less'
 import request from '@/helpers/request'
@@ -24,6 +24,7 @@ import questIcon from '@/school/images/quest-icon.png'
 import defaultIcon from '@/school/images/default-icon.png'
 import iconStudent from '@common/images/icon_student.png'
 import { state as globalState } from '@/state'
+import { useRect } from '@vant/use'
 
 export default defineComponent({
   name: 'exercis-detail',
@@ -111,10 +112,17 @@ export default defineComponent({
         showToast(message)
       }
     }
-    onMounted(() => {
-      getList()
-      getDetail()
+    const topWrap = ref()
+    const topWrapHeight = ref(0)
+    onMounted(async () => {
+      await getList()
+      await getDetail()
       window.addEventListener('scroll', handleScroll)
+
+      nextTick(() => {
+        const { height } = useRect(topWrap.value)
+        topWrapHeight.value = height
+      })
     })
     onDeactivated(() => {
       window.removeEventListener('scroll', handleScroll)
@@ -147,10 +155,11 @@ export default defineComponent({
     const onBack = () => {
       router.go(-1)
     }
+
     return () => (
       <>
-        <div class={styles.exercisContainer}>
-          <div class={styles.topWrap}>
+        <div class={[styles.exercisContainer, !showContact.value && 'emptyRootContainer']}>
+          <div class={styles.topWrap} ref={topWrap}>
             <OSticky position="top" background="#F8F8F8" onGetHeight={getHeight}>
               <OHeader
                 border={false}

+ 2 - 2
src/views/exercise-record/index.tsx

@@ -197,7 +197,7 @@ export default defineComponent({
     }
 
     return () => (
-      <>
+      <div class={!showContact.value && 'emptyRootContainer'}>
         <OSticky position="top" background="#F8F8F8">
           <div>
             {/* <OHeader onHeaderBack={onBack}></OHeader> */}
@@ -333,7 +333,7 @@ export default defineComponent({
           actions={state.subjects}
           onSelect={checkSubject}
         ></ActionSheet>
-      </>
+      </div>
     )
   }
 })

+ 1 - 1
src/views/information/help-center/index.tsx

@@ -72,7 +72,7 @@ export default defineComponent({
       getList()
     })
     return () => (
-      <div class={styles.helpCenter}>
+      <div class={[styles.helpCenter, !form.listState.dataShow && 'emptyRootContainer']}>
         <OSticky position="top">
           <OSearch onSearch={onSearch} />
         </OSticky>

+ 1 - 1
src/views/information/index.tsx

@@ -85,7 +85,7 @@ export default defineComponent({
       getList()
     })
     return () => (
-      <div class={styles.helpCenter}>
+      <div class={[styles.helpCenter, !form.listState.dataShow && 'emptyRootContainer']}>
         <OSticky position="top">
           <OSearch onSearch={onSearch} />
         </OSticky>

+ 9 - 4
src/views/lessonCourseware/index.tsx

@@ -19,14 +19,16 @@ export default defineComponent({
       data.loading = true
       if (route.query.code === 'select') {
         try {
-          const res: any = await request.post(state.platformApi + `/courseSchedule/getCourseware/${route.query.courseScheduleId}`)
+          const res: any = await request.post(
+            state.platformApi + `/courseSchedule/getCourseware/${route.query.courseScheduleId}`
+          )
           if (Array.isArray(res?.data)) {
             data.list = res.data.map((n: any) => {
               return {
                 coverImg: n.coverImg,
                 name: n.coursewareName,
                 id: n.lessonCoursewareId,
-                courseNum: n.coursewareNum,
+                courseNum: n.coursewareNum
               }
             })
           }
@@ -64,7 +66,10 @@ export default defineComponent({
     }
 
     return () => (
-      <div style={{ paddingTop: '14px' }}>
+      <div
+        style={{ paddingTop: '14px', boxSizing: 'border-box' }}
+        class={!data.list.length && 'emptyRootContainer'}
+      >
         <Grid gutter={14} columnNum={3} class={styles.grid}>
           {data.list.map((item: any) => {
             return (
@@ -91,7 +96,7 @@ export default defineComponent({
             )
           })}
         </Grid>
-        {!data.loading && !data.list.length && <OEmpty tips="没有课件" />} 
+        {!data.loading && !data.list.length && <OEmpty tips="没有课件" />}
       </div>
     )
   }

+ 2 - 1
src/views/mine-orchestra/index.module.less

@@ -1,5 +1,6 @@
 .mineOrchestra {
   padding-top: 12px;
+  box-sizing: border-box;
 }
 .select {
   height: 45px;
@@ -38,7 +39,7 @@
   }
 }
 .content {
-  height: calc(100vh - 57px -  var(--van-tabs-line-height) - var(--header-height));
+  height: calc(100vh - 57px - var(--van-tabs-line-height) - var(--header-height));
   overflow: hidden;
   overflow-y: auto;
 }

+ 7 - 2
src/views/mine-orchestra/index.tsx

@@ -84,7 +84,7 @@ export default defineComponent({
     })
 
     return () => (
-      <div class={styles.mineOrchestra}>
+      <div class={[styles.mineOrchestra]}>
         <OSticky
           onGetHeight={(height: number) => {
             document.documentElement.style.setProperty('--header-height', height + 'px')
@@ -174,7 +174,12 @@ export default defineComponent({
             </>
           )}
           {!data.loading && !data.orchestraList.length && (
-            <OEmpty btnStatus={false} tips="暂无乐团" />
+            <div
+              class={!data.orchestraList.length && 'emptyRootContainer'}
+              style={{ minHeight: 'calc(100vh - var(--header-height))' }}
+            >
+              <OEmpty btnStatus={false} tips="暂无乐团" />
+            </div>
           )}
         </OFullRefresh>
 

+ 4 - 1
src/views/mine-orchestra/my-photo/index.tsx

@@ -67,7 +67,10 @@ export default defineComponent({
     })
 
     return () => (
-      <div class={styles.phoneDetail}>
+      <div
+        class={[styles.phoneDetail, !data.list.length && 'emptyRootContainer']}
+        style={{ height: '100%', minHeight: 'auto' }}
+      >
         {!data.loading && !!data.list.length && (
           <List
             // v-model:loading={data.loading}

+ 4 - 1
src/views/mine-orchestra/orchestra-deeds/index.tsx

@@ -82,7 +82,10 @@ export default defineComponent({
       getList()
     })
     return () => (
-      <div class={styles.orchestraStory}>
+      <div
+        class={[styles.orchestraStory, !state.listState.dataShow && 'emptyRootContainer']}
+        style={{ height: '100%', minHeight: 'auto' }}
+      >
         {state.listState.dataShow ? (
           <List
             // v-model:loading={state.listState.loading}

+ 5 - 1
src/views/unit-test/index.tsx

@@ -146,7 +146,7 @@ export default defineComponent({
       form.searchList = temp
     })
     return () => (
-      <div class={styles.unitTest}>
+      <div class={[styles.unitTest, !form.listState.dataShow && 'emptyRootContainer']}>
         <OSticky
           position="top"
           onGetHeight={(height: any) => {
@@ -175,6 +175,10 @@ export default defineComponent({
           />
         </OSticky>
 
+        {/* <audio controls>
+          <source src="https://daya.ks3-cn-beijing.ksyuncs.com/02/1675838010711.mp3" />
+          您的浏览器不支持该音频格式。
+        </audio> */}
         {form.listState.dataShow ? (
           <OFullRefresh
             v-model:modelValue={form.listState.refreshing}