feat: dynamic API base — works on wasrusgen1.ru/consulting (own domain, no CORS)

This commit is contained in:
wasrusgen 2026-05-30 13:57:11 +03:00
parent 269c6f9b0a
commit 4507625911
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="ru"> <html lang="ru">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
@ -234,7 +234,7 @@ body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);displ
</div> </div>
<script> <script>
const API="https://claude-83-172-150-111.sslip.io/elena"; const API=location.hostname.indexOf("wasrusgen1.ru")>=0?"/consulting":"https://claude-83-172-150-111.sslip.io/elena";
// Доступ: токен из ссылки-приглашения (?t=) имеет приоритет // Доступ: токен из ссылки-приглашения (?t=) имеет приоритет
const urlToken=new URLSearchParams(location.search).get("t"); const urlToken=new URLSearchParams(location.search).get("t");
if(urlToken)localStorage.setItem("cab_token",urlToken); if(urlToken)localStorage.setItem("cab_token",urlToken);

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="ru"> <html lang="ru">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
@ -129,7 +129,7 @@ body{font-family:'Inter',sans-serif;background:var(--bg);color:var(--text);displ
</div> </div>
<script> <script>
const API="https://claude-83-172-150-111.sslip.io/elena"; const API=location.hostname.indexOf("wasrusgen1.ru")>=0?"/consulting":"https://claude-83-172-150-111.sslip.io/elena";
let projects=[], current=null, state=null, view="dashboard", activeTab="interview"; let projects=[], current=null, state=null, view="dashboard", activeTab="interview";
const PIPE=[["lead","Лид","#9ca3af"],["qualified","Квалификация","#3B82F6"],["proposal","Предложение","#8B5CF6"],["active","В работе","#047857"],["done","Завершён","#10B981"]]; const PIPE=[["lead","Лид","#9ca3af"],["qualified","Квалификация","#3B82F6"],["proposal","Предложение","#8B5CF6"],["active","В работе","#047857"],["done","Завершён","#10B981"]];
const pipeMap=Object.fromEntries(PIPE.map(p=>[p[0],p])); const pipeMap=Object.fromEntries(PIPE.map(p=>[p[0],p]));