weixin_52219567 3 روز پیش
والد
کامیت
129f967688

+ 1 - 1
src/views/home/index-enterprise.vue

@@ -40,7 +40,7 @@
               <!-- 导航滚动视口 -->
               <ul class="nav-list flex" ref="navListRef" @scroll="checkScroll">
                 <li v-for="(item, index) in navItems" :key="index" :class="{ active: index === 0 }" @click="onPath(item.link)">
-                  <img :src="item.icon" class="n-ic-img" />
+                  <img v-if="item.icon" :src="item.icon" class="n-ic-img" />
                   {{ item.title }}
                 </li>
               </ul>

+ 1 - 1
src/views/home/jdcomponents/JDProducts.vue

@@ -19,7 +19,7 @@
 
       <div class="cat-nav-list" ref="navListRef" @scroll="checkScroll">
         <div class="cat-item" v-for="(cat, i) in categories" :key="i" :class="{ active: currentCat === i }" @click="onCurrentCat(i)">
-          <img :src="cat.iconUrl" class="cat-img" />
+          <img v-if="cat.iconUrl" :src="cat.iconUrl" class="cat-img" />
           <div class="cat-text">
             <span class="c-t">{{ cat.name }}</span>
             <span class="c-s">{{ cat.subTitle }}</span>

+ 14 - 2
src/views/home/jdcomponents/JDUserPanel.vue

@@ -90,7 +90,7 @@
         <div class="c-h flex-between">
           <span class="class-title">企业公告</span>
         </div>
-        <div class="class-card flex-between" @click="onPath('/enterprise/messageNotice')">
+        <div v-if="!noticeData.title" class="class-card flex-between" @click="onPath('/enterprise/messageNotice')">
           <div class="class-left-info">
             <span class="week-tag">{{ formatWeek(noticeData.createTime) || '' }}</span>
             <p class="class-desc">{{ noticeData.title || '' }}</p>
@@ -99,6 +99,7 @@
             <img :src="noticeData.coverUrl" class="class-img" />
           </div>
         </div>
+        <div class="empty-bos" v-else>暂无公告</div>
       </div>
     </div>
   </div>
@@ -291,7 +292,7 @@ const currentPage = ref(0);
 .company-name {
   font-size: 12px; /* 12px */
   font-weight: bold; /* 加粗 */
-  color: #666;
+  color: #101010;
   margin: 0;
   white-space: nowrap;
   overflow: hidden;
@@ -561,4 +562,15 @@ const currentPage = ref(0);
   height: 100%;
   object-fit: cover;
 }
+.empty-bos {
+  width: 100%;
+  height: 100%;
+  text-align: center;
+  font-size: 14px;
+  color: #666666;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding-top: 15px;
+}
 </style>