Joywork/js/vue_scripts/trial_period_vue.js
2026-05-22 21:21:54 +03:00

112 lines
3.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var trialperiod = new Vue({
el: '#trial_period',
components: {
vuejsDatepicker: window.vuejsDatepicker
},
data() {
return {
ru: vdp_translation_ru.js,
is_show: false,
text: "У вас отключен тариф, для того, что бы воспользоваться Поиском необходимо произвести Оплату.",
is_show_video: false,
}
},
methods: {
//Открытие
open() {
this.is_show = true;
$("body").addClass("lock");
$('.jw__add-popup').removeClass('is__show');
},
//Закрытие
closes() {
this.is_show = false;
this.text = "У вас отключен тариф, для того, что бы воспользоваться Поиском необходимо произвести Оплату.";
$("body").removeClass("lock");
$('.jw__add-popup').removeClass('is__show');
},
//Переход к оплате
openPay() {
window.location.href = "/settings.php";
},
openVideo() {
this.is_show_video = true;
$('.video-frame').html('<iframe width="560" height="315" src="https://www.youtube.com/embed/88ZV4rV2Al4" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>');
},
closesVideo() {
this.is_show_video = false;
$('.video-frame').html('');
},
openTunningFunnel() {
window.location.href = "/tuning_funnel.php";
},
modalObj() {
this.text = "Для того, чтобы добавить Объект необходимо произвести Оплату.";
this.open();
},
modalClient() {
this.text = "Для того, чтобы добавить Клиента необходимо произвести Оплату.";
this.open();
},
modalReq() {
this.text = "Для того, чтобы добавить Заявку необходимо произвести Оплату.";
this.open();
},
modalDoc() {
this.text = "Для того, чтобы добавить Документы необходимо произвести Оплату.";
this.open();
},
modalAdvert() {
this.text = "Для того, чтобы Рекламировать объекты необходимо произвести Оплату.";
this.open();
},
//Проверка на пустоту
isEmpty(data) {
if (typeof(data) === 'object') {
if (JSON.stringify(data) === '{}' || JSON.stringify(data) === '[]') {
return true;
} else if (!data) {
return true;
}
return false;
} else if (typeof(data) === 'string') {
if (!data.trim()) {
return true;
}
return false;
} else if (typeof(data) === 'undefined') {
return true;
} else {
return false;
}
},
},
mounted() {
},
created: function() {
$("#trial_period").removeClass("hidden");
}
})