Files
myprojplanet_vite/src/views/login/signup/signup.ts

37 lines
963 B
TypeScript
Raw Normal View History

2021-09-16 21:08:02 +02:00
import { computed, defineComponent, ref, watch } from 'vue'
import { CSignUp } from '../../../components/CSignUp'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { useUserStore } from '@store/UserStore'
import { useRoute } from 'vue-router'
2021-12-29 18:26:41 +01:00
import { tools } from '@store/Modules/tools'
2021-09-16 21:08:02 +02:00
export default defineComponent({
name: 'SignUp',
2021-09-16 21:08:02 +02:00
components: { CSignUp },
props: {},
setup() {
const $route = useRoute()
2021-09-16 21:08:02 +02:00
const adult = ref(false)
const invited = computed(() => $route.params.invited)
2021-09-16 21:08:02 +02:00
// @ts-ignore
2022-01-03 21:53:41 +01:00
watch(() => invited, (newval, oldval) => {
2021-09-16 21:08:02 +02:00
console.log('$route.params.invited')
adult.value = !!$route.params.invited
2021-09-16 21:08:02 +02:00
})
2021-12-29 18:26:41 +01:00
function created() {
if (!tools.getCookie(tools.APORTADOR_SOLIDARIO, '')) {
// @ts-ignore
tools.setCookie(tools.APORTADOR_SOLIDARIO, $route.params.invited ? $route.params.invited : '')
}
}
created()
return {}
2021-09-16 21:08:02 +02:00
},
})