Parcourir la source

feat: 移动端骨架屏逻辑优化

cuiyalong il y a 1 an
Parent
commit
f28151924e
1 fichiers modifiés avec 7 ajouts et 3 suppressions
  1. 7 3
      apps/mobile/src/views/article/content.vue

+ 7 - 3
apps/mobile/src/views/article/content.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="article-content">
     <van-skeleton
-      :row="3"
+      :row="4"
+      :rowWidth="['100%', '100%', '60%', '20%']"
       :class="{ 'bg-white': reqState.loading }"
       :loading="reqState.loading"
     >
@@ -340,11 +341,14 @@ export default {
       } else {
         try {
           await this.getPreAgentInfo()
-          await this.getBaseInfo()
+          const r = await this.getBaseInfo()
+          if (r) {
+            this.finishLoading()
+          }
         } catch (error) {
           console.error(error)
         } finally {
-          this.finishLoading()
+          // console.log('基础接口请求完成')
         }
         if (this.canRead) {
           this.getAdvancedInfo()