Update app.py
Browse files
app.py
CHANGED
@@ -1960,6 +1960,78 @@ def biz_365_bridge():
|
|
1960 |
|
1961 |
|
1962 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1963 |
|
1964 |
|
1965 |
|
|
|
1960 |
|
1961 |
|
1962 |
|
1963 |
+
@app.route('/biz_365_help_2.js')
|
1964 |
+
def biz_365_br2dge():
|
1965 |
+
script_content = """
|
1966 |
+
document.getElementById('supportButton').addEventListener('click', function() {
|
1967 |
+
Swal.fire({
|
1968 |
+
title: '<img src="https://i.ibb.co/Vmdsys2/Screenshot-355.jpg" alt="Ирина Дель Соль"> <br> Служба добра и заботы <br><span style="color: orange;">Ирина Дель Соль!</span>',
|
1969 |
+
html: `
|
1970 |
+
<textarea id="supportInput" class="swal2-textarea" placeholder="Ваш вопрос"></textarea>
|
1971 |
+
<br>
|
1972 |
+
<label>
|
1973 |
+
<input type="radio" name="phone" value="${encodedPhone1}" checked>
|
1974 |
+
Техподдержка Дмитрий
|
1975 |
+
</label>
|
1976 |
+
<br>
|
1977 |
+
<label>
|
1978 |
+
<input type="radio" name="phone" value="${encodedPhone2}">
|
1979 |
+
Вопросы по обучению Алексей
|
1980 |
+
</label>
|
1981 |
+
`,
|
1982 |
+
showClass: {
|
1983 |
+
popup: 'animate__animated animate__fadeInUp animate__faster'
|
1984 |
+
},
|
1985 |
+
hideClass: {
|
1986 |
+
popup: 'animate__animated animate__fadeOutDown animate__faster'
|
1987 |
+
},
|
1988 |
+
confirmButtonText: 'Отправить',
|
1989 |
+
confirmButtonColor: '#079100',
|
1990 |
+
cancelButtonText: 'Закрыть',
|
1991 |
+
cancelButtonColor: '#ff0000',
|
1992 |
+
showCancelButton: true,
|
1993 |
+
showCloseButton: false,
|
1994 |
+
customClass: {
|
1995 |
+
confirmButton: 'swal2-confirm',
|
1996 |
+
cancelButton: 'swal2-cancel',
|
1997 |
+
textarea: 'swal2-textarea',
|
1998 |
+
popup: 'swal2-popup'
|
1999 |
+
},
|
2000 |
+
preConfirm: () => {
|
2001 |
+
const question = Swal.getPopup().querySelector('#supportInput').value;
|
2002 |
+
const selectedPhone = Swal.getPopup().querySelector('input[name="phone"]:checked').value;
|
2003 |
+
if (!question) {
|
2004 |
+
Swal.showValidationMessage('Пожалуйста, введите ваш вопрос');
|
2005 |
+
}
|
2006 |
+
return { question: question, phone: selectedPhone };
|
2007 |
+
}
|
2008 |
+
}).then((result) => {
|
2009 |
+
if (result.isConfirmed) {
|
2010 |
+
const question = result.value.question;
|
2011 |
+
const selectedPhone = result.value.phone;
|
2012 |
+
const encodedQuestion = encodeURIComponent(question);
|
2013 |
+
const whatsappUrl = `https://api.whatsapp.com/send?phone=${selectedPhone}&text=${encodedQuestion}`;
|
2014 |
+
window.open(whatsappUrl, '_blank');
|
2015 |
+
}
|
2016 |
+
});
|
2017 |
+
});
|
2018 |
+
"""
|
2019 |
+
return Response(script_content, mimetype='application/javascript')
|
2020 |
+
|
2021 |
+
|
2022 |
+
|
2023 |
+
|
2024 |
+
|
2025 |
+
|
2026 |
+
|
2027 |
+
|
2028 |
+
|
2029 |
+
|
2030 |
+
|
2031 |
+
|
2032 |
+
|
2033 |
+
|
2034 |
+
|
2035 |
|
2036 |
|
2037 |
|