Ver Fonte

fix: bug修复阶段v1.3

chenpeng há 8 horas atrás
pai
commit
b1426cc3a2

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

@@ -1,4 +1,6 @@
 <script lang='ts' setup>
+import { Condition } from '@/enums/const-enums'
+
 defineProps({
   item: Object as any,
 })
@@ -19,7 +21,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)">
-          {{ item.downloadCondition === '2' ? 'Request' : 'Download' }}
+          {{ item.downloadCondition === Condition.REQUEST ? 'Request' : 'Download' }}
           <svgo-arrow-line-r class="w-16px h-16px ml-10px !text-#fff" />
         </el-button>
       </div>

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

@@ -1,5 +1,6 @@
 <script lang='ts' setup>
 import { useCommonStore } from '@/stores/modules/common'
+import { Condition } from '@/enums/const-enums'
 
 defineProps({
   item: Object as any,
@@ -43,7 +44,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)">
-            {{ item.downloadCondition === '2' ? 'Request' : 'Download' }} Catalog
+            {{ item.downloadCondition === Condition.REQUEST ? 'Request' : 'Download' }} Catalog
           </el-button>
         </div>
       </div>

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

@@ -1,5 +1,6 @@
 <script lang='ts' setup>
 import { useCommonStore } from '@/stores/modules/common'
+import { Condition } from '@/enums/const-enums'
 
 defineProps({
   item: Object as any,
@@ -39,7 +40,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)">
-            {{ item.downloadCondition === '2' ? 'Request' : 'Download' }} Catalog
+            {{ item.downloadCondition === Condition.REQUEST ? 'Request' : 'Download' }} Catalog
           </el-button>
         </div>
       </div>

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

@@ -1,5 +1,6 @@
 <script lang='ts' setup>
 import { useCommonStore } from '@/stores/modules/common'
+import { Condition } from '@/enums/const-enums'
 
 defineProps({
   item: Object as any,
@@ -39,7 +40,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>{{ item.downloadCondition === '2' ? 'Request' : 'Download' }}</div>
+      <div>{{ item.downloadCondition === Condition.REQUEST ? 'Request' : 'Download' }}</div>
       <div class="p-5px b-rd-50% bg-#fff ml-20px">
         <svgo-download class="w-14px h-14px text-#333333" />
       </div>

+ 2 - 1
pages/blog/[slug].vue

@@ -1,6 +1,7 @@
 <script lang='ts' setup>
 import { Api } from '@/api/model/url'
 import { useCommonStore } from '@/stores/modules/common'
+import { Condition } from '@/enums/const-enums'
 
 const config = useRuntimeConfig()
 const { apiBaseSiteUrl } = config.public
@@ -175,7 +176,7 @@ async function clickLoginAndDownload(item: any) {
             {{ detail?.relatedCatalogue?.subhead }}
           </div>
           <el-button class="!bg-#9B6CFF !text-#fff !b-#9B6CFF !b-rd-380px text-14px fw-bold !h-32px px-20px" @click="clickLoginAndDownload(detail?.relatedCatalogue)">
-            Download Catalog
+            {{ 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">