panhui 3 years ago
parent
commit
0ce4b71e81
3 changed files with 22 additions and 23 deletions
  1. 13 12
      src/components/creator/RankInfo.vue
  2. 5 0
      src/components/product/NewsRecord.vue
  3. 4 11
      src/views/Home.vue

+ 13 - 12
src/components/creator/RankInfo.vue

@@ -2,7 +2,7 @@
     <div class="rank" :class="[`rank${index}`]">
         <div class="rank-icon">
             <img v-if="index < 3" :src="icons[index]" alt="" />
-            <span v-else>{{ index + 1 }}</span>
+            <span v-else>{{ getNum(index + 1) }}</span>
         </div>
         <div class="content">
             <van-image round width="42" height="42" :src="info.avatar" />
@@ -81,9 +81,8 @@ export default {
             height: 38px;
         }
         span {
-            font-size: 20px;
-            font-family: AlibabaPuHuiTi-Bold, AlibabaPuHuiTi;
-            font-weight: bold;
+            font-size: 16px;
+            font-family: AlibabaPuHuiTi-Regular, AlibabaPuHuiTi;
             color: var(--text0);
             line-height: 20px;
         }
@@ -119,14 +118,16 @@ export default {
         }
     }
 
-    &::after {
-        content: '';
-        position: absolute;
-        left: 16px;
-        right: 16px;
-        bottom: 0;
-        height: 1px;
-        background-color: var(--border);
+    &:not(:last-child) {
+        &::after {
+            content: '';
+            position: absolute;
+            left: 16px;
+            right: 16px;
+            bottom: 0;
+            height: 1px;
+            background-color: var(--border);
+        }
     }
 }
 </style>

+ 5 - 0
src/components/product/NewsRecord.vue

@@ -102,6 +102,11 @@ export default {
 <style lang="less" scoped>
 /deep/.van-badge {
     z-index: 20;
+
+    &.van-badge--dot {
+        border: 1px solid #ffffff;
+        --van-badge-dot-size: 10px;
+    }
 }
 .news-record {
     position: relative;

+ 4 - 11
src/views/Home.vue

@@ -94,18 +94,11 @@
                     </div>
                 </div>
                 <div class="rank-list">
-                    <swiper
-                        class="rankSwiper"
-                        @reachEnd="reachEnd"
-                        @slidePrevTransitionStart="slidePrevTransitionStart"
-                        direction="vertical"
-                        slides-per-view="auto"
-                        free-mode
-                    >
-                        <swiper-slide v-for="(item, index) in hotUsers" :key="index">
+                    <div class="rankSwiper">
+                        <template v-for="(item, index) in hotUsers" :key="index">
                             <rank-info :index="index" v-model:info="hotUsers[index]"></rank-info>
-                        </swiper-slide>
-                    </swiper>
+                        </template>
+                    </div>
                 </div>
             </div>
         </div>