瀏覽代碼

fix: bug修复阶段v1.4

chenpeng 12 小時之前
父節點
當前提交
57e5a4e045

二進制
assets/images/category/active/fashion_active.png


二進制
assets/images/category/active/gifts_active.png


二進制
assets/images/category/active/health_active.png


二進制
assets/images/category/active/home_decor_active.png


二進制
assets/images/category/active/lifestyle_active.png


二進制
assets/images/category/active/stationery_active.png


二進制
assets/images/category/active/tech_active.png


二進制
assets/images/category/active/trend_active.png


二進制
assets/images/category/normal/fashion.png


二進制
assets/images/category/normal/gifts.png


二進制
assets/images/category/normal/health.png


二進制
assets/images/category/normal/home_decor.png


二進制
assets/images/category/normal/lifestyle.png


二進制
assets/images/category/normal/stationery.png


二進制
assets/images/category/normal/tech.png


二進制
assets/images/category/normal/trend.png


+ 1 - 0
components/business/contact/form.vue

@@ -222,6 +222,7 @@ getCountryList()
           box-shadow: none !important;
           height: 40px !important;
           border-radius: 10px !important;
+          background-color: #fff !important;
         }
       }
       .item-input {

+ 1 - 1
components/common/footer/guide.vue

@@ -47,7 +47,7 @@ const { openLoginModal } = useLoginModal()
               </NuxtLink>
             </div>
             <div class="mb-30px">
-              <NuxtLink to="https://www.ejetprocurement.com/" class="hover:text-#9B6CFF">
+              <NuxtLink to="https://www.ejetprocurement.com/" target="_blank" class="hover:text-#9B6CFF">
                 EJET Procurement
               </NuxtLink>
             </div>

+ 13 - 7
components/common/loginAndDownload/comp/info/finish.vue

@@ -1,15 +1,21 @@
 <script lang='ts' setup>
 import { useCommonStore } from '@/stores/modules/common'
-import { downloadFile } from '@/utils/common/download'
+import { downloadFileByA } from '@/utils/common/download'
 
 const commonStore = useCommonStore()
 const { downloadCatalog } = storeToRefs(commonStore)
+const isDownloading = ref(false)
 
-function startDownload() {
-  if (downloadCatalog.value)
-    downloadFile(downloadCatalog.value.pdf, `${downloadCatalog.value.title}.pdf`)
-  else
-    console.error('No download catalog available')
+async function startDownload() {
+  if (downloadCatalog.value) {
+    isDownloading.value = true
+    await downloadFileByA(downloadCatalog.value.pdf, `${downloadCatalog.value.title || ''}.pdf`)
+    const timer = setTimeout(() => {
+      isDownloading.value = false
+      clearTimeout(timer)
+    }, 5000)
+  }
+  else { console.error('No download catalog available') }
 }
 startDownload()
 </script>
@@ -17,7 +23,7 @@ startDownload()
 <template>
   <div>
     <div class="custom-title-font text-24px fw-800 text-#333 mb-10px flex items-center">
-      Download Successfully!👏
+      {{ isDownloading ? 'Downloading...' : 'Download Successfully!👏' }}
     </div>
     <div class="text-14px text-#1A1A1A lh-22px mb-20px">
       Please feel free to contact us to customize your exclusive product solution.

+ 30 - 8
components/common/navigation/icon-group.vue

@@ -1,22 +1,44 @@
 <script lang='ts' setup>
+import trend from '@/assets/images/category/normal/trend.png'
+import tech from '@/assets/images/category/normal/tech.png'
+import lifeStyle from '@/assets/images/category/normal/lifestyle.png'
+import stationery from '@/assets/images/category/normal/stationery.png'
+import fashion from '@/assets/images/category/normal/fashion.png'
+import gifts from '@/assets/images/category/normal/gifts.png'
+import homeDecor from '@/assets/images/category/normal/home_decor.png'
+import health from '@/assets/images/category/normal/health.png'
+
+import trendActive from '@/assets/images/category/active/trend_active.png'
+import techActive from '@/assets/images/category/active/tech_active.png'
+import lifeStyleActive from '@/assets/images/category/active/lifestyle_active.png'
+import stationeryActive from '@/assets/images/category/active/stationery_active.png'
+import fashionActive from '@/assets/images/category/active/fashion_active.png'
+import giftsActive from '@/assets/images/category/active/gifts_active.png'
+import homeDecorActive from '@/assets/images/category/active/home_decor_active.png'
+import healthActive from '@/assets/images/category/active/health_active.png'
+
 defineProps({
   icon: {
     type: String,
     default: '',
   },
+  active: {
+    type: String,
+    default: '',
+  },
 })
 </script>
 
 <template>
   <div class="">
-    <svgo-trend v-if="icon === '0'" class="!w-20px !h-20px" />
-    <svgo-tech v-if="icon === '1'" class="!w-20px !h-20px" />
-    <svgo-lifeStyle v-if="icon === '2'" class="!w-20px !h-20px" />
-    <svgo-stationery v-if="icon === '3'" class="!w-20px !h-20px" />
-    <svgo-fashion v-if="icon === '4'" class="!w-20px !h-20px" />
-    <svgo-gifts v-if="icon === '5'" class="!w-20px !h-20px" />
-    <svgo-creative v-if="icon === '6'" class="!w-20px !h-20px" />
-    <svgo-beauty v-if="icon === '7'" class="!w-20px !h-20px" />
+    <img v-if="icon === '0'" :src="active === 'trend' ? trendActive : trend" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === '1'" :src="active === 'tech' ? techActive : tech" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === '2'" :src="active === 'lifestyle' ? lifeStyleActive : lifeStyle" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === '3'" :src="active === 'stationery' ? stationeryActive : stationery" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === '4'" :src="active === 'fashion' ? fashionActive : fashion" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === '5'" :src="active === 'gifts' ? giftsActive : gifts" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === '6'" :src="active === 'home_decor' ? homeDecorActive : homeDecor" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === '7'" :src="active === 'health' ? healthActive : health" alt="" class="!w-20px !h-20px">
   </div>
 </template>
 

+ 4 - 3
components/common/navigation/index.vue

@@ -8,7 +8,7 @@ import { Api } from '@/api/model/url'
 
 const config = useRuntimeConfig()
 const baseURL = config.public.apiBaseSiteUrl
-
+const activeItem = ref<string>('')
 const router = useRouter()
 const commonStore = useCommonStore()
 const { navigateTextColor, navigateBgColor } = storeToRefs(commonStore)
@@ -16,6 +16,7 @@ const { navigateTextColor, navigateBgColor } = storeToRefs(commonStore)
 const catalogsVisible = ref<boolean>(false)
 const resourceVisible = ref<boolean>(false)
 const aboutVisible = ref<boolean>(false)
+
 const list = ref<any>([])
 const TrendList = ref<any>([])
 
@@ -79,8 +80,8 @@ function toCategories() {
               <svgo-arrowR class="w-14px h-14px ml-4px" />
             </div>
             <div class="grid grid-cols-2 grid-gap-x-15px grid-gap-y-10px">
-              <div v-for="(item, index) in list" :key="item.id" class="a-link-out hover:text-#9B6CFF hover:bg-#F3F4FB py-8px pl-10px b-rd-6px flex items-center cursor-pointer text-#999">
-                <IconGroup :icon="`${index}`" />
+              <div v-for="(item, index) in list" :key="item.id" class="a-link-out hover:text-#9B6CFF hover:bg-#F3F4FB py-8px pl-10px b-rd-6px flex items-center cursor-pointer" @mouseover="activeItem = item.slug">
+                <!-- <IconGroup :icon="`${index}` + ''" :active="activeItem" /> -->
                 <NuxtLink
                   :to="`/categories/${item.slug}`"
                   class="text-#333 ml-10px text-14px"

+ 14 - 11
utils/common/download.ts

@@ -2,17 +2,20 @@
  * 使用a链接下载文件,使用promise封装
  */
 export function downloadFileByA(url: string, name: string) {
-  try {
-    const link = document.createElement('a')
-    link.href = url
-    link.download = name
-    document.body.appendChild(link)
-    link.click()
-    document.body.removeChild(link)
-  }
-  catch (error) {
-    console.log(error)
-  }
+  return new Promise((resolve, reject) => {
+    try {
+      const link = document.createElement('a')
+      link.href = url
+      link.download = name
+      document.body.appendChild(link)
+      link.click()
+      document.body.removeChild(link)
+      resolve(true)
+    }
+    catch (error) {
+      reject(error)
+    }
+  })
 }
 /**
  * 下载文件