Ver código fonte

修改显示

lex 8 meses atrás
pai
commit
e41fb2d036

+ 16 - 2
src/views/choose-homework/classroom-detail/index.tsx

@@ -34,6 +34,7 @@ export default defineComponent({
         name: '',
         des: ''
       },
+      maxAddCourseware: 0,
       list: [] as any,
       ruleStatus: false,
       isDownloading: false, // 是否在下载资源
@@ -183,7 +184,20 @@ export default defineComponent({
       return tempList;
     };
 
-    onMounted(() => {
+    onMounted(async () => {
+      try {
+        const res = await request.get(
+          state.platformApi + '/sysConfig/queryByParamName',
+          {
+            params: {
+              paramName: 'upper_limit_homework_courseware'
+            }
+          }
+        );
+        data.maxAddCourseware = res.data.paranValue || 0;
+      } catch {
+        //
+      }
       getDetail();
       getList();
     });
@@ -424,7 +438,7 @@ export default defineComponent({
           <div class={styles.content}>
             1、作业只能选择视频资源布置
             <br />
-            2、单个练习组最大可添加20个练习
+            2、单个练习组最大可添加{data.maxAddCourseware}个练习
             <br />
             3、同练习组单个视频资源不可多次添加
           </div>

+ 4 - 4
src/views/choose-homework/index.module.less

@@ -1,14 +1,14 @@
 .choiseHomework {
   min-height: 100vh;
-  background: url('./images/banner-bg.png') no-repeat top center;
-  background-size: cover;
+  background: url('./images/banner-bg.png') no-repeat top center #C8ECF4;
+  background-size: contain;
   // padding: 10px 0;
   box-sizing: border-box;
 
   :global {
     .van-sticky--fixed {
-      // background: url('./images/banner-bg.png') no-repeat top center;
-      // background-size: cover;
+      background: url('./images/banner-bg.png') no-repeat top center;
+      background-size: cover;
     }
 
     .van-tabs__nav {

+ 11 - 1
src/views/choose-homework/index.tsx

@@ -16,6 +16,7 @@ import OSticky from '@/components/o-sticky';
 import OEmpty from '@/components/o-empty';
 import CourseItem from '../lessonCourseware/component/CourseItem';
 import OLoading from '@/components/o-loading';
+import { useEventListener } from '@vant/use';
 export default defineComponent({
   name: 'courseList',
   setup() {
@@ -37,7 +38,8 @@ export default defineComponent({
       actionKey: 0,
       loading: true,
       subjectList: [] as any,
-      classList: [] as any
+      classList: [] as any,
+      titleOpacity: 0
     });
 
     const FetchList = async () => {
@@ -146,6 +148,14 @@ export default defineComponent({
       }
     };
 
+    useEventListener('scroll', () => {
+      const height =
+        window.scrollY ||
+        window.pageYOffset ||
+        document.documentElement.scrollTop;
+      state.titleOpacity = height > 100 ? 1 : height / 100;
+    });
+
     onMounted(async () => {
       //
       if (state.topKey === 'music') {