lex 2 years ago
parent
commit
250685a3e3

+ 34 - 35
src/teacher/attendance/index.tsx

@@ -20,6 +20,7 @@ import request from '@/helpers/request'
 import { state as globalState } from '@/state'
 import { courseEmnu } from '@/constant'
 import TeacherAttItem from './modals/teacherAtt-item'
+import OSticky from '@/components/o-sticky'
 export default defineComponent({
   name: 'attend-student',
   props: {
@@ -159,47 +160,45 @@ export default defineComponent({
     }
     return () => (
       <>
-        <Sticky offsetTop={toTop.value}>
-          <div>
-            <OHeader></OHeader>
-            <div class={styles.chioseWrap}>
-              <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
-                <div
-                  class={styles.searchBand}
-                  onClick={() => {
-                    state.showPopoverTime = true
-                  }}
-                >
-                  {forms.timeName}
-                  <Icon name={state.showPopoverTime ? 'arrow-up' : 'arrow-down'} />
-                </div>
+        <OSticky position="top">
+          <OHeader />
+          <div class={styles.chioseWrap}>
+            <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
+              <div
+                class={styles.searchBand}
+                onClick={() => {
+                  state.showPopoverTime = true
+                }}
+              >
+                {forms.timeName}
+                <Icon name={state.showPopoverTime ? 'arrow-up' : 'arrow-down'} />
               </div>
+            </div>
 
-              <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
-                <div
-                  class={styles.searchBand}
-                  onClick={() => {
-                    state.showPopoverOrchestra = true
-                  }}
-                >
-                  {forms.orchestraName}
-                  <Icon name={state.showPopoverOrchestra ? 'arrow-up' : 'arrow-down'} />
-                </div>
+            <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
+              <div
+                class={styles.searchBand}
+                onClick={() => {
+                  state.showPopoverOrchestra = true
+                }}
+              >
+                {forms.orchestraName}
+                <Icon name={state.showPopoverOrchestra ? 'arrow-up' : 'arrow-down'} />
               </div>
-              <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
-                <div
-                  class={styles.searchBand}
-                  onClick={() => {
-                    state.showPopoverSubject = true
-                  }}
-                >
-                  {forms.courseTypeName}
-                  <Icon name={state.showPopoverSubject ? 'arrow-up' : 'arrow-down'} />
-                </div>
+            </div>
+            <div style={{ padding: '12px 13px', background: '#F8F8F8' }}>
+              <div
+                class={styles.searchBand}
+                onClick={() => {
+                  state.showPopoverSubject = true
+                }}
+              >
+                {forms.courseTypeName}
+                <Icon name={state.showPopoverSubject ? 'arrow-up' : 'arrow-down'} />
               </div>
             </div>
           </div>
-        </Sticky>
+        </OSticky>
 
         {showContact.value ? (
           <PullRefresh v-model={refreshing.value} onRefresh={onRefresh} style="min-height: 100vh;">

+ 24 - 0
src/views/unit-test/unit-detail/index.module.less

@@ -37,3 +37,27 @@
     margin-right: 4px;
   }
 }
+
+.wapList {
+  width: 44px;
+  height: 44px;
+  flex-shrink: 0;
+  margin-left: 18px;
+}
+
+.unitSubject {
+  padding: 15px;
+  margin: 0 13px;
+  background-color: #fff;
+  overflow: hidden;
+  border-radius: 10px;
+}
+.unitSubjectTitle {
+  font-size: 16px;
+  font-weight: 500;
+  color: #333333;
+  line-height: 26px;
+  .unitScore {
+    color: #777777;
+  }
+}

+ 31 - 4
src/views/unit-test/unit-detail/index.tsx

@@ -1,10 +1,11 @@
-import { Button, Cell, Icon, Popup } from 'vant'
-import { defineComponent, reactive } from 'vue'
+import { Button, Cell, Icon, Image, Popup, Swipe, SwipeItem, Tag } from 'vant'
+import { defineComponent, reactive, ref } from 'vue'
 import { useRoute, useRouter } from 'vue-router'
 import NoticeStart from '../model/notice-start'
 import styles from './index.module.less'
 import iconQuestionNums from '../images/icon-question-nums.png'
 import iconCountDown from '../images/icon-count-down.png'
+import iconButtonList from '../images/icon-button-list.png'
 import OSticky from '@/components/o-sticky'
 
 export default defineComponent({
@@ -12,6 +13,7 @@ export default defineComponent({
   setup() {
     const route = useRoute()
     const router = useRouter()
+    const swipeRef = ref()
     const state = reactive({
       visiableNotice: false
     })
@@ -35,11 +37,36 @@ export default defineComponent({
           }}
         </Cell>
 
+        <Swipe loop={false} showIndicators={false} ref={swipeRef} duration={300}>
+          <SwipeItem>
+            <div class={styles.unitSubject}>
+              <div class={styles.unitSubjectTitle}>
+                1、选出与方框内音符时值相同的节奏阶段 <span class={styles.unitScore}>(5分)</span>
+                <Tag type="primary">单选题</Tag>
+              </div>
+              <Image src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dbb27307d428424c8efb9f26032cfa1a_mergeImage.png" />
+            </div>
+          </SwipeItem>
+          <SwipeItem>
+            <div class={styles.unitSubject}>
+              <Image src="https://lanhu-dds-backend.oss-cn-beijing.aliyuncs.com/merge_image/imgs/dbb27307d428424c8efb9f26032cfa1a_mergeImage.png" />
+            </div>
+          </SwipeItem>
+        </Swipe>
+
         <OSticky position="bottom" background="white">
-          <div class={['btnGroup']}>
-            <Button block round type="primary">
+          <div class={['btnGroup btnMore']}>
+            <Button
+              block
+              round
+              type="primary"
+              onClick={() => {
+                swipeRef.value.next()
+              }}
+            >
               下一题
             </Button>
+            <Image src={iconButtonList} class={[styles.wapList, 'van-haptics-feedback']} />
           </div>
         </OSticky>