14
0

5 کامیت‌ها 4b9253e41c ... a4f1fdee82

نویسنده SHA1 پیام تاریخ
  hurx a4f1fdee82 Merge branch 'hurx' 1 روز پیش
  weixin_52219567 6eb9f6588d 样式 3 روز پیش
  weixin_52219567 a9520795f0 首页样式 3 روز پیش
  weixin_52219567 b25f9874ca Merge branch 'master' of http://8.152.4.3:3000/yp_web/yoe-shop-web 3 روز پیش
  weixin_52219567 27ee74f80b 优化 3 روز پیش
3فایلهای تغییر یافته به همراه33 افزوده شده و 7 حذف شده
  1. 6 2
      src/utils/request.ts
  2. 4 0
      src/views/home/jdcomponents/JDBannerCards.vue
  3. 23 5
      src/views/home/jdcomponents/JDCategory.vue

+ 6 - 2
src/utils/request.ts

@@ -134,8 +134,12 @@ service.interceptors.response.use(
           const devPort = window.location.port || import.meta.env.VITE_APP_PORT;
           url = `${url}:${devPort}/index`;
         }
-        window.location.href = url;
-        isRelogin.show = false;
+        useUserStore()
+          .logout()
+          .then(() => {
+            window.location.href = url;
+            isRelogin.show = false;
+          });
         // ElMessageBox.confirm('登录状态已过期,请重新登录', '登录提示', {
         //   confirmButtonText: '重新登录',
         //   type: 'warning'

+ 4 - 0
src/views/home/jdcomponents/JDBannerCards.vue

@@ -407,6 +407,10 @@ onUnmounted(() => stopAuto());
 .yellow-t {
   background: #fff3e0;
   color: #e65100;
+  width: 100%;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
 }
 
 .red-t {

+ 23 - 5
src/views/home/jdcomponents/JDCategory.vue

@@ -1,10 +1,18 @@
 <template>
   <div class="cate-menu" @mouseleave="activeIndex = -1">
-    <ul class="cate-list">
-      <li v-for="(c, i) in dataList" :key="i" class="cate-item" :class="{ active: activeIndex === i }" @mouseenter="onMouseenter(i)">
-        <img :src="c.icon" class="cate-icon" />
-        <a href="#">{{ c.name }}</a>
-      </li>
+    <div class="cate-list"></div>
+    <ul class="cate-list-box">
+      <template v-for="(c, i) in dataList" :key="i">
+        <li
+          v-if="activeIndex == -1 ? (Number(i) < 9 ? true : false) : true"
+          class="cate-item"
+          :class="{ active: activeIndex === i }"
+          @mouseenter="onMouseenter(i)"
+        >
+          <img :src="c.icon" class="cate-icon" />
+          <a href="#">{{ c.name }}</a>
+        </li>
+      </template>
     </ul>
 
     <!-- 巨大悬浮菜单面板 (根据图5精细刻画) -->
@@ -87,12 +95,22 @@ const onMouseenter = (index: any) => {
   height: 100%;
   z-index: 100;
 }
+
 .cate-list {
   padding: 10px 0;
   background: #f8f9fa;
   height: 100%;
   box-sizing: border-box;
 }
+.cate-list-box {
+  width: 100%;
+  position: absolute;
+  padding: 10px 0;
+  background: #f8f9fa;
+  box-sizing: border-box;
+  top: 0;
+  left: 0;
+}
 
 .cate-item {
   height: 40px;