Commit 1e2b5f3221be6315650055895f1f63cd87d99ac8
1 parent
bea0a5fe
fix: 修复分享链接bug,prod2.sh-27-28
Showing
3 changed files
with
6 additions
and
10 deletions
components/MobileProductDetail.vue
@@ -311,10 +311,7 @@ const href1 = ref("/products"); | @@ -311,10 +311,7 @@ const href1 = ref("/products"); | ||
311 | const href2 = ref("/products"); | 311 | const href2 = ref("/products"); |
312 | const routeQuery = useRouteQuery(); | 312 | const routeQuery = useRouteQuery(); |
313 | const productStore = useProductListStore(); | 313 | const productStore = useProductListStore(); |
314 | -const currentUrl = ref(); | ||
315 | -onMounted(() => { | ||
316 | - currentUrl.value = window.location.href; | ||
317 | -}); | 314 | +const currentUrl = ref("https://www.canrud.com/products"); |
318 | // const ticketDiv = ref<HTMLDivElement | null>(null); // 引用 ticketDiv | 315 | // const ticketDiv = ref<HTMLDivElement | null>(null); // 引用 ticketDiv |
319 | // const bottomButton = ref<HTMLDivElement | null>(null); // 引用按钮元素 | 316 | // const bottomButton = ref<HTMLDivElement | null>(null); // 引用按钮元素 |
320 | // let isMonitoring = false; // 是否正在监控 ticketDiv | 317 | // let isMonitoring = false; // 是否正在监控 ticketDiv |
@@ -426,6 +423,7 @@ const items = ref<BreadcrumbItem[]>([ | @@ -426,6 +423,7 @@ const items = ref<BreadcrumbItem[]>([ | ||
426 | }, | 423 | }, |
427 | ]); | 424 | ]); |
428 | watchEffect(() => { | 425 | watchEffect(() => { |
426 | + currentUrl.value = "https://www.canrud.com/products/detail/" + info.id; | ||
429 | if (info?.productCrumbsVO?.category1 && productStore.keyword) { | 427 | if (info?.productCrumbsVO?.category1 && productStore.keyword) { |
430 | items.value[1].title = info.productCrumbsVO.category1; | 428 | items.value[1].title = info.productCrumbsVO.category1; |
431 | items.value[1].href = | 429 | items.value[1].href = |
components/ProductDetail.vue
@@ -422,16 +422,13 @@ const href1 = ref("/products"); | @@ -422,16 +422,13 @@ const href1 = ref("/products"); | ||
422 | const href2 = ref("/products"); | 422 | const href2 = ref("/products"); |
423 | const idHref = ref("/products"); | 423 | const idHref = ref("/products"); |
424 | const productStore = useProductListStore(); | 424 | const productStore = useProductListStore(); |
425 | -const currentUrl = ref(); | 425 | +const currentUrl = ref("https://www.canrud.com/products"); |
426 | // 定义单个 item 的接口 | 426 | // 定义单个 item 的接口 |
427 | interface BreadcrumbItem { | 427 | interface BreadcrumbItem { |
428 | title: string; // 标题 | 428 | title: string; // 标题 |
429 | disabled: boolean; // 是否禁用 | 429 | disabled: boolean; // 是否禁用 |
430 | href: string; // 链接地址 | 430 | href: string; // 链接地址 |
431 | } | 431 | } |
432 | -onMounted(() => { | ||
433 | - currentUrl.value = window.location.href; | ||
434 | -}); | ||
435 | // 示例数据 | 432 | // 示例数据 |
436 | const items = ref<BreadcrumbItem[]>([ | 433 | const items = ref<BreadcrumbItem[]>([ |
437 | { | 434 | { |
@@ -476,6 +473,7 @@ let { data: resData } = await useAsyncData( | @@ -476,6 +473,7 @@ let { data: resData } = await useAsyncData( | ||
476 | } | 473 | } |
477 | ); | 474 | ); |
478 | watchEffect(() => { | 475 | watchEffect(() => { |
476 | + currentUrl.value = "https://www.canrud.com/products/detail/" + info.id; | ||
479 | if (info?.productCrumbsVO?.category1 && productStore.keyword) { | 477 | if (info?.productCrumbsVO?.category1 && productStore.keyword) { |
480 | items.value[1].title = info.productCrumbsVO.category1; | 478 | items.value[1].title = info.productCrumbsVO.category1; |
481 | items.value[1].href = | 479 | items.value[1].href = |
deploy/prod2.sh
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # 变量定义 | 2 | # 变量定义 |
3 | -LAST_TAG="1.0.26" | ||
4 | -TAG="1.0.27" | 3 | +LAST_TAG="1.0.27" |
4 | +TAG="1.0.28" | ||
5 | TARGET_PATH="/root/web/canrud-outside-nuxt-front" | 5 | TARGET_PATH="/root/web/canrud-outside-nuxt-front" |
6 | DOCKERFILE_PATH="/root/web/canrud-outside-nuxt-front/canrud-nuxt-front" | 6 | DOCKERFILE_PATH="/root/web/canrud-outside-nuxt-front/canrud-nuxt-front" |
7 | IMAGE_NAME="canrud-outside-front" | 7 | IMAGE_NAME="canrud-outside-front" |