weixin_52219567 21 godzin temu
rodzic
commit
3c67c25e07

+ 11 - 1
src/layout/components/search.vue

@@ -57,10 +57,20 @@ const toplabel = ref<any>([]);
 meta.value = route.meta;
 
 watch(route, () => {
-  console.log(route, '88');
   meta.value = route.meta;
+  initData();
 });
 
+onMounted(() => {
+  initData();
+});
+
+const initData = () => {
+  if (route.path == '/search') {
+    input.value = route.query.input;
+  }
+};
+
 getSearchTitle(1).then((res) => {
   if (res.code == 200) {
     toplabel.value = res.data;

+ 1 - 0
src/layout/components/workbench.vue

@@ -246,6 +246,7 @@ const checkCurrentRoutePermission = () => {
   const currentPath = route.path;
   const publicPaths = ['/', '/login', '/404'];
   if (!publicPaths.includes(currentPath) && !allowedPaths.value.has(currentPath) && menuLists.value.includes(currentPath)) {
+    console.log('jinlai')
     onPath('/');
   }
 };

+ 20 - 12
src/views/cart/index.vue

@@ -20,7 +20,7 @@
         @selection-change="handleSelectionChange1"
       >
         <el-table-column type="selection" width="55" />
-        <el-table-column label="商品信息" width="490">
+        <el-table-column label="商品信息" minWidth="490">
           <template #default="scope">
             <div class="cart-info">
               <img class="cart-img" :src="scope.row.productImage" alt="" />
@@ -33,11 +33,11 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="单价" width="130">
+        <el-table-column label="单价" minWidth="130">
           <template #default="scope"> ¥{{ scope.row.memberPrice }} </template>
         </el-table-column>
         <!-- @blur="(res) => handleChange(res, scope.row)" -->
-        <el-table-column label="数量" width="200">
+        <el-table-column label="数量" minWidth="200">
           <template #default="scope">
             <el-input-number
               v-model="scope.row.productNum"
@@ -47,10 +47,10 @@
             />
           </template>
         </el-table-column>
-        <el-table-column label="小计" width="140">
+        <el-table-column label="小计" minWidth="140">
           <template #default="scope"> ¥{{ (scope.row.memberPrice * scope.row.productNum).toFixed(2) }} </template>
         </el-table-column>
-        <el-table-column label="操作">
+        <el-table-column label="操作" width="200">
           <template #default="scope">
             <div>
               <el-button @click="editCollection(scope, 1)" link>{{ scope.row.isCollect == 1 ? '取消收藏' : '移入收藏' }} </el-button>
@@ -75,7 +75,7 @@
         }"
       >
         <el-table-column type="selection" width="55" />
-        <el-table-column label="商品信息" width="490">
+        <el-table-column label="商品信息" minWidth="490">
           <template #default="scope">
             <div class="cart-info">
               <img class="cart-img" :src="scope.row.productImage" alt="" />
@@ -89,18 +89,18 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="单价" width="130" align="center">
+        <el-table-column label="单价" minWidth="130">
           <template #default="scope"> ¥{{ scope.row.memberPrice }} </template>
         </el-table-column>
-        <el-table-column label="数量" width="200" align="center">
+        <el-table-column label="数量" minWidth="200">
           <template #default="scope">
             <el-input-number disabled v-model="scope.row.productNum" :controls="false" :min="1" :max="10" style="width: 130px" />
           </template>
         </el-table-column>
-        <el-table-column label="小计" width="140" align="center">
+        <el-table-column label="小计" minWidth="140">
           <template #default="scope"> ¥{{ (scope.row.memberPrice * scope.row.productNum).toFixed(2) }} </template>
         </el-table-column>
-        <el-table-column label="操作">
+        <el-table-column label="操作" width="200">
           <template #default="scope">
             <div>
               <el-button @click="editCollection(scope, 2)" link>{{ scope.row.isCollect == 1 ? '取消收藏' : '移入收藏' }} </el-button>
@@ -122,9 +122,9 @@
         </div> -->
         <div class="bnt-box flex-row-start">
           <span>共</span>
-          <span class="hig">{{ tableData.length }}</span>
-          <span>种商品,已选择</span>
           <span class="hig">{{ selectedList.length }}</span>
+          <span>种商品,已选择</span>
+          <span class="hig">{{ onNun }}</span>
           <span>件,商品合计:</span>
           <span class="hig">¥{{ onMoney }}</span>
           <span>,活动优惠:0.00</span>
@@ -266,6 +266,14 @@ const onMoney = computed(() => {
   return price;
 });
 
+const onNun = computed(() => {
+  let money = 0;
+  selectedList.value.forEach((item: any) => {
+    money = money + Number(item.productNum);
+  });
+  return money;
+});
+
 //修改收藏
 const editCollection = (scope: any, type: any) => {
   if (scope.row.isCollect == 1) {

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

@@ -148,7 +148,7 @@ getAdvertisementGiftFloorList({}).then(async (res) => {
     for (const item of res.data) {
       item.floorData = {};
       item.floorData.imageUrl = item.mainImg;
-      item.floorData.url = '';
+      item.floorData.url = item.link ? item.link : '';
       item.floorData.imgType = 1;
       item.floorData.brandList = [];
       item.floorData.styleType = 1;

+ 4 - 3
src/views/home/index-mro.vue

@@ -152,7 +152,7 @@ getIndustrialFloor({}).then(async (res) => {
     for (const item of res.data) {
       item.floorData = {};
       item.floorData.imageUrl = item.imageUrl;
-      item.floorData.url = '';
+      item.floorData.url = item.link ? item.link : '';
       item.floorData.imgType = 1;
       item.floorData.brandList = [];
       item.floorData.styleType = 1;
@@ -182,11 +182,12 @@ getIndustrialFloor({}).then(async (res) => {
           if (datas3.data.length > 0) {
             item.floorData.styleType = 2;
             item.floorData.moreTitle = '更多品牌';
+            item.floorData.moreUrl = '/search/brand';
             datas3.data.forEach((item1: any) => {
               item.floorData.brandList.push({
                 imageUrl: item1.brandLogo,
-                url: item1.link ? item1.link : '',
-                imgType: 1
+                url: '/search?type=1&brandId=' + item1.id,
+                imgType: 2
               });
             });
           }

+ 13 - 7
src/views/home/index.vue

@@ -13,7 +13,10 @@
 
     <!-- 大牌推荐 -->
     <indexTitle :datas="bigbrandTitle"></indexTitle>
-    <brand v-if="bigbrandOne.coverImage && bigbrandList.length > 0" :row="{ imageUrl: bigbrandOne.coverImage, brandList: bigbrandList }"></brand>
+    <brand
+      v-if="bigbrandOne.coverImage && bigbrandList.length > 0"
+      :row="{ imageUrl: bigbrandOne.coverImage, url: bigbrandOne.url, brandList: bigbrandList }"
+    ></brand>
 
     <!-- 行家精选 -->
     <indexTitle :datas="expertTitle"></indexTitle>
@@ -212,7 +215,10 @@ getPlatformFlashSaleTitle({}).then((res) => {
 
 //大牌推荐列表(平台闪购列表)
 getPlatformFlashSaleList({}).then((res) => {
-  if (res.code == 200 && res.data.length > 0) bigbrandOne.value = res.data[0];
+  if (res.code == 200 && res.data.length > 0) {
+    bigbrandOne.value = res.data[0];
+    bigbrandOne.value.url = res.data[0].advertUrl ? res.data[0].advertUrl : '';
+  }
 });
 
 //大牌推荐列表(平台闪购列表)-右
@@ -221,7 +227,7 @@ getPlatformFlashSaleBrand({}).then((res) => {
     res.data.forEach((item: any, index: any) => {
       item.title = item.brandName;
       item.imageUrl = item.brandLogo;
-      item.url = '';
+      item.url = '/search?type=1&brandId=' + item.id;
       if (index < 10) bigbrandList.value.push(item);
     });
   }
@@ -257,10 +263,9 @@ getProcurementTopicsList({}).then((res) => {
       item.title = item.title;
       item.subtitle = item.subtitle;
       item.imageUrl = item.coverImage;
-      item.url = '';
+      item.url = '/plan_info/guide?id=' + item.id;
     });
     procureList.value = res.data;
-    console.log(res.data);
   }
 });
 
@@ -291,11 +296,12 @@ getClassificationFloorList({}).then(async (res) => {
         const datas1 = await getClassificationFloorDetail(item.floorNo);
         if (datas1.code == 200 && datas1.data.length > 0) {
           item.imageUrl = datas1.data[0].advertiseImage;
+          item.url = datas1.data[0].advertiseLink;
           datas1.data.forEach((item1: any) => {
             item1.title = item1.advertiseName;
             item1.subtitle = item1.advertiseDescribe;
             item1.imageUrl = item1.advertiseImage;
-            item1.url = '';
+            item1.url = item1.advertiseLink ? item1.advertiseLink : '';
           });
 
           if (datas1.data.length > 1) {
@@ -311,7 +317,7 @@ getClassificationFloorList({}).then(async (res) => {
           datas2.data.forEach((item1: any) => {
             item.tabList.push({
               title: item1.labelName,
-              url: ''
+              url: item1.labelLink ? item1.labelLink : ''
             });
           });
         }

+ 1 - 0
src/views/home/pccomponents/pages/discover.vue

@@ -20,6 +20,7 @@
           :src="componentData.imageUrl ? componentData.imageUrl : figure"
           :fit="componentData.imageUrl ? (componentData.imgType == 1 ? 'fill' : componentData.imgType == 2 ? 'contain' : 'cover') : 'cover'"
           :style="componentData.boxRadius ? { borderRadius: componentData.boxRadius + 'px' } : {}"
+          @click="onPath(componentData.url)"
         />
         <div
           class="plan-bos"

+ 9 - 0
src/views/home/pccomponents/pages/headData.vue

@@ -219,6 +219,9 @@
                 </div>
               </template>
             </div>
+            <div class="no-data" v-if="realList.length == 0">
+              <el-empty :image-size="50" description="暂无优易资讯" />
+            </div>
           </div>
         </div>
       </div>
@@ -840,6 +843,12 @@ const warpCss = computed(() => {
             border-radius: 3px;
           }
 
+          .no-data {
+            width: 100%;
+            padding: 0 10px;
+            border-radius: 3px;
+          }
+
           .real-list {
             width: 100%;
             font-size: 12px;

+ 9 - 5
src/views/item/index.vue

@@ -179,10 +179,14 @@
           </div>
         </div>
         <div class="bnt-bos flex-row-start">
-          <el-button :disabled="dataInfo.allStock > 0 && dataInfo.productStatus == 1 ? false : true" class="btn" type="primary" @click="onCart"
-            >加入购物车</el-button
+          <el-button
+            :disabled="dataInfo.allStock > 0 && dataInfo.productStatus == 1 ? false : true"
+            class="btn"
+            :type="dataInfo.allStock > 0 && dataInfo.productStatus == 1 ? 'primary' : 'info'"
+            @click="onCart"
           >
-          <span v-if="dataInfo.allStock <= 0" class="btn-text">(库存不足)</span>
+            {{ dataInfo.productStatus != 1 ? '该商品已下架' : dataInfo.allStock <= 0 ? '库存不足' : '加入购物车' }}
+          </el-button>
         </div>
       </div>
     </div>
@@ -574,8 +578,8 @@ const handleMouseMove = (e: MouseEvent) => {
           // 新增:遮罩层样式
           .zoom-mask {
             position: absolute;
-            width: 50%; /* 对应2倍放大,宽高各占50%形成正方形 */
-            height: 50%; /* 如果图片不是正方形,这里可能需要调整以保持正方形,但通常跟随容器比例即可 */
+            width: 200px; /* 对应2倍放大,宽高各占50%形成正方形 */
+            height: 200px; /* 如果图片不是正方形,这里可能需要调整以保持正方形,但通常跟随容器比例即可 */
             background-color: rgba(255, 255, 255, 0.3); /* 半透明白色 */
             border: 1px solid #ccc; /* 边框 */
             pointer-events: none; /* 关键:让鼠标事件穿透遮罩层,避免闪烁 */

+ 91 - 9
src/views/order/orderManage/applyAfter.vue

@@ -4,7 +4,9 @@
       <div class="page-inner header-inner">
         <div class="header-left">
           <div class="header-icon">
-            <el-icon><Clock /></el-icon>
+            <el-icon>
+              <Clock />
+            </el-icon>
           </div>
           <div class="header-title">申请售后</div>
         </div>
@@ -47,7 +49,9 @@
               <span>本单提交商品总数量:{{ summary.totalQty }}个</span>
               <span>退货总金额:¥ {{ summary.totalAmount }}</span>
             </div>
-            <el-icon class="summary-close" @click="topBtnFlag = false"><Close /></el-icon>
+            <el-icon class="summary-close" @click="topBtnFlag = false">
+              <Close />
+            </el-icon>
           </div>
 
           <div class="product-table">
@@ -120,6 +124,15 @@
               </el-upload>
             </el-form-item> -->
             <el-form-item label="凭证图片">
+              <div v-if="form.voucherPhoto && form.voucherPhoto != ''" class="flex">
+                <div class="upload-bos" v-for="(item, index) in form.voucherPhoto.split(',')" :key="index">
+                  <img class="upload-img" :src="item" />
+                  <div class="upload-box">
+                    <el-icon @click="previewImage(item)" color="#ffffff" size="20" class="mr-[20px] icons"><Search /></el-icon>
+                    <el-icon @click="onDel(index)" color="#ffffff" size="20" class="icons"><Delete /></el-icon>
+                  </div>
+                </div>
+              </div>
               <el-upload
                 class="avatar-uploader"
                 :action="action"
@@ -128,11 +141,10 @@
                 :on-success="handleAvatarSuccess"
                 :before-upload="beforeAvatarUpload"
               >
-                <el-icon class="avatar-uploader-icon"><Plus /></el-icon>
+                <el-icon class="avatar-uploader-icon">
+                  <Plus />
+                </el-icon>
               </el-upload>
-              <div v-if="form.voucherPhoto && form.voucherPhoto != ''">
-                <img class="upload-img" v-for="(item, index) in form.voucherPhoto.split(',')" :key="index" :src="item" />
-              </div>
             </el-form-item>
           </el-form>
         </div>
@@ -210,6 +222,15 @@
         </div>
       </template>
     </el-dialog>
+
+    <!-- 图片放大 -->
+    <el-image-viewer
+      :url-list="previewImageList"
+      v-if="imageViewer.show"
+      @close="imageViewer.show = false"
+      :initial-index="imageViewer.index"
+      :zoom-rate="1"
+    />
   </div>
 </template>
 
@@ -326,6 +347,26 @@ const handleRemoveProduct = (id: number) => {
   selectedProducts.value = selectedProducts.value.filter((p) => p.productId != id);
 };
 
+// 图片放大
+const imageViewer = reactive({
+  show: false,
+  index: 0
+});
+const previewImageList = ref<any>([]);
+const previewImage = (item: any) => {
+  console.log(item, '8888');
+  previewImageList.value = [item];
+  imageViewer.index = 0;
+  imageViewer.show = true;
+};
+
+// 图片删除
+const onDel = (index: any) => {
+  let originalString: any = form.voucherPhoto;
+  originalString = originalString.split(',');
+  originalString.splice(index, 1);
+  form.voucherPhoto = originalString.join(',');
+};
 //上传成功
 const handleAvatarSuccess = (res: any) => {
   if (res.code == 200) {
@@ -624,6 +665,7 @@ const handleSubmit = async () => {
         color: #999;
         margin-right: 10px;
       }
+
       .value {
         color: #333;
       }
@@ -687,6 +729,7 @@ const handleSubmit = async () => {
     gap: 18px;
     font-size: 13px;
   }
+
   .summary-close {
     cursor: pointer;
     color: #18a058;
@@ -708,6 +751,7 @@ const handleSubmit = async () => {
   .table-row {
     display: flex;
     border-bottom: 1px solid #f0f0f0;
+
     &:last-child {
       border-bottom: none;
     }
@@ -730,6 +774,7 @@ const handleSubmit = async () => {
     flex: 1;
     justify-content: flex-start;
   }
+
   .col-price,
   .col-sold,
   .col-available,
@@ -737,6 +782,7 @@ const handleSubmit = async () => {
   .col-amount {
     width: 110px;
   }
+
   .col-op {
     width: 80px;
   }
@@ -751,6 +797,7 @@ const handleSubmit = async () => {
     align-items: center;
     width: 100%;
   }
+
   .product-image {
     width: 60px;
     height: 60px;
@@ -758,22 +805,26 @@ const handleSubmit = async () => {
     border-radius: 4px;
     overflow: hidden;
     flex-shrink: 0;
+
     .el-image {
       width: 100%;
       height: 100%;
     }
+
     .image-placeholder {
       width: 100%;
       height: 100%;
       background: #f5f5f5;
     }
   }
+
   .product-meta {
     .name {
       font-size: 13px;
       color: #333;
       line-height: 1.4;
     }
+
     .spec {
       margin-top: 4px;
       font-size: 12px;
@@ -798,10 +849,12 @@ const handleSubmit = async () => {
 
   .pickup-row {
     margin-bottom: 10px;
+
     .k {
       color: #999;
       margin-right: 6px;
     }
+
     &.hint {
       color: #999;
     }
@@ -812,6 +865,7 @@ const handleSubmit = async () => {
   display: flex;
   justify-content: center;
   padding: 10px 0 20px;
+
   .submit-btn {
     width: 120px;
   }
@@ -869,7 +923,8 @@ const handleSubmit = async () => {
 }
 
 .avatar-uploader {
-  margin: 10px 20px;
+  margin: 10px 20px 0 0px;
+
   :deep(.el-upload) {
     width: 108px;
     height: 108px;
@@ -881,11 +936,38 @@ const handleSubmit = async () => {
   }
 }
 
-.upload-img {
+.upload-bos {
   width: 108px;
   height: 108px;
   border-radius: 2px;
-  margin-right: 15px;
+  margin: 10px 20px 0 0px;
+  position: relative;
+  &:hover {
+    .upload-box {
+      width: 100%;
+      height: 100%;
+    }
+  }
+
+  .upload-img {
+    width: 100%;
+    height: 100%;
+  }
+  .upload-box {
+    width: 0;
+    height: 0;
+    overflow: hidden;
+    background-color: rgba(0, 0, 0, 0.5);
+    position: absolute;
+    top: 0;
+    left: 0;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    .icons {
+      cursor: pointer;
+    }
+  }
 }
 
 .el-icon.avatar-uploader-icon {

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

@@ -2,7 +2,7 @@
   <div class="project">
     <div class="project-pages">
       <div class="img-bos">
-        <el-image class="solve-img" src="@/assets/images/login-background.jpg" fit="cover" />
+        <el-image class="solve-img" src="https://yunying.yoe365.com:8045/Photos/134108619338390297.jpg" fit="cover" />
       </div>
       <div class="filter-bos">
         <div v-for="(item1, index1) in filterListy" :key="index1" class="filter-list flex-row-start">

+ 12 - 3
src/views/search/special.vue

@@ -283,14 +283,16 @@ onMounted(() => {
     display: flex;
     flex-wrap: wrap;
     margin-top: 12px;
-    gap: 20px 12.5px;
+    gap: 20px 12px;
     .expert-list {
-      width: 230px;
+      flex: 0 0 calc((100% - 48px) / 5);
+      width: 0;
+      // width: 230px;
       height: 306px;
       background: #ffffff;
-
       padding: 20px;
       cursor: pointer;
+      border-radius: 5px;
       img {
         width: 100%;
         height: 190px;
@@ -317,6 +319,13 @@ onMounted(() => {
         }
       }
     }
+
+    .empty-bos {
+      width: 100%;
+      background-color: #ffffff;
+      border-radius: 10px;
+      margin-bottom: 20px;
+    }
   }
 }
 </style>