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 :
CalculationsPage.vue
| Size :
8.05
KB
Copy
<template> <div class="content-step calculation-page" v-if="loaded"> <h1 class="title"> <div class="question"> <span>Urmărește video-ul de mai jos iar apoi alege dacă îți asumi consecințele.</span> </div> </h1> <div class="description"> <div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"> <div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"> <div class="wistia_embed wistia_async_q5lgmhmwyw videoFoam=true" style="height:100%;position:relative;width:100%"> <div class="wistia_swatch" style="height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;"> <img src="https://fast.wistia.com/embed/medias/q5lgmhmwyw/swatch" style="filter:blur(5px);height:100%;object-fit:contain;width:100%;" alt="" aria-hidden="true" onload="this.parentNode.style.opacity=1;" /> </div> </div> </div> </div> </div> <div class="pb-5 answer" v-if="source != 'admin'"> <div class="answer-button" v-bind:class="[active_answer == 'btn1' ? 'active' : '']"> <button class="answer-title red" @click="setActive('btn1', 'Sunt de acord')">Sunt de acord</button> </div> <div class="answer-button"> <button class="answer-inline" @click="setActive('refuse')">Îmi pare rău, nu pot să îmi asum</button> </div> </div> <button key="reset-quiz" class="mb-5 mx-auto w-100 reset-quiz-btn" style="background: transparent; border: 0; text-decoration: underline; font-size: 14px;" @click="resetQuizDev" v-if="reset_button">RESET QUIZ</button> </div> </template> <script> import Check from "./icons/Check"; import NextIcon from "./icons/Next"; import ArrowLeft from "./icons/ArrowLeft"; import ContactPage from './ContactPage' export default { data() { return { loaded: false, active_answer: 'nothing', answer_selected: 'nothing', title_question: '', showPreviousBtn: true, html_subtitle: '', // dynamic calculation values answers: {}, full_name: "", qualified_for: null } }, components: { Check, NextIcon, ArrowLeft, ContactPage }, 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() { var entity_json = ''; var session_token = ''; if(this.session_token != '' && this.source == 'admin' ){ entity_json = this.entity_json; session_token = this.session_token; }else{ entity_json = localStorage.getItem('quiz'); session_token = localStorage.getItem('sessionId'); } axios.post('/finalCalculation', { entity_json: entity_json, session_token: session_token }).then((result)=>{ this.full_name = result.data.first_name; this.qualified_for = result.data.qualified_for; if(this.qualified_for == 'online'){ this.goThanks(200); }else{ this.loaded = true; } }); const wistiaScript1 = document.createElement('script') const wistiaScript2 = document.createElement('script') wistiaScript1.setAttribute('src', 'https://fast.wistia.com/embed/medias/q5lgmhmwyw.jsonp') wistiaScript1.setAttribute('async', true) wistiaScript2.setAttribute('src', 'https://fast.wistia.com/assets/external/E-v1.js') wistiaScript2.setAttribute('async', true) document.head.appendChild(wistiaScript1) document.head.appendChild(wistiaScript2) window._wq = window._wq || [] _wq.push({ id: 'q5lgmhmwyw', onReady(video) { const videoElement = document.createElement('div') videoElement.setAttribute('class', 'wistia_embed wistia_async_q5lgmhmwyw videoFoam=true') document.getElementById('my-video').appendChild(videoElement) } }) }, watch: { }, props: { question: Object, goThanks: Function, reset_button: Number, resetQuizDev: Function, name_referral: String, entity_json: Object, session_token: String, source: String }, methods: { setActive(key, value = false){ if(key == 'btn1') { this.active_answer = key; axios.post('/quizFeedback',{ session_token: localStorage.getItem('sessionId'), feedback: value }).then(()=>{ setTimeout(() => { setTimeout(() => { $('.answer-button.active').removeClass('active'); }, 50); this.goThanks(this.question.next_step) }, 500); }) } else if(key === 'refuse') { this.goThanks(370); } }, back_to_previous(){ this.previousSet(); }, showBox(item){ $('#boxno-'+item).toggleClass('active'); } } } </script>
Back