Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
tbf
/
duplicat_sala_palatului
/
resources
/
js
/
components
/
Information Server
MySQL :
OFF
Perl :
OFF
CURL :
ON
WGET :
OFF
PKEXEC :
OFF
Directive
Local Value
IP Address
89.40.16.97
System
Linux server.atelieruldeit.ro 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
User
tbf
PHP Version
7.3.33
Software
Apache
Doc root
Writable
close
Edit File :
StartPage.vue
| Size :
8.69
KB
Copy
<template> <div class="section-1"> <div class="container-section" v-if="loaded"> <div class="container-holder"> <h1 v-html="title"></h1> <div class="list-solutions"> <div class="item-solution"> <div class="text">Răspunde la câteva întrebări să vezi dacă te califici să participi LIVE la Sala Palatului sau să urmărești evenimentul ONLINE în timp real. Sunt 4000 de locuri la Sala Palatului și nelimitat ONLINE.</div> </div> </div> <div class="button-holder" v-for="(answer, key) in question.answers" :key="key"> <button class="start-button" @click="setActive(key,answer)">{{answer.title}}</button> </div> </div> </div> </div> </template> <script> import ArrowLeft from "./icons/ArrowLeft"; import ArrowRight from './assets_homepage/ArrowRight' import Check from './assets_homepage/CheckStartPage' export default { data() { return { active_answer: 'nothing', answer_selected: 'nothing', title_question: '', showPreviousBtn: true, html_subtitle: '', already_finished: 1321, loaded: false } }, components: { 'arrow-right':ArrowRight, 'arrow-left': ArrowLeft, Check, }, beforeCreate: function() { document.body.className = 'first_step'; }, computed:{ title: function(){ let quiz_obj = JSON.parse(localStorage.getItem('quiz')) var new_title = ''; var html_subtitle = ''; var regex_get_value = /(?:\#)([^#]+)(?=#|$)/; var title_escaped = ''; var new_title_v1 = ''; var scope = this; this.question.title.every((element) => { if(element.condition == 'true'){ if(regex_get_value.exec(element.title)){ title_escaped = eval(regex_get_value.exec(element.title)[1]); } new_title_v1 = element.title.replace(/\#([^#]+)\#/g , title_escaped); new_title = new_title_v1.replace('{','<mark>').replace('}','</mark>'); new_title = new_title.replace('&name', this.name_referral); this.title_question = new_title; this.html_subtitle = element.subtitle html_subtitle = $.parseHTML(html_subtitle); return false; } if(eval(element.condition)){ if(regex_get_value.exec(element.title)){ title_escaped = eval(regex_get_value.exec(element.title)[1]); } new_title_v1 = element.title.replace(/\#([^#]+)\#/g , title_escaped); new_title = new_title_v1.replace('{','<mark>').replace('}','</mark>'); new_title = new_title.replace('&name', this.name_referral); this.title_question = new_title; this.html_subtitle = element.subtitle html_subtitle = $.parseHTML(html_subtitle); return false; } return true; }) function has_key(string){ try{ return eval(string) }catch{ return null } } return new_title; } }, mounted() { this.loaded = true; if(localStorage.getItem('previous_step') == this.questionKey){ this.showPreviousBtn = false; }else{ this.showPreviousBtn = true; } if(localStorage.getItem('sessionId') === null){ axios.get('/getSessionToken').then((result)=>{ this.sessionId = result.data; localStorage.setItem('sessionId', this.sessionId) axios.post('/saveLog',{ question: 'start_page', answer: null, time: 0, session_token: this.sessionId, }); }); }else{ axios.post('/saveLog',{ question: 'start_page', answer: null, time: 0, session_token: localStorage.getItem('sessionId'), }); } this.question.answers.forEach((el) => { if(el.video && el.type_video == 'wistia'){ setTimeout(() => { var wistiaEmbed = Wistia.embed(el.video, { autoPlay: false, controlsVisibleOnLoad: true, videoFoam: { maxWidth: 960 }, copyLinkAndThumbnailEnabled: false, playerColor: "404040", seo: true }); }, 0); } }); if(this.question.video && this.question.type_video == 'wistia'){ setTimeout(() => { var wistiaEmbed = Wistia.embed(this.question.video, { autoPlay: false, controlsVisibleOnLoad: true, videoFoam: { maxWidth: 960 }, copyLinkAndThumbnailEnabled: false, playerColor: "404040", seo: true }); }, 0); } }, watch: { question: function (val) { if(localStorage.getItem('previous_step') == this.questionKey){ this.showPreviousBtn = false; }else{ this.showPreviousBtn = true; } this.answer_selected = ''; this.active_answer = ''; this.question.answers.forEach((el) => { if(el.video && el.type_video == 'wistia'){ setTimeout(() => { var wistiaEmbed = Wistia.embed(el.video, { autoPlay: false, controlsVisibleOnLoad: true, videoFoam: { maxWidth: 960 }, copyLinkAndThumbnailEnabled: false, playerColor: "404040", seo: true }); }, 0); } if (el.image || el.video) { this.answer_has_video_or_img = true; } }); if(this.question.video && this.question.type_video == 'wistia'){ setTimeout(() => { var wistiaEmbed = Wistia.embed(this.question.video, { autoPlay: true, muted: true, controlsVisibleOnLoad: true, videoFoam: { maxWidth: 960 }, copyLinkAndThumbnailEnabled: false, playerColor: "404040", seo: true }); }, 0); } } }, props: { question: Object, setNextQuestion: Function, previousSet: Function, name_referral: String, questionKey: String, step_no: '' }, methods: { setActive(key, answer){ this.active_answer = (this.questionKey + '-' + key); this.answer_selected = answer; setTimeout(() => { $('.answer-button.active').removeClass('active'); }, 50); this.setNextQuestion(this.questionKey, this.answer_selected, this.title_question, key) }, back_to_previous(){ this.previousSet(); } } } </script>
Back