lex 1 年之前
父节点
当前提交
3f638521b8

+ 1 - 5
src/tenant/exercise-record/exercis-detail.tsx

@@ -249,11 +249,7 @@ export default defineComponent({
       <div class={[styles.exercisContainer]}>
       <div class={[styles.exercisContainer]}>
         <div class={styles.topWrap}>
         <div class={styles.topWrap}>
           <TheSticky position="top">
           <TheSticky position="top">
-            <ColHeader
-              border={false}
-              background={'transparent'}
-              color={'#333333'}
-            />
+            <ColHeader border={false} background={'transparent'} />
             <Cell
             <Cell
               class={styles.userMember}
               class={styles.userMember}
               labelClass={styles.timeRemaining}
               labelClass={styles.timeRemaining}

+ 1 - 0
src/tenant/music/train-tool/index.module.less

@@ -202,6 +202,7 @@
   }
   }
 
 
   .alumTitle {
   .alumTitle {
+    padding: 0 16px;
     padding-bottom: 8px;
     padding-bottom: 8px;
     font-size: 16px;
     font-size: 16px;
     font-weight: 600;
     font-weight: 600;

+ 41 - 47
src/tenant/music/train-tool/index.tsx

@@ -223,18 +223,8 @@ export default defineComponent({
         const { y } = useWindowScroll()
         const { y } = useWindowScroll()
         if (y.value > 20) {
         if (y.value > 20) {
           background.value = `rgba(255, 255, 255)`
           background.value = `rgba(255, 255, 255)`
-          color.value = 'black'
-          postMessage({
-            api: 'backIconChange',
-            content: { iconStyle: 'black' }
-          })
         } else {
         } else {
           background.value = 'transparent'
           background.value = 'transparent'
-          color.value = '#fff'
-          postMessage({
-            api: 'backIconChange',
-            content: { iconStyle: 'white' }
-          })
         }
         }
       })
       })
 
 
@@ -245,7 +235,9 @@ export default defineComponent({
       state.loadingAlbum = false
       state.loadingAlbum = false
       state.loading = false
       state.loading = false
 
 
+      // 为了处理 swiper 会不显示的问题
       document.body.scrollIntoView()
       document.body.scrollIntoView()
+      window.scrollTo(1, 0)
     })
     })
 
 
     const onSubmit = async () => {
     const onSubmit = async () => {
@@ -296,6 +288,7 @@ export default defineComponent({
               paymentVendor: result.paymentVendor,
               paymentVendor: result.paymentVendor,
               paymentVersion: result.paymentVersion
               paymentVersion: result.paymentVersion
             }
             }
+
             routerTo()
             routerTo()
           })
           })
           .catch(() => {
           .catch(() => {
@@ -403,42 +396,44 @@ export default defineComponent({
                       </div>
                       </div>
                     </div>
                     </div>
                   ) : (
                   ) : (
-                    <Swiper
-                      watchSlidesProgress={true}
-                      slidesPerView={'auto'}
-                      centeredSlides={true}
-                      modules={[Pagination]}
-                      pagination={{ clickable: true }}
-                      onSlideChange={(swiper: any) => {
-                        state.details = state.albumList[swiper.activeIndex]
-                      }}
-                      onTransitionEnd={() => {
-                        params.page = 1
-                        state.list = []
-                        FetchList(true)
-                      }}
-                    >
-                      {state.albumList.map((album: any) => (
-                        <SwiperSlide>
-                          <div class={styles.img}>
-                            {album.buyTimesFlag && (
-                              <span class={styles.quota}>
-                                限购{album.buyedTimes}/{album.buyTimes}次
-                              </span>
-                            )}
-                            <Image
-                              class={styles.image}
-                              width="100%"
-                              height="100%"
-                              fit="cover"
-                              src={album?.coverImg || iconAlbumCover}
-                              errorIcon={iconAlbumCover}
-                            />
-                            <div class={styles.iconPian}></div>
-                          </div>
-                        </SwiperSlide>
-                      ))}
-                    </Swiper>
+                    state.albumList &&
+                    state.albumList.length > 0 && (
+                      <Swiper
+                        watchSlidesProgress={true}
+                        slidesPerView={'auto'}
+                        centeredSlides={true}
+                        modules={[Pagination]}
+                        pagination={{ clickable: true }}
+                        // onSlideChange={(swiper: any) => {}}
+                        onTransitionEnd={(swiper: any) => {
+                          state.details = state.albumList[swiper.activeIndex]
+                          params.page = 1
+                          state.list = []
+                          FetchList(true)
+                        }}
+                      >
+                        {state.albumList.map((album: any) => (
+                          <SwiperSlide>
+                            <div class={styles.img}>
+                              {album.buyTimesFlag && (
+                                <span class={styles.quota}>
+                                  限购{album.buyedTimes}/{album.buyTimes}次
+                                </span>
+                              )}
+                              <Image
+                                class={styles.image}
+                                width="100%"
+                                height="100%"
+                                fit="cover"
+                                src={album?.coverImg || iconAlbumCover}
+                                errorIcon={iconAlbumCover}
+                              />
+                              <div class={styles.iconPian}></div>
+                            </div>
+                          </SwiperSlide>
+                        ))}
+                      </Swiper>
+                    )
                   )}
                   )}
 
 
                   <div class={styles.alumDes}>
                   <div class={styles.alumDes}>
@@ -492,7 +487,6 @@ export default defineComponent({
                     v-model:active={state.activeTab}
                     v-model:active={state.activeTab}
                     onChange={val => {
                     onChange={val => {
                       state.activeTab = val
                       state.activeTab = val
-
                       params.page = 1
                       params.page = 1
                       state.list = []
                       state.list = []
                       FetchList()
                       FetchList()