From b72bb81c7f5275062035247b8764cfa75fe30e66 Mon Sep 17 00:00:00 2001 From: edelCustodio Date: Fri, 5 Oct 2018 10:09:05 -0500 Subject: [PATCH] configurando la API url correcta --- js/client_side/cut.js | 6 +++--- js/common.js | 12 ++++++------ package.json | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/js/client_side/cut.js b/js/client_side/cut.js index 55cb57b..2607328 100644 --- a/js/client_side/cut.js +++ b/js/client_side/cut.js @@ -8,7 +8,7 @@ require( 'datatables.net-bs4' )(); require( 'datatables.net-responsive-dt' )() var dt = require( 'datatables.net' )( window, $ ); let apiURL = ''; -var port = 51990; // 8080 51990 +var port = 8080; // 8080 51990 var _tickets; var tableTickets; var tableHistorial; @@ -18,8 +18,8 @@ let dpFechaInicio; let dpFechaFin; $(document).ready(function() { - // apiURL = 'http://' + sessionStorage.getItem('IPServer') + ':' + port + '/'; - apiURL = 'http://localhost:' + port + '/'; + apiURL = 'http://' + sessionStorage.getItem('IPServer') + ':' + port + '/'; + // apiURL = 'http://localhost:' + port + '/'; fechaInicio = new Date(); diff --git a/js/common.js b/js/common.js index 6005d5f..4d70c50 100644 --- a/js/common.js +++ b/js/common.js @@ -14,7 +14,7 @@ var _tickets = []; var _ticket = {}; var _recordsNoPay = []; var _idTicket = 0; -var port = 51990; // 8080 51990 +var port = 8080; // 8080 51990 /*-------------------------------------- @@ -23,7 +23,7 @@ var port = 51990; // 8080 51990 /* * Notifications */ -function notify(from, align, icon, type, title, message){ +function notify(from, align, icon, type, title, message) { $.growl({ icon: icon, title: title, @@ -93,8 +93,8 @@ function alertExecuteFunction(title, text, type, functionHandle) { $(document).ready(function () { if (sessionStorage.getItem('IPServer') !== null) { - // apiURL = 'http://' + sessionStorage.getItem('IPServer') + ':' + port + '/'; - apiURL = 'http://localhost:' + port + '/'; + apiURL = 'http://' + sessionStorage.getItem('IPServer') + ':' + port + '/'; + // apiURL = 'http://localhost:' + port + '/'; } else { ipcRenderer.send('goForIPServer', 1); } @@ -107,8 +107,8 @@ $(document).ready(function () { ipcRenderer.on('getForIPServer', (event, arg) => { var ips = JSON.parse(arg); sessionStorage.setItem('IPServer', ips.ipServer); - // apiURL = 'http://' + ips.ipServer + ':' + port + '/'; - apiURL = 'http://localhost:' + port + '/'; + apiURL = 'http://' + ips.ipServer + ':' + port + '/'; + // apiURL = 'http://localhost:' + port + '/'; sessionStorage.setItem('IPServer', ips.ipServer); }); diff --git a/package.json b/package.json index 1f3f55f..2cf72c7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cyber-server", "main": "main.js", - "version": "0.1.12", + "version": "0.1.13", "license": "MIT", "description": "Aplicacion de escritorio para control de un cyber cafe asi como un punto de venta.", "author": "Edel Custodio Frias",