Commit 27dbe587a9e8fb49427b0eb92fec0079fc428bbb

Authored by boyang
1 parent 9d346e3b

fix: 修改contact页面bug,prod2-67/68

components/Header.vue
@@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
80 </template> 80 </template>
81 81
82 <script setup lang="ts"> 82 <script setup lang="ts">
83 -import { ref, watchEffect } from "vue"; 83 +import { ref, watchEffect, onMounted } from "vue";
84 import ContactDialog from "@/components/ContactDialog.vue"; 84 import ContactDialog from "@/components/ContactDialog.vue";
85 import { useProductListStore } from "@/stores/product_list"; 85 import { useProductListStore } from "@/stores/product_list";
86 import { useRouter } from "vue-router"; 86 import { useRouter } from "vue-router";
deploy/prod2.sh
1 #!/bin/bash 1 #!/bin/bash
2 # 变量定义 2 # 变量定义
3 -LAST_TAG="1.0.66"  
4 -TAG="1.0.67" 3 +LAST_TAG="1.0.67"
  4 +TAG="1.0.68"
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"
pages/contact.vue
@@ -239,7 +239,7 @@ @@ -239,7 +239,7 @@
239 </template> 239 </template>
240 240
241 <script setup lang="ts"> 241 <script setup lang="ts">
242 -import { ref, reactive } from "vue"; 242 +import { ref, reactive, onMounted } from "vue";
243 import { useVuelidate } from "@vuelidate/core"; 243 import { useVuelidate } from "@vuelidate/core";
244 import { email, required, maxLength } from "@vuelidate/validators"; 244 import { email, required, maxLength } from "@vuelidate/validators";
245 245
@@ -367,7 +367,13 @@ useHead({ @@ -367,7 +367,13 @@ useHead({
367 title: "Contact", 367 title: "Contact",
368 }); 368 });
369 369
370 -window.addEventListener('load', function (event) { if (window.location.href.includes("contact")) { gtag('event', 'conversion', {'send_to': 'AW-881504701/HtNtCIqB-bQaEL3jqqQD'}); } }); 370 +onMounted(() => {
  371 + window.addEventListener('load', function (event) {
  372 + if (window.location.href.includes("contact")) {
  373 + gtag('event', 'conversion', {'send_to': 'AW-881504701/HtNtCIqB-bQaEL3jqqQD'});
  374 + }
  375 + });
  376 +});
371 377
372 </script> 378 </script>
373 379