feat: formbricks edit

This commit is contained in:
RayGur authored and wancat committed 2024-08-02 14:44:28 +08:00
1 parent 4c90793fc6
commit 634464065d
1 file changed
+16 -3
+16 -3
View File
@@ -7,6 +7,19 @@ import { Vue3Lottie } from 'vue3-lottie'
import CompleteAnimation from '../../img/complete-animation.json'
import formbricks from "@formbricks/js/website";
formbricks.init({
environmentId: "clyffbuq50bbxwh63thlfs1lb",
apiHost: "https://app.formbricks.com",
attributes: {
language: "zh", // optional
},
});
const showModal = ref(true) // Controls whether the modal is visible or not
const router = useRouter()
const toast = useToast()
if (typeof window !== "undefined") {
formbricks.init({
environmentId: "clyffbuq50bbxwh63thlfs1lb",
@@ -14,12 +27,10 @@ if (typeof window !== "undefined") {
});
}
const showModal = ref(true) // Controls whether the modal is visible or not
const router = useRouter()
const toast = useToast()
const closeModal = () => {
showModal.value = false
}
const defineComponent = () => ({
components: {
Vue3Lottie,
@@ -30,6 +41,7 @@ const defineComponent = () => ({
}
},
})
const backtoMap = async () => {
try {
router.push({ name: 'map' })
@@ -43,6 +55,7 @@ const backtoMap = async () => {
setTimeout(() => {
showModal.value = true
}, 5000) // Show modal after 5 seconds
</script>
<template>