Forráskód Böngészése

Merge branch 'master' of http://8.152.4.3:3000/yp_web/yoe-shop-web

hurx 5 napja
szülő
commit
55be9a9344

+ 8 - 0
src/assets/styles/common.scss

@@ -111,3 +111,11 @@
     }
   }
 }
+
+:deep(.el-message) {
+  z-index: 99999 !important;
+}
+
+.el-message{
+  z-index: 99999 !important;
+}

+ 1 - 1
src/views/home/datacomponents/JDHeader.vue

@@ -182,7 +182,7 @@
           </div>
 
           <!-- 我的采购单 (带购物车和红点数字1) -->
-          <div class="action-btn my-cart-btn relative">
+          <div class="action-btn my-cart-btn relative" @click="onPath('/cart')">
             <svg class="cart-icon" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
               <circle cx="9" cy="21" r="1"></circle>
               <circle cx="20" cy="21" r="1"></circle>

+ 36 - 18
src/views/home/index-fuli.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="home-pages">
+    <Header />
     <!--  头部 -->
     <comHead v-if="headData.show" :row="headData" :datas="realList"></comHead>
 
@@ -8,8 +9,12 @@
     <imageCube v-if="scenario.length > 0" :datas="scenario" :row="imageCubeData"></imageCube>
 
     <!-- 热门定制 -->
-    <indexFuilTitle :datas="{ title: '热门定制' }"></indexFuilTitle>
-    <comGoods :row="{ styleType: 1, goodsShow: [1, 2, 3], goodsTitleType: 3 }" :datas="popular"></comGoods>
+    <div v-for="(item, index) in popularList" :key="index">
+      <template v-if="item.popular && item.popular.length > 0">
+        <indexFuilTitle :datas="{ title: item.name }"></indexFuilTitle>
+        <comGoods :row="{ styleType: 1, goodsShow: [1, 2, 3], goodsTitleType: 3 }" :datas="item.popular"></comGoods>
+      </template>
+    </div>
 
     <!-- 循环数据 -->
     <div class="goods-bos" v-for="(item, index) in goodsList" :key="index">
@@ -18,12 +23,17 @@
     </div>
 
     <!-- 为您推荐 -->
-    <indexFuilTitle :datas="{ title: '为您推荐' }"></indexFuilTitle>
-    <comGoods :row="{ styleType: 1, goodsShow: [1, 2, 3], goodsTitleType: 3 }" :datas="recommend"></comGoods>
+    <div v-for="(item, index) in recommendList" :key="index">
+      <template v-if="item.recommend && item.recommend.length > 0">
+        <indexFuilTitle :datas="{ title: item.name }"></indexFuilTitle>
+        <comGoods :row="{ styleType: 1, goodsShow: [1, 2, 3], goodsTitleType: 3 }" :datas="item.recommend"></comGoods>
+      </template>
+    </div>
   </div>
 </template>
 
 <script setup lang="ts">
+import Header from '@/layout/components/header.vue';
 import indexFuilTitle from '@/views/home/pccomponents/pages/indexFuilTitle.vue';
 import comHead from '@/views/home/pccomponents/pages/head.vue';
 import imageCube from '@/views/home/pccomponents/pages/imageCube.vue';
@@ -46,9 +56,9 @@ const headData = ref<any>({});
 const imageCubeData = ref<any>({});
 const realList = ref<any>([]);
 const scenario = ref<any>([]);
-const popular = ref<any>([]);
+const popularList = ref<any>([]);
 const goodsList = ref<any>([]);
-const recommend = ref<any>([]);
+const recommendList = ref<any>([]);
 
 onMounted(() => {
   document.documentElement.style.setProperty('--hover-color', '#E7000B');
@@ -140,13 +150,17 @@ getRecommendAdList({}).then((res) => {
 });
 
 //热门定制
-getHotCustomGiftFloorList({}).then((res) => {
+getHotCustomGiftFloorList({}).then(async (res) => {
   if (res.code == 200) {
-    getGiftFloorLinkProductList({ floorId: res.data[0].id }).then((res1) => {
-      if (res1.code == 200) {
-        popular.value = res1.data;
-      }
-    });
+    for (const item of res.data) {
+      try {
+        const datas2 = await getGiftFloorLinkProductList({ floorId: item.id });
+        if (datas2.code == 200) {
+          item.popular = datas2.data;
+        }
+      } catch (error) {}
+    }
+    popularList.value = res.data;
   }
 });
 
@@ -184,13 +198,17 @@ getAdvertisementGiftFloorList({}).then(async (res) => {
 });
 
 // 为您推荐
-getRecommendGiftFloorList({}).then((res) => {
+getRecommendGiftFloorList({}).then(async (res) => {
   if (res.code == 200) {
-    getGiftFloorLinkProductList({ floorId: res.data[0].id }).then((res1) => {
-      if (res1.code == 200) {
-        recommend.value = res1.data;
-      }
-    });
+    for (const item of res.data) {
+      try {
+        const datas2 = await getGiftFloorLinkProductList({ floorId: item.id });
+        if (datas2.code == 200) {
+          item.recommend = datas2.data;
+        }
+      } catch (error) {}
+    }
+    recommendList.value = res.data;
   }
 });
 </script>

+ 2 - 0
src/views/home/index-mro.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="home-pages">
+    <Header />
     <!--  头部 -->
     <comHead v-if="headData.show" :row="headData" :datas="realList"></comHead>
     <!-- 活动魔方 商业标签(工业装修-商业标签) -->
@@ -20,6 +21,7 @@
 </template>
 
 <script setup lang="ts">
+import Header from '@/layout/components/header.vue';
 import {
   getHomeAdList,
   getHomeIconAd,

+ 3 - 0
src/views/item/index.vue

@@ -979,6 +979,9 @@ const handleMouseMove = (e: MouseEvent) => {
     }
   }
 }
+:deep(.el-message) {
+  z-index: 99999 !important;
+}
 </style>
 
 <!-- 到这里就可以了 -->

+ 8 - 4
src/views/login.vue

@@ -10,7 +10,7 @@
         </el-carousel>
         <div></div>
         <div class="login-bos" :class="{ 'customer-login': type === 3 }">
-          <el-form ref="loginRef" :model="loginForm" :rules="loginRules">
+          <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-box">
             <div class="login-type flex-row-between">
               <div :class="type == 1 ? 'hig' : ''" @click="onType(1)">账户登录</div>
               <span class="separator">|</span>
@@ -396,6 +396,10 @@ onMounted(() => {
       justify-content: space-around;
       align-items: center;
 
+      .login-box {
+        width: 75%;
+      }
+
       // 客户编号登录时调整布局
       // &.customer-login {
       //   justify-content: flex-start;
@@ -414,7 +418,7 @@ onMounted(() => {
         font-weight: 600;
         font-size: 18px;
         color: #101828;
-        padding: 0 67px;
+        padding: 0 40px;
         margin-bottom: 40px;
         div {
           cursor: pointer;
@@ -434,7 +438,7 @@ onMounted(() => {
         }
       }
       .login-input {
-        width: 90%;
+        width: 100%;
         height: 42px;
         font-size: 16px;
         margin: 0 auto;
@@ -455,7 +459,7 @@ onMounted(() => {
         color: #9ca3af;
       }
       .login-btn {
-        width: 90%;
+        width: 100%;
         height: 42px;
         // margin-top: 20px;
         font-size: 16px;