Commit bea0a5fe3627a966b5fda459f1a09373693226fc
1 parent
ef75f0bb
fix: prod2.sh-26-27
Showing
3 changed files
with
8 additions
and
6 deletions
components/MobileProductDetail.vue
... | ... | @@ -312,7 +312,9 @@ const href2 = ref("/products"); |
312 | 312 | const routeQuery = useRouteQuery(); |
313 | 313 | const productStore = useProductListStore(); |
314 | 314 | const currentUrl = ref(); |
315 | - | |
315 | +onMounted(() => { | |
316 | + currentUrl.value = window.location.href; | |
317 | +}); | |
316 | 318 | // const ticketDiv = ref<HTMLDivElement | null>(null); // 引用 ticketDiv |
317 | 319 | // const bottomButton = ref<HTMLDivElement | null>(null); // 引用按钮元素 |
318 | 320 | // let isMonitoring = false; // 是否正在监控 ticketDiv |
... | ... | @@ -424,7 +426,6 @@ const items = ref<BreadcrumbItem[]>([ |
424 | 426 | }, |
425 | 427 | ]); |
426 | 428 | watchEffect(() => { |
427 | - currentUrl.value = window.location.href; | |
428 | 429 | if (info?.productCrumbsVO?.category1 && productStore.keyword) { |
429 | 430 | items.value[1].title = info.productCrumbsVO.category1; |
430 | 431 | items.value[1].href = | ... | ... |
components/ProductDetail.vue
... | ... | @@ -429,7 +429,9 @@ interface BreadcrumbItem { |
429 | 429 | disabled: boolean; // 是否禁用 |
430 | 430 | href: string; // 链接地址 |
431 | 431 | } |
432 | - | |
432 | +onMounted(() => { | |
433 | + currentUrl.value = window.location.href; | |
434 | +}); | |
433 | 435 | // 示例数据 |
434 | 436 | const items = ref<BreadcrumbItem[]>([ |
435 | 437 | { |
... | ... | @@ -474,7 +476,6 @@ let { data: resData } = await useAsyncData( |
474 | 476 | } |
475 | 477 | ); |
476 | 478 | watchEffect(() => { |
477 | - currentUrl.value = window.location.href; | |
478 | 479 | if (info?.productCrumbsVO?.category1 && productStore.keyword) { |
479 | 480 | items.value[1].title = info.productCrumbsVO.category1; |
480 | 481 | items.value[1].href = | ... | ... |
deploy/prod2.sh