Browse Source

fix: bug修复阶段v1.6

chenpeng 16 hours ago
parent
commit
62afe86f75

+ 9 - 0
api/model/user.ts

@@ -12,7 +12,16 @@ enum Api {
   SendEmailCode = '/client-s003/captcha/sms/send',
   SubmitInfo = '/client-s003/s003ProductCatalogue/download',
   UserInfo = '/client-s003/s003Customer/userinfo',
+  DownloadRecord = '/client-s003/s003ProductCatalogue/downloadRecord',
 }
+
+/**
+ * 下载记录
+ */
+export async function downloadRecordApi(params: any) {
+  return await useMyRequest().post(Api.DownloadRecord, params)
+}
+
 /**
  * 获取用户信息,获取更新后的用户信息
  */

BIN
assets/images/aboutUs/show_img01.png


BIN
assets/images/aboutUs/show_img02.png


BIN
assets/images/aboutUs/show_img03.png


+ 24 - 20
components/business/about/show.vue

@@ -8,20 +8,16 @@ import 'swiper/css/navigation'
 import 'swiper/css/autoplay'
 import 'swiper/css/pagination'
 import 'swiper/css/effect-cards'
+import aboutShow01 from '@/assets/images/aboutUs/show_img01.png'
+import aboutShow02 from '@/assets/images/aboutUs/show_img02.png'
+import aboutShow03 from '@/assets/images/aboutUs/show_img03.png'
+import { useUserStore } from '@/stores/modules/user'
 // import 'swiper/css/bundle'   // 全部css
 const modules = [Navigation, Pagination, EffectCards, Autoplay]
+
 const { openLoginModal } = useLoginModal()
-async function clickLogin() {
-  try {
-    const { status } = await openLoginModal()
-    console.log('Login status:', status)
-    // if (status)
-    // 登陆后的逻辑
-  }
-  catch (error) {
-    console.log(error)
-  }
-}
+const userStore = useUserStore()
+const { isLogin } = storeToRefs(userStore)
 
 const swiperVertical = ref<any>(null)
 const swiperHorizontal = ref<any>(null)
@@ -43,19 +39,22 @@ function onSlideChange2(swiper: any) {
 }
 const list = ref([
   {
-    title: 'Insight-Driven Creativity111',
+    img: aboutShow01,
+    title: 'Insight-Driven Creativity',
     description:
-      'We believe creativity should be rooted in real consumer insights. Every idea starts with what the new generation truly wants — we turn those insights into inspiring products.',
+      'We believe creativity should be rooted in real consumer insights. Every idea starts with what the new generation truly wants — we turn those insights into inspiring products.Aesthetics Design',
   },
   {
-    title: 'Insight-Driven Creativity22',
+    img: aboutShow02,
+    title: 'Aesthetics Design',
     description:
-      'We believe creativity should be rooted in real consumer insights. Every idea starts with what the new generation truly wants — we turn those insights into inspiring products.',
+      'Good design isn’t just about aesthetics — it’s about function, emotion, and experience. Our design approach balances visual appeal with usability to make every product speak for itself.Trend-Driven Picks',
   },
   {
-    title: 'Insight-Driven Creativity333',
+    img: aboutShow03,
+    title: 'Trend-Driven Picks',
     description:
-      'We believe creativity should be rooted in real consumer insights. Every idea starts with what the new generation truly wants — we turn those insights into inspiring products.',
+      'We stay ahead of the curve. From fashion to tech, we follow what’s trending globally and transform it into commercial-ready solutions that speak to Gen Z and beyond.',
   },
 ])
 onUnmounted(() => {
@@ -90,7 +89,7 @@ onUnmounted(() => {
             @swiper="onVerticalSwiper"
           >
             <SwiperSlide v-for="(item, index) in list" :key="index">
-              Slide {{ index }}
+              <img :src="item.img" class="w-480px h-480px object-cover" alt="">
             </SwiperSlide>
           </Swiper>
         </div>
@@ -113,8 +112,13 @@ onUnmounted(() => {
                 <div class="text-#999 mt-20px lh-24px">
                   {{ item.description }}
                 </div>
-                <el-button class="!bg-#9B6CFF mt-40px !text-#fff !b-#9B6CFF w-160px !b-rd-380px text-16px fw-bold !h-40px px-20px" @click="clickLogin">
-                  get started
+                <el-button class="!bg-#9B6CFF mt-40px !text-#fff !b-#9B6CFF w-160px !b-rd-380px text-16px fw-bold !h-40px px-20px">
+                  <span v-if="!isLogin" @click="openLoginModal">
+                    get started
+                  </span>
+                  <nuxt-link v-else to="/categories">
+                    view catalogs
+                  </nuxt-link>
                 </el-button>
               </div>
             </SwiperSlide>

+ 10 - 15
components/business/contact/more.vue

@@ -1,16 +1,9 @@
 <script lang="ts" setup>
+import { useUserStore } from '@/stores/modules/user'
+
 const { openLoginModal } = useLoginModal()
-async function clickLogin() {
-  try {
-    const { status } = await openLoginModal()
-    console.log('Login status:', status)
-    // if (status)
-    // 登陆后的逻辑
-  }
-  catch (error) {
-    console.log(error)
-  }
-}
+const userStore = useUserStore()
+const { isLogin } = storeToRefs(userStore)
 </script>
 
 <template>
@@ -22,11 +15,13 @@ async function clickLogin() {
         </h2>
         <div
           class="h-40px lh-40px !mt-20px text-14px w-128px text-center text-#fff b-rd-200px bg-#0F0820 hover:bg-#9B6CFF hover:text-#fff cursor-pointer"
-          @click="clickLogin"
         >
-          <!-- <nuxt-link to="/faq"> -->
-          Get started
-          <!-- </nuxt-link> -->
+          <span v-if="!isLogin" @click="openLoginModal">
+            Get started
+          </span>
+          <nuxt-link v-else to="/categories">
+            view catalogs
+          </nuxt-link>
         </div>
       </div>
 

+ 11 - 2
components/business/solutions/block_solve.vue

@@ -15,6 +15,12 @@ import solutionRetailers02 from '~/assets/images/solutions_retailers02.png'
 import solutionRetailers03 from '~/assets/images/solutions_retailers03.png'
 import solutionRetailers04 from '~/assets/images/solutions_retailers04.png'
 
+import { useUserStore } from '@/stores/modules/user'
+
+const { openLoginModal } = useLoginModal()
+const userStore = useUserStore()
+const { isLogin } = storeToRefs(userStore)
+
 const list = ref([
   {
     key: 'ecommerce',
@@ -158,9 +164,12 @@ const solutionList = computed(() => {
           <div
             class="w-154px h-40px lh-40px text-center ml-60px mt-60px b-rd-6px text-14px text-#9B6CFF fw-bold b-solid b-1px b-#9B6CFF cursor-pointer hover:bg-#9B6CFF hover:text-#fff"
           >
-            <NuxtLink to="/contact">
+            <span v-if="!isLogin" @click="openLoginModal">
               Sign In
-            </NuxtLink>
+            </span>
+            <nuxt-link v-else to="/categories">
+              view catalogs
+            </nuxt-link>
           </div>
         </div>
       </div>

+ 12 - 17
components/common/footer/guide.vue

@@ -1,18 +1,11 @@
 <!-- @format -->
 
 <script lang="ts" setup>
+import { useUserStore } from '@/stores/modules/user'
+
 const { openLoginModal } = useLoginModal()
-async function clickLogin() {
-  try {
-    const { status } = await openLoginModal()
-    console.log('Login status:', status)
-    // if (status)
-    // 登陆后的逻辑
-  }
-  catch (error) {
-    console.log(error)
-  }
-}
+const userStore = useUserStore()
+const { isLogin } = storeToRefs(userStore)
 </script>
 
 <template>
@@ -28,13 +21,15 @@ async function clickLogin() {
             Sign in to download exclusive catalogs!
           </div>
           <div
-            class="py-8px mt-30px text-14px fw-500 flex justify-center items-center w-128px text-center text-#fff b-rd-200px  bg-#0F0820 hover:bg-#9B6CFF hover:text-#fff cursor-pointer"
-            @click="clickLogin"
+            class="py-8px mt-30px text-14px fw-500 flex justify-center items-center w-150px text-center text-#fff b-rd-200px  bg-#0F0820 hover:bg-#9B6CFF hover:text-#fff cursor-pointer"
           >
-            <!-- <nuxt-link to="/contact" class="flex justify-center items-center"> -->
-            Sign In
-            <img src="@/assets/images/footer_contact_icon02.png" class="w-24px h-24px ml-14px" alt="">
-            <!-- </nuxt-link> -->
+            <span v-if="!isLogin" @click="openLoginModal">
+              Sign In
+            </span>
+            <nuxt-link v-else to="/categories">
+              view catalogs
+            </nuxt-link>
+            <img src="@/assets/images/footer_contact_icon02.png" class="w-24px h-24px ml-10px" alt="">
           </div>
         </div>
         <img src="@/assets/images/footer_contact_bg.png" class="w-500px object-cover h-360px pos-absolute bottom--0 right-20px" alt="">

+ 5 - 4
components/common/loginAndDownload/comp/info/finish.vue

@@ -1,15 +1,20 @@
 <script lang='ts' setup>
 import { useCommonStore } from '@/stores/modules/common'
 import { downloadFileByA } from '@/utils/common/download'
+import { useUserStore } from '@/stores/modules/user'
+import { downloadRecordApi } from '@/api/model/user'
 
 const commonStore = useCommonStore()
 const { downloadCatalog } = storeToRefs(commonStore)
+const userStore = useUserStore()
+const { isLogin, isCompletedInfo } = storeToRefs(userStore)
 const isDownloading = ref(false)
 
 async function startDownload() {
   if (downloadCatalog.value) {
     isDownloading.value = true
     await downloadFileByA(downloadCatalog.value.pdf, `${downloadCatalog.value.title || ''}.pdf`)
+    isCompletedInfo.value && await downloadRecordApi({ catalogueId: downloadCatalog.value.id })
     const timer = setTimeout(() => {
       isDownloading.value = false
       clearTimeout(timer)
@@ -17,10 +22,6 @@ async function startDownload() {
   }
   else { console.error('No download catalog available') }
 }
-// 通知后台服务已经下载完成
-function downloadFinish() {
-  console.log('downloadFinish')
-}
 startDownload()
 </script>
 

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

@@ -31,14 +31,14 @@ defineProps({
 
 <template>
   <div class="">
-    <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">
+    <img v-if="icon === 'trend-toys-collectibles'" :src="active === 'trend-toys-collectibles' ? trendActive : trend" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === 'tech-gadgets-accessories'" :src="active === 'tech-gadgets-accessories' ? techActive : tech" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === 'lifestyle-wellness'" :src="active === 'lifestyle-wellness' ? lifeStyleActive : lifeStyle" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === 'stationary-office-supplies'" :src="active === 'stationary-office-supplies' ? stationeryActive : stationery" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === 'fashion-accessories'" :src="active === 'fashion-accessories' ? fashionActive : fashion" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === 'gifts-seasonal-items'" :src="active === 'gifts-seasonal-items' ? giftsActive : gifts" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === 'creative-home-products'" :src="active === 'creative-home-products' ? homeDecorActive : homeDecor" alt="" class="!w-20px !h-20px">
+    <img v-if="icon === 'beauty-personal-care'" :src="active === 'beauty-personal-care' ? healthActive : health" alt="" class="!w-20px !h-20px">
   </div>
 </template>
 

+ 2 - 2
components/common/navigation/index.vue

@@ -81,12 +81,12 @@ function toCategories() {
             </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 pr-5px b-rd-6px flex items-center cursor-pointer" @mouseover="activeItem = item.slug">
-                <!-- <IconGroup :icon="`${index}` + ''" :active="activeItem" /> -->
+                <IconGroup :icon="`${item.slug}`" :active="activeItem" />
                 <NuxtLink
                   :to="`/categories/${item.slug}`"
                   class="text-#333 ml-10px text-14px"
                 >
-                  {{ item.title }}
+                  {{ item.contentTitle }}
                 </NuxtLink>
               </div>
             </div>

+ 9 - 2
pages/about-us.vue

@@ -1,5 +1,9 @@
 <script lang='ts' setup>
+import { useUserStore } from '@/stores/modules/user'
 
+const { openLoginModal } = useLoginModal()
+const userStore = useUserStore()
+const { isLogin } = storeToRefs(userStore)
 </script>
 
 <template>
@@ -12,8 +16,11 @@
             EJET Spark <span class="custom-title-bg02 !pb-0px title-h1">Team</span>
           </h1>
           <el-button class="my-60px !text-#fff !bg-#878490 !w-160px !h-40px !b-#fff !b-rd-400px" round>
-            <nuxt-link :to="{ name: 'contact' }">
-              Contact Us
+            <span v-if="!isLogin" @click="openLoginModal">
+              Sign In
+            </span>
+            <nuxt-link v-else to="/categories">
+              view catalogs
             </nuxt-link>
           </el-button>
         </div>

+ 9 - 3
pages/blog/[slug].vue

@@ -3,6 +3,12 @@ import { Api } from '@/api/model/url'
 import { useCommonStore } from '@/stores/modules/common'
 import { Condition } from '@/enums/const-enums'
 
+import { useUserStore } from '@/stores/modules/user'
+
+const { openLoginModal } = useLoginModal()
+const userStore = useUserStore()
+const { isLogin } = storeToRefs(userStore)
+
 const config = useRuntimeConfig()
 const { apiBaseSiteUrl } = config.public
 
@@ -179,14 +185,14 @@ async function clickLoginAndDownload(item: any) {
             {{ detail?.relatedCatalogue?.downloadCondition === Condition.REQUEST ? 'Request' : 'Download' }} Catalog
           </el-button>
         </div>
-        <div class="px-40px pt-34px bg-#E7EAFF b-rd-10px text-center custom-main">
+        <div v-if="!isLogin" class="px-40px pt-34px bg-#E7EAFF b-rd-10px text-center custom-main">
           <div class="text-#333 fw-500">
             Sign in for exclusive trending product catalogs!
           </div>
           <el-button class="mt-20px !bg-#fff !text-#9B6CFF !w-160px !h-40px !b-0px !b-rd-200px" round>
-            <nuxt-link :to="{ name: 'contact' }">
+            <span @click="openLoginModal">
               Sign In
-            </nuxt-link>
+            </span>
           </el-button>
         </div>
       </div>

+ 8 - 1
pages/solutions.vue

@@ -1,5 +1,9 @@
 <script lang='ts' setup>
+import { useUserStore } from '@/stores/modules/user'
 
+const { openLoginModal } = useLoginModal()
+const userStore = useUserStore()
+const { isLogin } = storeToRefs(userStore)
 </script>
 
 <template>
@@ -14,8 +18,11 @@
             One-Stop Supply
           </h1>
           <el-button class="my-60px !text-#fff !bg-#878490 !w-160px !h-40px !b-#fff !b-rd-400px" round>
-            <nuxt-link :to="{ name: 'contact' }">
+            <span v-if="!isLogin" @click="openLoginModal">
               Sign In
+            </span>
+            <nuxt-link v-else to="/categories">
+              view catalogs
             </nuxt-link>
           </el-button>
         </div>

+ 10 - 2
pages/trends.vue

@@ -1,4 +1,9 @@
 <script lang='ts' setup>
+import { useUserStore } from '@/stores/modules/user'
+
+const { openLoginModal } = useLoginModal()
+const userStore = useUserStore()
+const { isLogin } = storeToRefs(userStore)
 </script>
 
 <template>
@@ -12,8 +17,11 @@
           </h1>
 
           <el-button class="mt-65px !bg-#878490 !text-#fff !bg-#878490 !w-160px !h-40px !b-#fff !b-rd-200px" round>
-            <nuxt-link to="/contact">
-              Contact Us
+            <span v-if="!isLogin" @click="openLoginModal">
+              Sign In
+            </span>
+            <nuxt-link v-else to="/categories">
+              view catalogs
             </nuxt-link>
           </el-button>
           <div