DmitrMakeev
commited on
Commit
•
3763d04
1
Parent(s):
ec2f9d4
Update biz_v.html
Browse files- biz_v.html +44 -123
biz_v.html
CHANGED
@@ -3,9 +3,7 @@
|
|
3 |
<meta charset="UTF-8">
|
4 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
5 |
<title>API Request</title>
|
6 |
-
|
7 |
-
|
8 |
-
<style>
|
9 |
body {
|
10 |
font-family: Arial, sans-serif;
|
11 |
text-align: center;
|
@@ -23,6 +21,8 @@
|
|
23 |
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
24 |
}
|
25 |
button[type="submit"] {
|
|
|
|
|
26 |
color: white;
|
27 |
background-color: #4CAF50;
|
28 |
border: none;
|
@@ -30,138 +30,59 @@
|
|
30 |
padding: 10px 20px;
|
31 |
font-size: 16px;
|
32 |
border-radius: 5px;
|
33 |
-
margin-top: 20px;
|
34 |
transition: background-color 0.3s ease;
|
35 |
}
|
36 |
button[type="submit"]:hover {
|
37 |
background-color: #388E3C;
|
38 |
}
|
39 |
-
#mediaContainer {
|
40 |
-
margin-top: 20px;
|
41 |
-
display: flex;
|
42 |
-
justify-content: center;
|
43 |
-
align-items: center;
|
44 |
-
flex-direction: column;
|
45 |
-
max-width: 100%;
|
46 |
-
height: auto;
|
47 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
48 |
-
border-radius: 10px;
|
49 |
-
padding: 20px;
|
50 |
-
background-color: white;
|
51 |
-
}
|
52 |
-
#mediaContainer img, #mediaContainer video {
|
53 |
-
max-width: 100%;
|
54 |
-
height: auto;
|
55 |
-
object-fit: contain;
|
56 |
-
border-radius: 10px;
|
57 |
-
}
|
58 |
-
#imageUrl {
|
59 |
-
margin-top: 20px;
|
60 |
-
font-size: 16px;
|
61 |
-
color: #333;
|
62 |
-
cursor: pointer;
|
63 |
-
text-decoration: underline;
|
64 |
-
transition: color 0.3s ease;
|
65 |
-
}
|
66 |
-
#imageUrl:hover {
|
67 |
-
color: #4CAF50;
|
68 |
-
}
|
69 |
-
#progressBarContainer {
|
70 |
-
width: 80%;
|
71 |
-
margin: 20px auto;
|
72 |
-
background-color: #ddd;
|
73 |
-
border-radius: 13px;
|
74 |
-
padding: 3px;
|
75 |
-
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
|
76 |
-
}
|
77 |
-
#progressBar {
|
78 |
-
width: 0%;
|
79 |
-
height: 20px;
|
80 |
-
background-color: #4CAF50;
|
81 |
-
border-radius: 10px;
|
82 |
-
text-align: center;
|
83 |
-
line-height: 20px;
|
84 |
-
color: white;
|
85 |
-
transition: width 0.3s ease;
|
86 |
-
}
|
87 |
-
#filter-field, #filter-type, #filter-value, #filter-clear , #download-json{
|
88 |
-
padding: 10px;
|
89 |
-
font-size: 16px;
|
90 |
-
margin: 5px;
|
91 |
-
}
|
92 |
-
#filter-value {
|
93 |
-
width: 200px;
|
94 |
-
}
|
95 |
-
#filter-clear {
|
96 |
-
padding: 10px 20px;
|
97 |
-
}
|
98 |
-
#filter-field, #filter-type, #filter-value, #filter-clear, #download-json {
|
99 |
-
padding: 10px;
|
100 |
-
font-size: 16px;
|
101 |
-
margin: 5px;
|
102 |
-
border-radius: 5px;
|
103 |
-
border: 1px solid #ccc;
|
104 |
-
}
|
105 |
-
#filter-value {
|
106 |
-
width: 200px;
|
107 |
-
background-color: #f0f0f0;
|
108 |
-
}
|
109 |
-
#filter-clear {
|
110 |
-
padding: 10px 20px;
|
111 |
-
background-color: #4CAF50;
|
112 |
-
color: white;
|
113 |
-
border: none;
|
114 |
-
cursor: pointer;
|
115 |
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
116 |
-
transition: background-color 0.3s ease;
|
117 |
-
}
|
118 |
-
#filter-clear:hover {
|
119 |
-
background-color: #388E3C;
|
120 |
-
}
|
121 |
-
#download-json {
|
122 |
-
padding: 10px 20px;
|
123 |
-
background-color: #4CAF50;
|
124 |
-
color: white;
|
125 |
-
border: none;
|
126 |
-
cursor: pointer;
|
127 |
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
128 |
-
transition: background-color 0.3s ease;
|
129 |
-
}
|
130 |
-
#download-json:hover {
|
131 |
-
background-color: #388E3C;
|
132 |
-
}
|
133 |
-
|
134 |
</style>
|
135 |
-
|
136 |
-
|
137 |
<body>
|
138 |
-
<h1
|
139 |
<label for="tokenInput">Enter Token:</label>
|
140 |
<input type="text" id="tokenInput" placeholder="Your Token">
|
141 |
<button id="sendRequestButton">Send Request</button>
|
142 |
<textarea id="responseArea" rows="10" cols="50" readonly></textarea>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
'Content-Type': 'application/x-www-form-urlencoded'
|
152 |
-
},
|
153 |
-
body: 'token=' + encodeURIComponent(token)
|
154 |
-
})
|
155 |
-
.then(response => response.json())
|
156 |
-
.then(data => {
|
157 |
-
console.log('JSON Response:', data); // Вывод JSON-ответа в консоль
|
158 |
-
document.getElementById('responseArea').value = JSON.stringify(data, null, 2);
|
159 |
-
})
|
160 |
-
.catch(error => {
|
161 |
-
console.error('Error:', error);
|
162 |
-
document.getElementById('responseArea').value = 'Error: ' + error.message;
|
163 |
});
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
</body>
|
167 |
</html>
|
|
|
3 |
<meta charset="UTF-8">
|
4 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
5 |
<title>API Request</title>
|
6 |
+
<style>
|
|
|
|
|
7 |
body {
|
8 |
font-family: Arial, sans-serif;
|
9 |
text-align: center;
|
|
|
21 |
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
|
22 |
}
|
23 |
button[type="submit"] {
|
24 |
+
display: block;
|
25 |
+
margin: 20px auto;
|
26 |
color: white;
|
27 |
background-color: #4CAF50;
|
28 |
border: none;
|
|
|
30 |
padding: 10px 20px;
|
31 |
font-size: 16px;
|
32 |
border-radius: 5px;
|
|
|
33 |
transition: background-color 0.3s ease;
|
34 |
}
|
35 |
button[type="submit"]:hover {
|
36 |
background-color: #388E3C;
|
37 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
</style>
|
39 |
+
</head>
|
|
|
40 |
<body>
|
41 |
+
<h1>Комменты Бизон 365</h1>
|
42 |
<label for="tokenInput">Enter Token:</label>
|
43 |
<input type="text" id="tokenInput" placeholder="Your Token">
|
44 |
<button id="sendRequestButton">Send Request</button>
|
45 |
<textarea id="responseArea" rows="10" cols="50" readonly></textarea>
|
46 |
+
<div id="dropdown-container"></div>
|
47 |
+
|
48 |
+
<script>
|
49 |
+
document.getElementById('sendRequestButton').addEventListener('click', function() {
|
50 |
+
const token = document.getElementById('tokenInput').value;
|
51 |
+
const url = '/send_request';
|
52 |
+
fetch(url, {
|
53 |
+
method: 'POST',
|
54 |
+
headers: {
|
55 |
+
'Content-Type': 'application/x-www-form-urlencoded'
|
56 |
+
},
|
57 |
+
body: 'token=' + encodeURIComponent(token)
|
58 |
+
})
|
59 |
+
.then(response => response.json())
|
60 |
+
.then(data => {
|
61 |
+
console.log('JSON Response:', data);
|
62 |
+
document.getElementById('responseArea').value = JSON.stringify(data, null, 2);
|
63 |
|
64 |
+
// Создание выпадающего списка
|
65 |
+
createDropdown(data);
|
66 |
+
})
|
67 |
+
.catch(error => {
|
68 |
+
console.error('Error:', error);
|
69 |
+
document.getElementById('responseArea').value = 'Error: ' + error.message;
|
70 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
});
|
72 |
+
|
73 |
+
function createDropdown(data) {
|
74 |
+
const container = document.getElementById('dropdown-container');
|
75 |
+
const select = document.createElement('select');
|
76 |
+
|
77 |
+
data.forEach(item => {
|
78 |
+
const option = document.createElement('option');
|
79 |
+
option.value = item;
|
80 |
+
option.text = item;
|
81 |
+
select.appendChild(option);
|
82 |
+
});
|
83 |
+
|
84 |
+
container.appendChild(select);
|
85 |
+
}
|
86 |
+
</script>
|
87 |
</body>
|
88 |
</html>
|