Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
tbf
/
quiz_audit_management
/
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 :
9.91
KB
Copy
<template> <div class="section-1"> <img src="build/images/rect-sect-1/sect1-1.svg" class="rect rect-1"> <img src="build/images/rect-sect-1/sect1-2.svg" class="rect rect-2"> <img src="build/images/rect-sect-1/sect1-3.svg" class="rect rect-3"> <img src="build/images/rect-sect-1/sect1-4.svg" class="rect rect-4"> <img src="build/images/rect-sect-1/sect1-5.svg" class="rect rect-5"> <img src="build/images/rect-sect-1/sect1-6.svg" class="rect rect-6"> <img src="build/images/rect-sect-1/sect1-7.svg" class="rect rect-7"> <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">Descoperă problemele de management care îți blochează compania</div> <div class="icon"><check /></div> </div> <div class="item-solution"> <div class="text">Primești gratuit o listă cu acțiunile pe care ar trebui să le implementezi pentru rectificarea problemelor de management identificate</div> <div class="icon"><check /></div> </div> <div class="item-solution"> <div class="text">Află cum te compari cu {{ already_finished | numeral('0,0') }} de antreprenori care au realizat acest audit</div> <div class="icon"><check /></div> </div> </div> <div class="button-holder" v-for="(answer, key) in question.answers" :key="key"> <button class="start-button" @click="setActive(key,answer)"><span>{{answer.title}}</span> <arrow-right></arrow-right></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() { axios.get('/getApplicantsNumber').then((result)=>{ this.already_finished = result.data.applicants_no; 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