فهرست منبع

fix: bug修复阶段v1.2

chenpeng 2 هفته پیش
والد
کامیت
cb51b3bd8f

+ 5 - 0
components/business/about/show.vue

@@ -10,6 +10,8 @@ import 'swiper/css/pagination'
 import 'swiper/css/effect-cards'
 // import 'swiper/css/bundle'   // 全部css
 const modules = [Navigation, Pagination, EffectCards, Autoplay]
+const { openLoginModal } = useLoginModal()
+
 const swiperVertical = ref<any>(null)
 const swiperHorizontal = ref<any>(null)
 function onVerticalSwiper(swiper: any) {
@@ -100,6 +102,9 @@ 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="openLoginModal">
+                  get started
+                </el-button>
               </div>
             </SwiperSlide>
           </Swiper>

+ 1 - 1
components/business/categories/comp/item.vue

@@ -19,7 +19,7 @@ const emit = defineEmits(['select'])
           {{ item.subhead }}
         </div>
         <el-button class="!bg-#9B6CFF !text-#fff !b-#9B6CFF !h-40px px-24px" @click="$emit('select', item)">
-          Download
+          {{ item.downloadCondition === '2' ? 'Request' : 'Download' }}
           <svgo-arrow-line-r class="w-16px h-16px ml-10px !text-#fff" />
         </el-button>
       </div>

+ 39 - 2
components/business/contact/form.vue

@@ -9,10 +9,12 @@ const formInfo = ref<any>({
   name: '',
   mail: '',
   subjects: '',
+  mobileAreaCode: '+86',
   mobile: '',
   message: '',
   country: undefined,
 })
+const mobileAreaCodeList = ref()
 const countryList = ref()
 const rules = ref<FormRules>({
   name: [
@@ -28,6 +30,10 @@ const rules = ref<FormRules>({
       message: 'email must be filled in',
       trigger: 'blur',
     },
+    {
+      pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/,
+      message: 'Please enter a valid email.',
+    },
   ],
   subjects: [
     {
@@ -72,10 +78,15 @@ async function submitInfo(formEl: FormInstance | undefined) {
     }
   })
 }
+async function getMobileAreaCodeList() {
+  const list = await getDictListApi('A064')
+  mobileAreaCodeList.value = list
+}
 async function getCountryList() {
   const list = await getDictListApi('A070')
   countryList.value = list
 }
+getMobileAreaCodeList()
 getCountryList()
 </script>
 
@@ -135,11 +146,33 @@ getCountryList()
             </el-select>
           </el-form-item>
           <el-form-item label="Phone number" prop="mobile">
-            <el-input
+            <!-- <el-input
               v-model="formInfo.mobile"
               placeholder="Please enter your Phone number"
               class="h-40px item-input !b-rd-10px"
-            />
+            /> -->
+            <el-input
+              v-model="formInfo.mobile"
+              class="h-40px item-input !b-rd-10px"
+              placeholder="Please enter your Phone number"
+            >
+              <template #prepend>
+                <el-select
+                  v-model="formInfo.mobileAreaCode"
+                  placeholder="Select"
+                  style="width: 120px"
+                >
+                  <el-option
+                    v-for="(item, index) in mobileAreaCodeList"
+                    :key="index"
+                    :value="item.value"
+                    :label="`${item.value} ${item.label}`"
+                  >
+                    {{ item.value }} {{ item.label }}
+                  </el-option>
+                </el-select>
+              </template>
+            </el-input>
           </el-form-item>
           <el-form-item label="Message" prop="message" class="!mb-60px">
             <el-input
@@ -192,6 +225,10 @@ getCountryList()
         }
       }
       .item-input {
+        .el-input-group__prepend{
+          box-shadow: none !important;
+          border-radius: 10px !important;
+        }
         .el-input__wrapper {
           box-shadow: none !important;
           border-radius: 10px !important;

+ 7 - 2
components/business/contact/method.vue

@@ -9,18 +9,21 @@ const list = [
     title: 'Email Us',
     intro: 'Available 24/7 for your inquiries',
     contact: 'contact@company.com',
+    link: 'mailto:contact@company.com',
   },
   {
     icon: WhatsApp,
     title: 'WhatsApp',
     intro: 'Chat with us on WhatsApp',
     contact: '+1 (234) 567-890',
+    link: 'https://wa.me/1234567890',
   },
   {
     icon: LiveChat,
     title: 'Live Chat',
     intro: 'Service hours 8:30AM-5:30PM',
     contact: 'Contact number 10001',
+    link: 'https://wa.me/1234567890',
   },
 ]
 </script>
@@ -42,8 +45,10 @@ const list = [
         <div class="my-12px text-#999">
           {{ item.intro }}
         </div>
-        <div class="text-#9B6CFF">
-          {{ item.contact }}
+        <div class="text-#9B6CFF cursor-pointer">
+          <a :href="item.link" target="_blank">
+            {{ item.contact }}
+          </a>
         </div>
       </div>
     </div>

+ 5 - 0
components/business/contact/more.vue

@@ -1,3 +1,7 @@
+<script lang="ts" setup>
+const { openLoginModal } = useLoginModal()
+</script>
+
 <template>
   <div class="bg-#F3F4FB py-120px data-section" data-section-color="#F3F4FB">
     <div class="w-1200-auto flex justify-between">
@@ -7,6 +11,7 @@
         </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="openLoginModal"
         >
           <!-- <nuxt-link to="/faq"> -->
           Get started

+ 1 - 1
components/business/trends/comp/item.vue

@@ -43,7 +43,7 @@ async function clickLoginAndDownload(item: any) {
             </NuxtLink>
           </el-button>
           <el-button class="!bg-#fff w-150px text-14px !text-#9B6CFF !b-#9B6CFF !h-48px px-24px" @click="clickLoginAndDownload(item)">
-            Download Catalog
+            {{ item.downloadCondition === '2' ? 'Request' : 'Download' }} Catalog
           </el-button>
         </div>
       </div>

+ 1 - 1
components/business/trends/comp/item2.vue

@@ -39,7 +39,7 @@ async function clickLoginAndDownload(item: any) {
             </NuxtLink>
           </el-button>
           <el-button class="!bg-#fff w-150px text-14px !text-#9B6CFF !b-#9B6CFF !h-48px px-24px" @click="clickLoginAndDownload(item)">
-            Download Catalog
+            {{ item.downloadCondition === '2' ? 'Request' : 'Download' }} Catalog
           </el-button>
         </div>
       </div>

+ 1 - 1
components/common/block/blog.vue

@@ -8,7 +8,7 @@ const list = ref<any>([])
 const requestUrl = `${apiBaseSiteUrl}${Api.BlogsList}`
 const params = { pageNo: 1, pageSize: 3, orderBy: 'createTime', orderType: 'desc' }
 const { data, pending, error, refresh } = await useAsyncData(
-  'blog-list',
+  'blog-list-block',
   () => $fetch(requestUrl, { params }),
 )
 list.value = data.value?.result?.records || []

+ 1 - 1
components/common/catalogs/item.vue

@@ -39,7 +39,7 @@ async function clickLoginAndDownload(item: any) {
       class="w-100% b-rd-tl-10px  b-rd-tr-10px object-cover"
     >
     <div class="pos-absolute bottom-20px left-20px cursor-pointer text-#fff bg-#fff/50 b-1px  b-transparent b-solid h-40px pr-8px pl-30px hover:b-1px hover:b-#fff hover:b-solid backdrop-blur-20px text-14px fw-bold  b-rd-400px flex items-center justify-center" @click="clickLoginAndDownload(item)">
-      <div>Download</div>
+      <div>{{ item.downloadCondition === '2' ? 'Request' : 'Download' }}</div>
       <div class="p-5px b-rd-50% bg-#fff ml-20px">
         <svgo-download class="w-14px h-14px text-#333333" />
       </div>

+ 48 - 40
components/common/footer/guide.vue

@@ -42,12 +42,12 @@ const { openLoginModal } = useLoginModal()
               </NuxtLink>
             </div>
             <div class="mb-30px">
-              <NuxtLink to="/" class="hover:text-#9B6CFF">
+              <NuxtLink to="https://www.ejetselection.com/" target="_blank" class="hover:text-#9B6CFF">
                 EJET Selection
               </NuxtLink>
             </div>
             <div class="mb-30px">
-              <NuxtLink to="/" class="hover:text-#9B6CFF">
+              <NuxtLink to="https://www.ejetprocurement.com/" class="hover:text-#9B6CFF">
                 EJET Procurement
               </NuxtLink>
             </div>
@@ -56,14 +56,14 @@ const { openLoginModal } = useLoginModal()
                 Contact Us
               </NuxtLink>
             </div>
-            <div>
+            <!-- <div>
               <NuxtLink
                 to="/"
                 class="hover:text-#9B6CFF"
               >
                 Become a Partner
               </NuxtLink>
-            </div>
+            </div> -->
           </div>
           <div class="w-25% text-#fff text-16px">
             <h4 class="!mb-30px fw-500 text-24px custom-title-font">
@@ -75,12 +75,12 @@ const { openLoginModal } = useLoginModal()
               </NuxtLink>
             </div>
             <div class="mb-30px">
-              <NuxtLink to="/" class="hover:text-#9B6CFF">
+              <NuxtLink to="/categories" class="hover:text-#9B6CFF">
                 Catalogs by Category
               </NuxtLink>
             </div>
             <div class="mb-30px">
-              <NuxtLink to="/" class="hover:text-#9B6CFF">
+              <NuxtLink to="/trends" class="hover:text-#9B6CFF">
                 Catalogs by Trend
               </NuxtLink>
             </div>
@@ -95,9 +95,9 @@ const { openLoginModal } = useLoginModal()
               </NuxtLink>
             </div>
             <div class="mb-30px">
-              <NuxtLink to="/" class="hover:text-#9B6CFF">
+              <!-- <NuxtLink to="/" class="hover:text-#9B6CFF">
                 EJET Selection
-              </NuxtLink>
+              </NuxtLink> -->
             </div>
             <div class="mb-30px">
               <NuxtLink to="/faq" class="hover:text-#9B6CFF">
@@ -105,9 +105,9 @@ const { openLoginModal } = useLoginModal()
               </NuxtLink>
             </div>
             <div class="mb-30px">
-              <NuxtLink to="/contact" class="hover:text-#9B6CFF">
+              <!-- <NuxtLink to="/contact" class="hover:text-#9B6CFF">
                 2025 Trend Forcast
-              </NuxtLink>
+              </NuxtLink> -->
             </div>
           </div>
           <div class="w-25% text-right flex justify-end">
@@ -125,34 +125,38 @@ const { openLoginModal } = useLoginModal()
               class="!w-132px !h-32px text-#fff"
             />
             <div class="flex gap-20px justify-start ml-40px">
-              <a href="https://www.facebook.com/profile.php?id=61573209305275" target="_blank">
-                <img
-                  src="~/assets/images/footer_guide_facebook.png"
-                  alt=""
-                  class="w-24px h-24px"
-                  srcset=""
-                ></a>
-              <a href="https://www.instagram.com/ejetselection.official/" target="_blank">
-                <img
-                  src="~/assets/images/footer_guide_ins.png"
-                  alt=""
-                  class="w-24px h-24px"
-                  srcset=""
-                ></a>
-              <a href="https://www.youtube.com/@EJETSelection" target="_blank">
-                <img
-                  src="~/assets/images/footer_guide_youtube.png"
-                  alt=""
-                  class="w-24px h-24px"
-                  srcset=""
-                ></a>
-              <a href="https://www.linkedin.com/company/ejet-selection" target="_blank">
-                <img
-                  src="~/assets/images/footer_guide_linkedin.png"
-                  alt=""
-                  class="w-24px h-24px"
-                  srcset=""
-                ></a>
+              <!-- <a href="https://www.facebook.com/profile.php?id=61573209305275" target="_blank"> -->
+              <img
+                src="~/assets/images/footer_guide_facebook.png"
+                alt=""
+                class="w-24px h-24px"
+                srcset=""
+              >
+              <!-- </a> -->
+              <!-- <a href="https://www.instagram.com/ejetselection.official/" target="_blank"> -->
+              <img
+                src="~/assets/images/footer_guide_ins.png"
+                alt=""
+                class="w-24px h-24px"
+                srcset=""
+              >
+              <!-- </a> -->
+              <!-- <a href="https://www.youtube.com/@EJETSelection" target="_blank"> -->
+              <img
+                src="~/assets/images/footer_guide_youtube.png"
+                alt=""
+                class="w-24px h-24px"
+                srcset=""
+              >
+              <!-- </a> -->
+              <!-- <a href="https://www.linkedin.com/company/ejet-selection" target="_blank"> -->
+              <img
+                src="~/assets/images/footer_guide_linkedin.png"
+                alt=""
+                class="w-24px h-24px"
+                srcset=""
+              >
+              <!-- </a> -->
             </div>
           </div>
           <div class="flex text-#fff">
@@ -166,11 +170,15 @@ const { openLoginModal } = useLoginModal()
                 ICP备案:浙ICP备2021012316号-3
               </a> -->
             </div>
-            <a href="/service" class="hover:underline ml-10px"><div>Terms of Service</div></a>
+            <nuxt-link to="/terms-of-service" class="hover:underline ml-10px">
+              Terms of Service
+            </nuxt-link>
             <div class="mx-10px">
               |
             </div>
-            <a href="/policy" class="hover:underline"><div>Privacy Policy</div></a>
+            <nuxt-link to="/privacy-policy" class="hover:underline">
+              Privacy Policy
+            </nuxt-link>
           </div>
         </div>
       </div>

+ 2 - 2
components/common/login/comp/email/code.vue

@@ -7,7 +7,7 @@ const ruleFormRef = ref<FormInstance>()
 
 const rules = ref<FormRules>({
   captcha: [
-    { required: true, message: 'Please enter a valid email.', trigger: 'blur' },
+    { required: true, message: 'Please enter a valid code.', trigger: 'blur' },
   ],
 })
 </script>
@@ -27,7 +27,7 @@ const rules = ref<FormRules>({
     </div>
     <el-form ref="ruleFormRef" :rules="rules" :model="loginForm" @submit.prevent>
       <el-form-item label="" prop="captcha" class="!mb-24px">
-        <el-input v-model.trim="loginForm.captcha" type="number" :maxlength="6" :class="!!errorCodeTxt && 'error-txt'" class="!h-46px login-input !text-14px" placeholder="Enter email" />
+        <el-input v-model.trim="loginForm.captcha" type="number" :maxlength="6" :class="!!errorCodeTxt && 'error-txt'" class="!h-46px login-input !text-14px" placeholder="Enter code" />
         <div v-if="errorCodeTxt" class="text-red mt-10px">
           {{ errorCodeTxt }}
         </div>

+ 3 - 3
components/common/login/useLogin.ts

@@ -88,9 +88,9 @@ export default function useRegister() {
         try {
           // 先验证邮箱是否有效
           const result: any = await validateEmailIsWorkApi({ email: loginForm.value.email })
-          if (result === '2') {
-            // 触发form的错误提示
-            errorTxt.value = 'The email is invalid.'
+          if (result === '0') {
+            // 邮箱已经被停用
+            errorTxt.value = 'The email is disabled.'
             formEl.validateField('email')
             return
           }

+ 2 - 2
components/common/loginAndDownload/comp/email/code.vue

@@ -7,7 +7,7 @@ const ruleFormRef = ref<FormInstance>()
 
 const rules = ref<FormRules>({
   captcha: [
-    { required: true, message: 'Please enter a valid email.', trigger: 'blur' },
+    { required: true, message: 'Please enter a valid code.', trigger: 'blur' },
   ],
 })
 </script>
@@ -27,7 +27,7 @@ const rules = ref<FormRules>({
     </div>
     <el-form ref="ruleFormRef" :rules="rules" :model="loginForm" @submit.prevent>
       <el-form-item label="" prop="captcha" class="!mb-24px">
-        <el-input v-model.trim="loginForm.captcha" :class="!!errorCodeTxt && 'error-txt'" class="!h-46px login-input !text-14px" placeholder="Enter email" />
+        <el-input v-model.trim="loginForm.captcha" :class="!!errorCodeTxt && 'error-txt'" class="!h-46px login-input !text-14px" placeholder="Enter code" />
         <div v-if="errorCodeTxt" class="text-red mt-10px">
           {{ errorCodeTxt }}
         </div>

+ 5 - 3
components/common/loginAndDownload/index.vue

@@ -31,11 +31,12 @@ watch(() => loginedAccountList.value, (newVal: any) => {
 
 watchEffect(() => {
   if (isLogin.value) {
+    console.log('isCompletedInfo.value', isCompletedInfo.value)
     if (isCompletedInfo.value) {
       if (downloadCatalog.value.downloadCondition === Condition.DOWNLOAD)
         setEmailStep(4)
-      else
-        setEmailStep(3)
+
+      else setEmailStep(3)
     }
 
     else { setEmailStep(3) }
@@ -136,7 +137,8 @@ onUnmounted(() => {
     left: 0;
     width: 100%;
     height: 100%;
-    backdrop-filter: blur(4px);
+    backdrop-filter: blur(1px);
+    background-color: rgba(0, 0, 0, 0.5);
   }
 }
 </style>

+ 2 - 2
components/common/loginAndDownload/useLoginAndDownload.ts

@@ -112,8 +112,8 @@ export default function useRegister() {
         try {
           // 先验证邮箱是否有效
           const result: any = await validateEmailIsWorkApi({ email: loginForm.value.email })
-          if (result === '2') {
-            errorTxt.value = 'The email is invalid.'
+          if (result === '0') {
+            errorTxt.value = 'The email is disabled.'
             formEl.validateField('email')
             return
           }

+ 2 - 1
components/common/user-avatar/index.vue

@@ -8,7 +8,8 @@ const { isLogin, userInfo } = storeToRefs(userStore)
 
 const { openLoginModal } = useLoginModal()
 const userName = computed(() => {
-  return (userInfo.value?.FirstName || userInfo.value?.LastName) ? `${userInfo.value?.FirstName} ${userInfo.value?.LastName}` : 'EJET Spark'
+  console.log('userInfo.value', userInfo.value)
+  return (userInfo.value?.firstName || userInfo.value?.lastName) ? `${userInfo.value?.firstName} ${userInfo.value?.lastName}` : 'EJET Spark'
 })
 async function clickLogin() {
   try {

+ 2 - 2
enums/const-enums.ts

@@ -4,6 +4,6 @@ export enum ConstKeys {
 }
 
 export enum Condition {
-  DOWNLOAD = 1,
-  REQUEST = 2,
+  DOWNLOAD = '1',
+  REQUEST = '2',
 }

+ 4 - 2
pages/blog/index.vue

@@ -24,10 +24,12 @@ const form = ref<any>({
 const params = ref({
   pageNo: currentPage.value,
   pageSize: page_size.value,
+  orderBy: 'createTime',
+  orderType: 'desc',
   categoryId: '',
 })
 const { data: res } = await useAsyncData(
-  'blog-category-list',
+  'blog-category-list-index',
   () => $fetch(`${apiBaseSiteUrl}${Api.BlogsCategoryList}`, { params: { all: true } }),
 )
 // Ensure we have a valid array before spreading
@@ -38,7 +40,7 @@ categories.value = [
 ]
 params.value.categoryId = categories.value[0].key
 const { data: res2, pending, error, refresh } = await useAsyncData(
-  'blog-list',
+  'blog-list-index',
   () => $fetch(`${apiBaseSiteUrl}${Api.BlogsList}`, { params: params.value }),
 )
 watch(() => res2.value, (newValue) => {

+ 1 - 1
pages/categories/[slug].vue

@@ -18,7 +18,7 @@ const seoData = res.value?.result
 const { data: res2 } = await useAsyncData(
   'category-catalogue-list',
   () =>
-    $fetch(`${apiBaseSiteUrl}${Api.CategoryCatalogueList}`, { params: { slug } }),
+    $fetch(`${apiBaseSiteUrl}${Api.CategoryCatalogueList}`, { params: { slug, pageNo: 1, pageSize: 4, state: 1, trend: '' } }),
 )
 list.value = res2.value?.result?.records || []
 

+ 3 - 1
pages/trends.vue

@@ -12,7 +12,9 @@
           </h1>
 
           <el-button class="mt-65px !bg-#878490 !text-#fff !bg-#878490 !w-160px !h-40px !b-#fff !b-rd-200px" round>
-            Contact US
+            <nuxt-link to="/contact">
+              Contact Us
+            </nuxt-link>
           </el-button>
           <div
             class="pos-absolute top--16px text-center right--60px w-150px py-8px bg-#FFFF66 b-rd-20px transform-rotate-16deg"

+ 2 - 1
stores/modules/user.ts

@@ -37,7 +37,7 @@ export const useUserStore = defineStore(
           plain: true,
         })
         const commonStore = useCommonStore()
-        commonStore.pushAccount({ email: userDataInfo.email, name: userDataInfo.annualPurchaseAmount, type: params.type })
+        commonStore.pushAccount({ email: userDataInfo.email, name: `${userDataInfo.firstName} ${userDataInfo.lastName}`, type: params.type })
       }
       catch (error) {
         return Promise.reject(error)
@@ -58,6 +58,7 @@ export const useUserStore = defineStore(
             type: 'success',
             plain: true,
           })
+          window.location.reload()
         }
       }
       finally {