Przeglądaj źródła

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

hurx 1 tydzień temu
rodzic
commit
152733628e

+ 12 - 0
src/api/breg/index.ts

@@ -101,3 +101,15 @@ export const getPlatformConfigList = (query: any) => {
     params: query
   });
 };
+
+/**
+ * 轮播
+ * @param customerName
+ */
+export const getLoginConfigList = (query: any) => {
+  return request({
+    url: '/system/indexSystem/getLoginConfigList',
+    method: 'get',
+    params: query
+  });
+};

+ 17 - 0
src/api/home/index-fuli.ts

@@ -80,3 +80,20 @@ export function getRecommendGiftFloorList(query: any) {
     params: query
   });
 }
+
+//头部优易资讯
+export function getFulillNoticeList(query: any) {
+  return request({
+    url: '/product/indexProduct/getFulillNoticeList',
+    method: 'get',
+    params: query
+  });
+}
+
+//头部优易资讯详情
+export function getFulillNoticeDetail(id: any) {
+  return request({
+    url: '/product/indexProduct/getFulillNoticeDetail/' + id,
+    method: 'get'
+  });
+}

+ 2 - 4
src/layout/index.vue

@@ -8,10 +8,8 @@
       <jdHeader v-if="whiteList.indexOf(route.path) == -1" />
     </template>
     <template v-else-if="headerType == 'default'">
-      <template v-if="whiteList.indexOf(route.path) == -1">
-        <Header v-if="meta.header != 'hide'" />
-        <Search v-if="meta.search != 'hide'" :meta="meta" />
-      </template>
+      <Header v-if="meta.header != 'hide'" />
+      <Search v-if="meta.search != 'hide' && whiteList.indexOf(route.path) == -1" :meta="meta" />
     </template>
     <Nav v-if="meta.nav" :meta="meta" />
     <Breadcrumb v-if="meta.breadcrumb" />

+ 11 - 4
src/views/home/index-fuli.vue

@@ -37,9 +37,10 @@ import {
   getHotCustomGiftFloorList,
   getAdvertisementGiftFloorList,
   getGiftFloorLinkProductList,
-  getRecommendGiftFloorList
+  getRecommendGiftFloorList,
+  getFulillNoticeList
 } from '@/api/home/index-fuli';
-import { getSearchTitle, getYouYiZiXunPage, getHomeNav } from '@/api/home/index';
+import { getSearchTitle, getHomeNav } from '@/api/home/index';
 
 const headData = ref<any>({});
 const imageCubeData = ref<any>({});
@@ -98,8 +99,14 @@ const getHead = async () => {
       });
     }
 
-    const datas5 = await getYouYiZiXunPage({});
-    if (datas5.code == 200) realList.value = datas5.data;
+    const datas5 = await getFulillNoticeList({});
+    if (datas5.code == 200) {
+      datas5.rows.forEach((item: any) => {
+        item.announcementTitle = item.title;
+        item.pathType = 3;
+      });
+      realList.value = datas5.rows;
+    }
 
     const datas6 = await getIconAdList({});
     if (datas6.code == 200) {

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

@@ -7,7 +7,7 @@
     <activity v-if="activityData.show" :row="activityData"></activity>
     <!-- 轮播展位商品 -->
     <div class="h-[15px]"></div>
-    <comGoods :row="{ styleType: 1, goodsShow: [1, 2, 3], goodsTitleType: 3 }" :datas="sellList"></comGoods>
+    <comGoods :row="{ styleType: 2, goodsShow: [1, 2, 3], goodsTitleType: 3 }" :datas="sellList"></comGoods>
     <!-- 循环-商品 -->
     <div class="goods-bos" v-for="(item, index) in goodsList" :key="index">
       <indexMorTitle :datas="item.titleData"></indexMorTitle>

+ 54 - 2
src/views/home/index.vue

@@ -35,7 +35,18 @@
 
     <!-- 采购指南 -->
     <indexTitle :datas="procureTitle"></indexTitle>
-    <advert v-if="procureList.length > 0" :row="{ navlList: procureList, styleType: 1, aspectRatio: 393 / 220 }"></advert>
+    <div class="nav-bos">
+      <div v-for="(item, index) in procureList" :key="index" class="data-list hover-color flex-column-between" @click="onPath(item.url)">
+        <el-image
+          class="img"
+          :src="item.imageUrl ? item.imageUrl : figure"
+          :fit="item.imageUrl ? (item.imgType == 1 ? 'fill' : item.imgType == 2 ? 'contain' : 'cover') : 'cover'"
+        />
+        <div class="title zi-hover">{{ item.title || '' }}</div>
+        <div class="mt-[2px] mb-[12px] subtitle ellipsis">{{ item.subtitle || '' }}</div>
+      </div>
+    </div>
+    <!-- <advert v-if="procureList.length > 0" :row="{ navlList: procureList, styleType: 1, aspectRatio: 393 / 220 }"></advert> -->
 
     <!-- 循环-商品楼层 -->
     <div v-for="(item1, index1) in homeList" :key="index1">
@@ -407,10 +418,51 @@ getProjectCaseList({}).then((res) => {
       }
 
       .img {
-        height: 112px;
+        // height: 112px;
+        width: 100%;
         aspect-ratio: 170 / 112;
       }
     }
   }
+  .nav-bos {
+    display: flex;
+    gap: 10px;
+    width: 100%;
+    width: 100%;
+    max-width: 1500px;
+    min-width: 1200px;
+    overflow: hidden;
+    margin: 0 auto;
+    .data-list {
+      width: 0;
+      background-color: #ffffff;
+      border-radius: 5px;
+      overflow: hidden;
+      cursor: pointer;
+      flex: 0 0 calc((100% - 30px) / 4);
+      @media (min-width: 1320px) {
+        flex: 0 0 calc((100% - 40px) / 5);
+      }
+
+      .title {
+        text-align: center;
+        padding: 0 15px;
+        font-weight: 600;
+        font-size: 14px;
+        color: #101828;
+      }
+
+      .subtitle {
+        text-align: center;
+        padding: 0 15px;
+      }
+
+      .img {
+        width: 100%;
+        // height: 200px;
+        aspect-ratio: 393 / 220;
+      }
+    }
+  }
 }
 </style>

+ 4 - 1
src/views/home/pccomponents/pages/goods.vue

@@ -35,7 +35,7 @@
       </div>
     </div>
     <div v-else :style="boxCss">
-      <el-carousel height="300px" arrow="always" autoplay>
+      <el-carousel height="384px" arrow="always" autoplay>
         <el-carousel-item v-for="(item1, index1) in dataList" :key="index1" class="w100% h100%">
           <div class="goods-bos">
             <div
@@ -158,6 +158,9 @@ const dataList = computed(() => {
       return original.value;
     }
   } else {
+    if (props.datas) {
+      original.value = props.datas;
+    }
     const pageSize = 5;
     const groupedUsers = [];
     for (let i = 0; i < original.value.length; i += pageSize) {

+ 2 - 1
src/views/home/pccomponents/pages/head.vue

@@ -231,9 +231,10 @@
                 </el-icon>
               </div> -->
             </div>
+            <!-- @click="onPath('/solve/real?id=' + item.id + (item.pathType ? '&type=' + item.pathType : ''))" -->
             <template v-for="(item, index) in realList" :key="index">
               <div
-                @click="onPath('/solve/real?id=' + item.id)"
+                @click="onPath(item.pathType ? item.link : '/solve/real?id=' + item.id)"
                 class="real-list ellipsis hover-color"
                 v-if="componentData.realDataType == 2 ? true : Number(index) < componentData.realNumber"
               >

+ 82 - 12
src/views/login.vue

@@ -3,6 +3,11 @@
     <div style="height: 70%">
       <img @click="onPath('/')" class="head" src="@/assets/images/head.png" alt="" />
       <div class="login-info flex-row-between">
+        <el-carousel class="carousel-bos" v-if="carousel.length > 0">
+          <el-carousel-item v-for="item in carousel" :key="item">
+            <el-image class="carousel-img" :src="item.value" fit="cover"></el-image>
+          </el-carousel-item>
+        </el-carousel>
         <div></div>
         <div class="login-bos" :class="{ 'customer-login': type === 3 }">
           <el-form ref="loginRef" :model="loginForm" :rules="loginRules">
@@ -94,28 +99,27 @@
 
     <div class="login-foot flex-column-between">
       <div class="font-bos flex-row-center">
-        <div>客户管理</div>
-        <div style="margin: 0 10px">|</div>
-        <div>供应商合作</div>
-        <div style="margin: 0 10px">|</div>
-        <div>关于我们</div>
-        <div style="margin: 0 10px">|</div>
-        <div @click="onPath('/i/help')">帮助中心</div>
-        <div style="margin: 0 10px">|</div>
-        <div>联系我们</div>
+        <template v-for="(navItem, index) in bottomNavList" :key="index">
+          <div class="info-text" @click="onPath(navItem.url)">{{ navItem.navigationName }}</div>
+          <div v-if="index < bottomNavList.length - 1" style="margin: 0 10px">|</div>
+        </template>
       </div>
-      <div class="font-box">CopyRight @ 优易365 2026</div>
+      <div class="font-box">{{ icpNo }}增值电信业务经营许可证编号:{{ license }}</div>
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
 import { useUserStore } from '@/store/modules/user';
-import { smsCode } from '@/api/breg/index';
+import { smsCode, getLoginConfigList } from '@/api/breg/index';
 import { LoginData } from '@/api/types';
 import { to } from 'await-to-js';
 import { User, Lock, Iphone, Message } from '@element-plus/icons-vue';
 import { onPath } from '@/utils/siteConfig';
+import { getPlatformConfigList } from '@/api/breg/index';
+import { getBottomNav } from '@/api/home/index';
+import { handleTree } from '@/utils/ruoyi';
+import { on } from 'events';
 
 const userStore = useUserStore();
 const router = useRouter();
@@ -123,6 +127,9 @@ const router = useRouter();
 const type = ref<number>(1);
 const loading = ref(false);
 const timer = ref<any>(null);
+const icpNo = ref<any>('');
+const license = ref<any>('');
+const bottomNavList = ref<any[]>([]);
 
 const loginRef = ref<ElFormInstance>();
 const redirect = ref('/');
@@ -152,6 +159,8 @@ const loginRules: ElFormRules = {
   loginName: [{ required: true, trigger: 'blur', message: '请输入联系人登录名称' }]
 };
 
+const carousel = ref<any>([]);
+
 const onType = (val: number) => {
   type.value = val;
   // 切换登录类型时更新 grantType
@@ -164,6 +173,43 @@ const onType = (val: number) => {
   }
 };
 
+getLoginConfigList({}).then((res) => {
+  if (res.code == 200) {
+    carousel.value = res.data;
+  }
+});
+
+getPlatformConfigList({ configKey: 'icpNo' }).then((res) => {
+  if (res.code == 200) {
+    if (res.rows && res.rows.length > 0) {
+      icpNo.value = res.rows[0].value;
+    }
+  }
+});
+
+getPlatformConfigList({ configKey: 'license' }).then((res) => {
+  if (res.code == 200) {
+    if (res.rows && res.rows.length > 0) {
+      license.value = res.rows[0].value;
+    }
+  }
+});
+
+// 获取底部导航数据
+const fetchBottomNav = async () => {
+  try {
+    const res = await getBottomNav(''); // 使用 footer 作为页面类型参数
+    if (res.code == 200 && res.data) {
+      // 后端返回的是扁平列表,使用 handleTree 转换为树形结构
+      // parentId 为 0、null 或 undefined 的是父级节点
+      bottomNavList.value = handleTree(res.data, 'id', 'parentId', 'children');
+      console.log('bottomNavList.value:', bottomNavList.value);
+    }
+  } catch (error) {
+    console.error('获取底部导航失败:', error);
+  }
+};
+
 /**
  * 监听路由变化,获取重定向地址
  */
@@ -295,6 +341,7 @@ const getLoginData = () => {
 
 onMounted(() => {
   getLoginData();
+  fetchBottomNav();
 });
 </script>
 
@@ -321,10 +368,11 @@ onMounted(() => {
   }
 
   .login-info {
+    position: relative;
     width: 100%;
     // height: 600px;
     height: 100%;
-    background-image: url('@/assets/images/login/login2.png');
+    // background-image: url('@/assets/images/login/login2.png');
     overflow: hidden;
     background-position: center center;
     background-repeat: no-repeat;
@@ -451,6 +499,12 @@ onMounted(() => {
     font-size: 13px;
     color: #999999;
     margin-top: 30px;
+    .info-text {
+      cursor: pointer;
+      &:hover {
+        color: #c8102e;
+      }
+    }
   }
   .font-box {
     width: 100%;
@@ -459,5 +513,21 @@ onMounted(() => {
     margin-top: 20px;
     text-align: center;
   }
+
+  .carousel-bos {
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: -1;
+    :deep(.el-carousel__container) {
+      height: 100%;
+    }
+    .carousel-img {
+      width: 100%;
+      height: 100%;
+    }
+  }
 }
 </style>

+ 1 - 1
src/views/plan/guide.vue

@@ -311,7 +311,7 @@ const handleCurrentChange = (val: number) => {
     gap: 20px;
     flex-wrap: wrap;
     padding: 22px 0 40px 0;
-    justify-content: space-between; // 均匀分布
+    // justify-content: space-between; // 均匀分布
 
     .data-list {
       // 计算宽度:每行3个。 (100% - 2个间隙 * 20px) / 3

+ 9 - 0
src/views/solve/real.vue

@@ -39,6 +39,7 @@ import { onPath } from '@/utils/siteConfig';
 import { getYouYzXunInfo } from '@/api/plan/index';
 import { getProcurementProgramList } from '@/api/plan/index';
 import { customerMessageDetail } from '@/api/home/index-enterprise';
+import { getFulillNoticeDetail } from '@/api/home/index-fuli';
 const id = ref<any>(null);
 const type = ref<any>(1);
 const dataInfo = ref<any>({});
@@ -60,6 +61,14 @@ const getInfo = () => {
         dataInfo.value = res.data;
       }
     });
+  } else if (type.value == 3) {
+    getFulillNoticeDetail(id.value).then((res) => {
+      if (res.code == 200) {
+        res.data.announcementTitle = res.data.title;
+        res.data.announcementContent = res.data.content;
+        dataInfo.value = res.data;
+      }
+    });
   } else {
     getYouYzXunInfo(id.value).then((res) => {
       if (res.code == 200) {