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
+17 -4
+17 -4
View File
@@ -1,12 +1,25 @@
<script setup lang="ts">
import { useRouter } from 'vue-router'
import { useToast } from 'vue-toastification'
import { ref } from 'vue'
import { ref} from 'vue'
import { Vue3Lottie } from 'vue3-lottie'
// import { surveyUrl } from '../config'
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>