Add affiliate cookie

pull/201/head
cagataycivici 2020-01-30 16:44:59 +03:00
parent 8571f0b43c
commit c7ce2f40ce
1 changed files with 15 additions and 0 deletions

View File

@ -185,3 +185,18 @@
</div> </div>
</div> </div>
</template> </template>
<script>
export default {
mounted() {
let afId = this.$route.query['af_id'];
if (afId) {
let today = new Date();
let expire = new Date();
expire.setTime(today.getTime() + 3600000*24*7);
document.cookie = 'primeaffiliateid=' + afId + ';expires=' + expire.toUTCString() + ';path=/; domain:primefaces.org';
}
}
}
</script>