alteração da rota para o pusher e portas de comunicação
This commit is contained in:
parent
97b4d2c90e
commit
8280bb2ff6
|
|
@ -1,17 +1,19 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="Content-Security-Policy" content="
|
<meta http-equiv="Content-Security-Policy" content="
|
||||||
default-src 'self';
|
default-src 'self';
|
||||||
script-src 'self' 'unsafe-inline';
|
script-src 'self' 'unsafe-inline';
|
||||||
style-src 'self' 'unsafe-inline';
|
style-src 'self' 'unsafe-inline';
|
||||||
connect-src 'self' ws://autoatend.linco.work:6001 ws://localhost:6001;
|
connect-src 'self' ws://autoatend.linco.work:6001 ws://localhost:6001 wss://aa.linco.work:443;
|
||||||
">
|
">
|
||||||
<title>Tela de Atendimento</title>
|
<title>Tela de Atendimento</title>
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
<script src="res/js/jquery/jquery.js"></script>
|
<script src="res/js/jquery/jquery.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="list-view">
|
<div id="list-view">
|
||||||
<h1>Fila</h1>
|
<h1>Fila</h1>
|
||||||
|
|
@ -47,4 +49,5 @@
|
||||||
<script src="renderer.js"></script>
|
<script src="renderer.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
6
main.js
6
main.js
|
|
@ -16,7 +16,7 @@ const dataPath = path.join(__dirname, 'data.json'); // Caminho para o JSON (back
|
||||||
const apiUrl = 'https://autoatend.linco.work/api/v1/';
|
const apiUrl = 'https://autoatend.linco.work/api/v1/';
|
||||||
// const apiUrl = 'http://_lara10-autoatend.devel/api/v1/';
|
// const apiUrl = 'http://_lara10-autoatend.devel/api/v1/';
|
||||||
|
|
||||||
const pusherUrl = 'autoatend.linco.work';
|
const pusherUrl = 'aa.linco.work';
|
||||||
// const pusherUrl = 'localhost';
|
// const pusherUrl = 'localhost';
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -595,9 +595,9 @@ ipcMain.on('iniciar-atendimento', async (event, itemId) => {
|
||||||
const colabId = await floatingWin.webContents.executeJavaScript("localStorage.getItem('idOperator')")
|
const colabId = await floatingWin.webContents.executeJavaScript("localStorage.getItem('idOperator')")
|
||||||
//TODO inicia o atendimento o id do atendimento deve ser requisitado do backend
|
//TODO inicia o atendimento o id do atendimento deve ser requisitado do backend
|
||||||
|
|
||||||
const url = apiUrl + 'iniciar-atendimento/'+itemId; // URL de exemplo para enviar a solicitação
|
const url = apiUrl + 'iniciar-atendimento/' + itemId; // URL para enviar a solicitação
|
||||||
|
|
||||||
// Simula o envio de uma solicitação POST com o ID do item
|
// envio de uma solicitação POST com o ID do item
|
||||||
const request = net.request({
|
const request = net.request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: url,
|
url: url,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "autoatendcolab",
|
"name": "autoatendcolab",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"isBuildNow": true,
|
"isBuildNow": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,11 @@ async function initializePusher() {
|
||||||
|
|
||||||
var pusher = new Pusher(PUSHER_APP_KEY, {
|
var pusher = new Pusher(PUSHER_APP_KEY, {
|
||||||
wsHost: host,
|
wsHost: host,
|
||||||
wsPort: 6001,
|
wsPort: 80,
|
||||||
wssPort: 6001,
|
wssPort: 443,
|
||||||
forceTLS: false,
|
forceTLS: true,
|
||||||
enableStats: false,
|
enableStats: false,
|
||||||
enabledTransports: ['ws','wss'],
|
enabledTransports: ['wss', 'ws'],
|
||||||
cluster: 'mt1'
|
cluster: 'mt1'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue